View Single Post
  #1  
Old 03-12-2010, 08:50 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
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.
Reply With Quote