negative memory size in situations where the sprintf implementation of the
host system generated less decimal places than were requested.
Resolved this issue by making number_format examine the string returned
by spprintf and have it pad to the correct number of decimal places.
Added a test-case based on the bug report; the length of decimal places
required to trigger this bug is sprintf implementation dependent; as the
implementation is now using spprintf (provided by PHP), that number is
78 digits (NDIG - 2).
# I played with the idea of enhancing sprintf to do the equivalent, but
# it was too much effort considering that the precision of floats/doubles
# is not good enough to warrant it.
# This fix could do with some QA from someone else to make sure there are
# no memory bounds problems and then MFH it to PHP_4_3
# It is difficult to test an approximation of an approximation, but I
# believe this test should be close enough to verify the function is working
# correctly.
pow() tests.
@- Fixed pow(), and added finite(), isinf(), and isnan(). (Jim)
# Jeroen was on crack, and apparently flunked arithmetic. Names of new
# functions subject to change if people get persnickety about them.
# (They're currently the same as the underlying C library function
# names. Hope nobody forgets to update the tests if they change the
# names.)
# Oh, and pow() uses the new parameter-passing API now.
Took the old PHP 3 regression testing framework and rewrote it in PHP.
Should work on both Windows and UNIX, however I have not tested it on
Windows. See tests/README for how to write tests. Added the PHP 3
tests and converted most of them.