ID: 24415
Updated by: [EMAIL PROTECTED]
Reported By: postings-php-bug at hans-spath dot de
-Status: Open
+Status: Bogus
Bug Type: Math related
Operating System: Windows XP
PHP Version: 5.0.0b1 (beta1)
New Comment:
Works fine:
# php -r 'var_dump(pi());'
float(3.1415926535898)
Check your php.ini settings...precision especially.
Previous Comments:
------------------------------------------------------------------------
[2003-07-01 06:57:24] postings-php-bug at hans-spath dot de
===> PHP 5.0.0b1 (beta1) <===
M:\php>echo "<? var_dump(M_PI);var_dump(pi()); ?>" | 500b1\php -q
"float(3)
float(3)
"
===> PHP 5.0.0b2-dev (php5-win32-200306301130.zip) <===
M:\php>echo "<? var_dump(M_PI);var_dump(pi()); ?>" |
500dev200306301130\php -q
"float(3.1415926535898)
float(3.1415926535898)
"
===> PHP 5.0.0b2-dev (php5-win32-200307011030.zip) <===
M:\php>echo "<? var_dump(M_PI);var_dump(pi()); ?>" |
500dev200307011030\php -q
"float(3)
float(3)
"
------------------------------------------------------------------------
[2003-06-30 14:27:14] postings-php-bug at hans-spath dot de
Ok, I've tested one of the CVS-snaps, and it worked. So I think it's
"closed" now and not "bogus".
M:\php\php5-win32-200306301130>echo "<? var_dump(array(M_PI,pi())); ?>"
| php -q
"array(2) {
[0]=>
float(3.1415926535898)
[1]=>
float(3.1415926535898)
}
------------------------------------------------------------------------
[2003-06-30 14:22:36] php dot net at siniath dot net
Tested on Win2k SP3, fails exactly as described by reporter:
C:\PHP\5.0.0b1>echo "<? var_dump(array(M_PI,pi())); ?>" | php -q
"array(2) {
[0]=>
float(3)
[1]=>
float(3)
}
"
Definitely not bogus.
------------------------------------------------------------------------
[2003-06-30 13:38:20] [EMAIL PROTECTED]
Tested on Windows and Linux, works on both.
------------------------------------------------------------------------
[2003-06-30 11:54:44] postings-php-bug at hans-spath dot de
Description:
------------
Yeah right. PI = 3 ... given a big enough 3 and a small enough pi ...
Reproduce code:
---------------
<? var_dump(array(M_PI,pi())); ?>
Expected result:
----------------
M:\php>echo "<? var_dump(array(M_PI,pi())); ?>" | 431\php -q
"array(2) {
[0]=>
float(3.1415926535898)
[1]=>
float(3.1415926535898)
}
"
Actual result:
--------------
M:\php>echo "<? var_dump(array(M_PI,pi())); ?>" | 500b1\php -q
"array(2) {
[0]=>
float(3)
[1]=>
float(3)
}
"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24415&edit=1