Edit report at http://bugs.php.net/bug.php?id=51396&edit=1
ID: 51396
Comment by: codeslinger at compsalot dot com
Reported by: codeslinger at compsalot dot com
Summary: Math is Unreliable
Status: Feedback
Type: Bug
Package: Math related
Operating System: any
PHP Version: Irrelevant
Assigned To: aharvey
New Comment:
Thank You for the response.
This program executes thousands of identical loops
it performs a number format conversion on each of those thousands of
numbers in it's array.
Out of all of those thousands of identical conversions about 4 of them
will produce an invalid result.
for this specific program, if I skip the array_merge (see $Nest) then
the bug does not occur.
Every time I make a change to the loops etc. the behavior changes, even
to where the bug is not triggered. I have already simplified this
program quite a bit and the result was that it now fails at a totally
different array index then when I first observed the problem. The
trigger is very finicky.
XP is not a factor here, even though the original problem was found on
XP, I am running this Snowflake program on Ubuntu Linux.
converting a number to a string should never result in that string
containing a non-numeric character.
I can try to reduce this program further, but really and truly, it is
hard to trigger this -- but once triggered it is totally consistent and
repeatable.
Previous Comments:
------------------------------------------------------------------------
[2010-03-26 10:11:25] pajoye@php.net
Btw, it could be due to bad initialized data as well (as you experience
it on unix as well).
Can you try to run your script under valgrind too?
------------------------------------------------------------------------
[2010-03-26 09:54:33] pajoye@php.net
It looks to me in a bug at the number formatting in the Windows API (not
php dependent). Other users met this problem on old XP systems. You
could reproduce it using number_format only. Or maybe only with a single
printf function.
Can you try using another windows box or using 5.3.2-vc9 builds?
Btw, it is not about bad or good attitude but about having something we
can actually use to help you. I can understand your worries after having
spent hours to debug this problem, but we will still use a small script
to debug this problem, if any.
------------------------------------------------------------------------
[2010-03-26 09:40:23] codeslinger at compsalot dot com
did you even LOOOKK at the script that I provided?
it is not that complicated. a few loops and some array allocations.
previous attempts to reduce this to anything simpler have been
unsuccessful.
this is exactly the attitude that causes me to be overwrought.
------------------------------------------------------------------------
[2010-03-26 09:30:30] pajoye@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2010-03-26 08:51:34] codeslinger at compsalot dot com
oops, fixed.
various attempts to isolate this to a simple test case have not yet
succeeded. This program is the closest I've come to a simple test
case.
after many hours of working on this, what I can tell you is that it
requires lots of calculations and the use of arrays. - lots of memory
allocations.
yes, I confess to being overwrought. I've got 3 years of work, and the
future of my software company at stake with this bug. and a lot of
experience with bug reports that get ignored, including the original
entry for this bug.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=51396
--
Edit this bug report at http://bugs.php.net/bug.php?id=51396&edit=1