#24415 [Opn->Asn]: pi() and M_PI return float(3) - AGAIN

From: Date: Mon, 07 Jul 2003 15:18:15 +0000
Subject: #24415 [Opn->Asn]: pi() and M_PI return float(3) - AGAIN
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-43375@lists.php.net to get a copy of this message
ID: 24415 Updated by: sniper@php.net Reported By: postings-php-bug at hans-spath dot de -Status: Open +Status: Assigned Bug Type: Math related Operating System: Windows XP PHP Version: 5.0.0b1 (beta1) -Assigned To: +Assigned To: edink New Comment: This is due to some funky build problem Edin has, assigning to him. Previous Comments: ------------------------------------------------------------------------ [2003-07-01 12:29:06] postings-php-bug at hans-spath dot de It'm really pissed off now! What about setting the bug to "Feedback" instead of "Bogus", hu? Yes, my results are very strange, but I use *your* Builds and get different results on the same machine (Windows XP (German)). AND a friend of mine can reproduce this under Windows 2000 SP3 (German). I use similar INIs for all 4 versions. Same Problem with CGI and CLI. Problem exists in (WIN) PHP 5.0.0b1 (cgi-fcgi) (built: Jun 28 2003 00:31:05) (WIN) PHP 5.0.0b2-dev (cgi-fcgi) (built: Jul 1 2003 12:10:02) (WIN) PHP 5.0.0b2-dev (cgi-fcgi) (built: Jul 1 2003 16:10:06) But NOT in (WIN) PHP 5.0.0b2-dev (cgi-fcgi) (built: Jun 30 2003 13:41:33) (LINUX) PHP 5.0.0b2-dev (php5-200307011530.tar.bz2) ===> PHP 5.0.0b2-dev (php5-win32-200307011430.zip) <=== M:\php>echo "<? var_dump(M_PI);var_dump(pi()); ?>" | 500dev200307011430\php -q "float(3) float(3) " ===> INI, precision <=== M:\php>grep -e "^precision" 500dev200307011430\php.ini precision = 14 ===> INI, diff <=== M:\php>diff 500dev200306301130\php.ini 500dev200307011030\php.ini 377c377 < extension_dir = "m:/php/500dev200306301130/extensions/" --- > extension_dir = "m:/php/500dev200307011030/extensions/" 778c778 < session.save_path = "m:/php/500dev200306301130/session" --- > session.save_path = "m:/php/500dev200307011030/session" ------------------------------------------------------------------------ [2003-07-01 11:32:32] sniper@php.net Works fine: # php -r 'var_dump(pi());' float(3.1415926535898) Check your php.ini settings...precision especially. ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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/24415 -- Edit this bug report at http://bugs.php.net/?id=24415&edit=1

« previous php.bugs (#43375) next »