65536^3 ≠ 281474976710674
Seriously, try uploading a project that does 65536^3 and puts it in a variable. (It's actually 281474976710656.)
But that's what flash says. Offline scratch works much better, it goes accurately up to 10^60 or so, while the flash player only goes to 10^18. Could big number calculations in flash be improved?
(I guess this means my perlin noise doesn't work right)
Offline
Bump.
Offline
On 2.0 it worked right for me
How are computing the exponents? I'm doing 65536*65536*65536.
Offline
I'm using 1.4's old flash player, checking in a bit.
Offline
I think it is because you overflowed the variable:
a variable can go up to a certain number, like 2546274531 or something. Once it excedes that number, the number is then turned into weird numbers, like -0.565343435343545.
in this case, 35536^3 may have overflowed the variable.
Last edited by KrIsMa (2013-04-16 23:00:14)
Offline
KrIsMa wrote:
technoguyx wrote:
Might have to do with how Flash handles floating point numbers.
wait, how does 65536^3 have floating numbers?
isnt it all integers?
It's because the number is too big to represent as a binary integer so it represents it as a floating point. It takes the closest number to it that is in the form X * (2^Y)
Offline