OT: PHP 32 bit numbers security issue

OT: PHP 32 bit numbers security issue

Uri Even-Chen uri at speedy.net
Wed Jan 5 12:40:14 IST 2011


I hate floating point. if you search Google for 2^1023, you get this result:

2^1023 = 8.98846567 × 10^307

However if you search for 2^1024, you don't get a number at all.

Even if you search for 1.999999999999999*2^1023 you get a number, but
if you search for 1.9999999999999999*2^1023 you don't get a number at
all.

googol^3 returns a number; googol^4 doesn't return a number at all.
Even sqrt(googol^4) doesn't return a number at all.

Uri Even-Chen
Mobile Phone: +972-50-9007559
E-mail: uri at speedy.net
Website: http://www.speedy.net/




2011/1/5 Hetz Ben Hamo <hetzbh at gmail.com>:
> Hi,
> I just found something related to PHP and handling 32 bit numbers, I wrote
> about it here: http://goo.gl/xqQZd
> Thanks,
> Hetz
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>



More information about the Linux-il mailing list