Bug #16593 Updated: x^y gives unusual results

From: Date: Sun, 14 Apr 2002 09:31:13 +0000
Subject: Bug #16593 Updated: x^y gives unusual results
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4944@lists.php.net to get a copy of this message
ID: 16593 Updated by: sander@php.net Reported By: paul@keteracel.com -Status: Open +Status: Bogus Bug Type: *Math Functions Operating System: Win XP PHP Version: 4.1.2 New Comment: ^ is the XOR operator, not the exponential operator. Use pow() for that. Previous Comments: ------------------------------------------------------------------------ [2002-04-14 02:17:34] paul@keteracel.com x^y should always yield a positive number, however when doing -2^2 and (-2)^2, I get a result of -4! Surely this aint right? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16593&edit=1

« previous php.bugs (#4944) next »