#49214 [Com]: Print floating

From: Date: Tue, 11 Aug 2009 07:05:16 +0000
Subject: #49214 [Com]: Print floating
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-140897@lists.php.net to get a copy of this message
 ID:               49214
 Comment by:       sjoerd-php at linuxonly dot nl
 Reported By:      leeja120 at gmail dot com
 Status:           Open
 Bug Type:         Output Control
 Operating System: windows xp
 PHP Version:      5.2SVN-2009-08-10 (snap)
 New Comment:

Thank you for your report.

The behavior you describe, although it is somewhat strange, is not a
bug. It is documented:

"If PHP encounters a number beyond the bounds of the integer  type, it
will be interpreted as a float instead."

"The size of a float is platform-dependent, although a maximum of
~1.8e308 with a precision of roughly 14 decimal digits is a common value
(the 64 bit IEEE format)."


Previous Comments:
------------------------------------------------------------------------

[2009-08-10 20:49:09] leeja120 at gmail dot com

Description:
------------
Print floating

Reproduce code:
---------------
<?PHP

echo 946744073709551614;

?>

Expected result:
----------------
946744073709551614

Actual result:
--------------
946744073709550000


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49214&edit=1



Thread (3 messages)

« previous php.bugs (#140897) next »