ID:               45854
 User updated by:  olivarra1 at hotmail dot com
 Reported By:      olivarra1 at hotmail dot com
 Status:           Open
 Bug Type:         Math related
 Operating System: Windows XP Professional
-PHP Version:      5.2CVS-2008-08-18 (CVS)
+PHP Version:      5.2.1
 New Comment:

version was 5.2.1, not 5.2CVS-2008-08-18 (CVS)


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

[2008-08-18 15:53:16] olivarra1 at hotmail dot com

Description:
------------
For too big numbers, intval returns a negative value

Reproduce code:
---------------
<?php
  $a = 25 * pow(1.5, 50);
  echo $a."<br>";
  echo intval($a)."<br>";

  echo "<br>";

  $a = 10 * pow(1.5, 60);
  echo $a."<br>";
  echo intval($a)."<br>";
?>

Expected result:
----------------
15940537505.4
15940537505

367684687169
367684687169

Actual result:
--------------
15940537505.4
-1239331679

367684687169
-1682500287


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


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

Reply via email to