August 5th, 2002, 09:45 AM
x1 = t2 ^ m;
-> resulting in: -1846460873
(t2 and m are variables, i just used the values where the problem occures)
when i convert this to php:
$x1 = $t2 ^ $m;
echo "<br>".$t2." XOR ".$m." = ".$x1;
the result is: -959077478
does anyone know why those 2 values are diffrent ?
is there a problem with the length of the numbers (if yes how can i solve it)
August 12th, 2002, 01:58 PM
I'm not a pro at this, but I'd say your problem is with the floating point precission of integers... those are large numbers you're throwing around, and when you raise one to the other, it's getting huge... Don't know how exactly to solve that...
Perhaps look up a better algorithm using google?
August 12th, 2002, 02:17 PM
thanks again on that one...
i thought so myself.
i used a different server an there it worked (it also did on my old test server back home).
so i kinda solved the problem by avoiding it *g*