Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   Strange Number/Rounding Issues (https://forums.graalonline.com/forums/showthread.php?t=134258361)

WhiteDragon 03-12-2010 08:50 PM

Strange Number/Rounding Issues
 
I've been working with small numbers recently, and I've come across this issue:
PHP Code:

echo(0.0009 == 0.0008); // 1 

Seemed like a simple precision issue at first... but:
PHP Code:

echo(0.00091 == 0.00080); // 0
echo(0.00091 == 0.00081); // 0
echo(0.000911 == 0.000812); // 1 

I have no idea what the pattern is, but it is currently giving me a lot of trouble.


All times are GMT +2. The time now is 01:16 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.