Commit Graph

57 Commits

Author SHA1 Message Date
Zoe Slattery
b78b25a336 Test cases for sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh. 2007-09-04 09:01:02 +00:00
Antony Dovgal
3a46e8ab1f fix tests 2007-05-07 22:30:16 +00:00
Antony Dovgal
66859a74de fix tests 2007-04-26 23:30:00 +00:00
Hannes Magnusson
b3a914aca8 Fix test (bug#39097) 2006-10-15 13:43:45 +00:00
Hannes Magnusson
2d3056e94f MFH:
- Fixed bug #33895 (missing math constants).
 - Remove M_PI from math.c (its defined in php_math.h)
2006-08-27 19:14:43 +00:00
Antony Dovgal
8a58105f42 MFH: use set_time_limit(), this test takes forever on AIX 2006-03-22 19:27:47 +00:00
foobar
3982f722c2 Skip test on solaris 2005-08-05 09:19:43 +00:00
Andrey Hristov
0e459321bf move math_standard_deviation and math_variance to the stats PECL extension 2005-05-13 10:11:19 +00:00
Andrey Hristov
0c268fa0f7 fix the test too 2005-05-10 15:27:49 +00:00
Andrey Hristov
2c0959689b add possibility to calculate the standard deviation and the variance
on a sample - the formulae are slightly different.
2005-05-02 12:29:38 +00:00
Andrey Hristov
7a4eb25870 add also math_variance() which uses the same calculation as math_std_dev() 2005-05-02 12:12:04 +00:00
Andrey Hristov
6141c5690d fix division by zero. throw an warning if the array is empty. 2005-05-02 11:01:14 +00:00
Andrey Hristov
fb0c19da1c add math_std_dev() 2005-05-02 09:17:49 +00:00
foobar
32d86482cc update test to include negative floats as strings too 2005-01-10 16:00:08 +00:00
Magnus M��tt�
774a978ea9 Fix test so it doesn't hang make test on HP-UX. 2004-12-21 04:34:22 +00:00
Ilia Alshanetsky
cc17322c14 MFB: test fix. 2004-12-14 17:43:53 +00:00
Derick Rethans
b6f9b5c693 - Added testcase for bug #30695 2004-11-29 10:15:03 +00:00
foobar
36a76f403a Test for bug #30069 2004-09-15 13:54:16 +00:00
Marcus Boerger
29cfd6d24f - Remove unused blocks 2004-05-19 08:56:50 +00:00
Marcus Boerger
d94136fc30 - Remove unused blocks 2004-05-19 08:45:46 +00:00
Ilia Alshanetsky
91e9545f4f Fixed bug #28228 (number_format() does not allow empty decimal separator). 2004-04-30 13:26:01 +00:00
Marcus Boerger
bc0373b880 Portable solution for bug #27646 that works correct on Windows, too 2004-03-27 00:50:41 +00:00
Marcus Boerger
3450ed948f -Make NAN and INF more portable (atof() doesn't work on MSVC.6 for example)
-Change test to use constants without prior conversion
2004-03-25 22:36:36 +00:00
Marcus Boerger
fdcff80c16 - Allow negative infinity
- Register missing constants, they work anyway but cause an E_NOTICE
# generation by atof() should be portable enough (afaik)
2004-03-23 22:30:25 +00:00
Ilia Alshanetsky
2a58fb80e7 Fixed Bug #25694 (round() and number_format() give inconsistent results). 2003-11-18 02:50:41 +00:00
foobar
3462761d2b typo 2003-09-26 09:56:24 +00:00
foobar
ef1c2d59a4 Test case for bug #25665 2003-09-26 09:55:56 +00:00
Ilia Alshanetsky
c23609efa7 Fixed paths in various tests. In certain conditions usage of partial file
paths results in test failures.
2003-08-18 22:57:49 +00:00
Ilia Alshanetsky
ac41c5db23 Added/improved tests for bugs 24142, 24063, 24951, 24980 2003-08-09 16:44:33 +00:00
Sterling Hughes
1ed8e46273 according to the notes in the bugs database, this is the correct result.
this result is also the same one given in 4.3.2 and 5.0
2003-06-26 03:21:45 +00:00
foobar
9aa14246d9 Fixed the expected result 2003-06-16 19:59:27 +00:00
Derick Rethans
cd5fd7eed7 - Added test for bug #24142 2003-06-16 17:50:07 +00:00
Moriyoshi Koizumi
6fc22aa5d9 Test name formatting 2003-01-23 19:07:25 +00:00
Wez Furlong
d8fbd1acef Fix Bug #21523 - number_format could cause a memory allocation for a
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
2003-01-09 15:44:49 +00:00
Marcus Boerger
24726b0c64 Conversion fix by Michael Mauch 2002-11-17 09:27:48 +00:00
Jason Greene
84bd2901c4 Add the ability to take the logarithm of any base by adding a base parameter
to log()
Added regression tests for the new form
2002-11-11 05:21:35 +00:00
Jason Greene
9e2a312f2e add test function for log()
# 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.
2002-11-11 03:45:04 +00:00
Sean Bright
114dff39ce Add missing ?> 2002-10-04 02:34:15 +00:00
Sascha Schumann
cfaffd2185 overflow check for _php_math_basetozval 2002-10-04 02:20:41 +00:00
Ilia Alshanetsky
0454bf2d0d Removed the ceil(-0.5); test. The return value is depedant on system's
libc and even when proper value '-0' is returned, var_dump() converts
it to 0 anyway.
2002-09-29 21:45:54 +00:00
Ilia Alshanetsky
0e7e7ae961 Corrected ceil(-0.5) output value, it is 0 not -0. 2002-09-29 19:21:10 +00:00
Sander Roobol
a15c9a31eb Added tests for pow()'ing with broken exponents and some additional test
for count()'ing arrays.
2002-03-21 14:18:30 +00:00
Derick Rethans
39225a22b8 - Fix tests to work with CLI
#- Not totally done, but this makes it a lot better
2002-03-05 09:00:56 +00:00
jim winstead
831473d76e Rename finite/isinf/isnan to more standard is_*() names. 2002-01-09 23:59:05 +00:00
jim winstead
461e105069 Fixed pow(), and added finite(), isinf(), and isnan(). Also fixed
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.
2002-01-05 03:45:11 +00:00
jim winstead
4b8f435b2a good grief, positive powers of 0 are well-defined. (code fix coming.) 2002-01-05 02:16:16 +00:00
Derick Rethans
6729156450 - Add test for floor and ceil 2001-12-22 11:52:56 +00:00
Derick Rethans
d578e05f96 Mail should go to php-dev 2001-12-16 13:04:02 +00:00
Rasmus Lerdorf
55d9b2ad9c Fix most of these tests - still think there is a bug in the long->float
conversion stuff somewhere
2001-11-13 13:12:46 +00:00
Jeroen van Wolffelaar
43b3da1396 Make math tests pass, round & co don't work this way, and there was an error
in expected output
2001-10-22 09:44:27 +00:00