|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-08-01 20:25 UTC] mike at saymikeo dot com
Description: ------------ I am trying to find an sma of values in the millions. Please see the passed data below. This returns with the same number over and over again. -2147483.648 Test script: --------------- passed to trader_sma with a period of 10 Array ( [0] => 14545700 [1] => 24673200 [2] => 50672800 [3] => 41416800 [4] => 29481600 [5] => 32186900 [6] => 29166700 [7] => 23001400 [8] => 22290400 [9] => 15374500 [10] => 21276300 [11] => 21683100 [12] => 23409200 [13] => 21722700 [14] => 26108400 [15] => 21369400 [16] => 29805400 [17] => 20463500 [18] => 22902700 [19] => 21340500 [20] => 31774600 [21] => 24878900 [22] => 21940300 [23] => 30701500 [24] => 37528000 [25] => 36624400 [26] => 34090300 [27] => 29811100 [28] => 36820500 [29] => 34518400 [30] => 38442800 [31] => 32346800 [32] => 19145100 [33] => 14527500 [34] => 18076400 [35] => 21821300 [36] => 15272200 [37] => 13948100 [38] => 18988500 [39] => 16551800 [40] => 17941000 [41] => 17167900 [42] => 12179900 [43] => 14269400 [44] => 12771600 [45] => 17010900 [46] => 20031900 [47] => 25614900 [48] => 26153100 [49] => 22538900 [50] => 24813800 [51] => 20889100 [52] => 17721300 [53] => 11730900 [54] => 13589400 [55] => 18907800 [56] => 17568200 [57] => 18606400 [58] => 19892400 [59] => 13864700 [60] => 14325100 [61] => 13565300 [62] => 12395200 [63] => 21116500 [64] => 15556400 [65] => 10491800 [66] => 12351400 [67] => 11973300 [68] => 15728900 [69] => 12907200 [70] => 12827000 [71] => 11660800 [72] => 10169400 [73] => 10869800 [74] => 9883900 [75] => 7252100 [76] => 10108600 [77] => 15051400 ) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Hi Michael, could you please do something like print '$data = array(' . implode(', ', $my_data) . ');'; would be really easier to take it into the test :) Thanks for the report, I'll debug it asap. I suspect a conversion to int here or something similar.