diff options
author | Pierre Joye <pajoye@php.net> | 2009-05-29 08:18:42 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2009-05-29 08:18:42 +0000 |
commit | 2e41430516ba612067f2a617a4b7db23d5084219 (patch) | |
tree | 9d0264d14ce9b7b5e655efb96baf8049a7cbd43c /Zend/tests/bug42143.phpt | |
parent | 9230362631d21d0a4db77236477fd7331ee50cee (diff) | |
download | php-git-2e41430516ba612067f2a617a4b7db23d5084219.tar.gz |
- MFB: #42143, the constant NAN is reported as 0 on Windows
Diffstat (limited to 'Zend/tests/bug42143.phpt')
-rw-r--r-- | Zend/tests/bug42143.phpt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Zend/tests/bug42143.phpt b/Zend/tests/bug42143.phpt new file mode 100644 index 0000000000..8a73d41bf8 --- /dev/null +++ b/Zend/tests/bug42143.phpt @@ -0,0 +1,38 @@ +--TEST-- +bug #42143 (The constant NAN is reported as 0 on Windows build) +--CREDITS-- +Venkat Raman Don +--FILE-- +<?php +echo "Testing NAN:\n"; +echo "NAN= "; +var_dump(NAN); +var_dump(tan(-1) == 123); +var_dump(cos(-100) == "PHP String"); +var_dump(deg2rad(-5.6) == null); +var_dump(sqrt(-0.1) == false); +var_dump(sqrt(cos(M_PI)) == 0.1); +var_dump(NAN); +var_dump(is_nan(sqrt(-1.005)) == false); +var_dump(is_nan(floor(1)) == true); +var_dump(log10(-1) == log(-1)); +var_dump(log10(-1) != log10(-1)); +var_dump(is_finite(log10(-1)) == false); +var_dump(NAN == NAN); +?> +--EXPECT-- +Testing NAN: +NAN= float(NAN) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +float(NAN) +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +bool(false) + |