#24415 [Com]: pi() and M_PI return float(3)

From: Date: Mon, 30 Jun 2003 19:22:37 +0000
Subject: #24415 [Com]: pi() and M_PI return float(3)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42909@lists.php.net to get a copy of this message
ID: 24415 Comment by: php dot net at siniath dot net Reported By: postings-php-bug at hans-spath dot de Status: Bogus Bug Type: Math related Operating System: Windows XP PHP Version: 5.0.0b1 (beta1) New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2003-06-30 13:38:20] sterling@php.net 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

« previous php.bugs (#42909) next »