The pow() regression test is failing due to this strange characteristic:

<?
        $a[] = 2147483646;
        $a[] = pow(2147483646,1);

        $a[] = 2147483647;
        $a[] = pow(2147483647,1);

        $a[] = 2147483648;
        $a[] = pow(2147483648,1);

        var_dump($a);
?>

Produces:

array(6) {
  [0]=> int(2147483646)
  [1]=> int(2147483646)

  [2]=> int(2147483647)
  [3]=> float(2147483647)

  [4]=> float(2147483648)
  [5]=> float(2147483648)
}

ie. pow(2147483647,1) returns a float where one would expect it to return 
an int.  Off by one error somewhere?

Same thing happens on the negative boundary.

-Rasmus


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to