Coldfusion Errors December 17, 2006 6:52 AM   Subscribe

ColdFusion fun: 1.0000000000000002 must be within range: (-1 : 1)
posted by Civil_Disobedient to Bugs at 6:52 AM (22 comments total)

Found when looking at a user page (at bottom).
posted by Civil_Disobedient at 6:52 AM on December 17, 2006


It must be within that range somewhere. Keep looking.
posted by scottreynen at 7:12 AM on December 17, 2006 [1 favorite]


theora55 pointed the error out previously; apparently it's been an issue for a while.
posted by Mitheral at 7:29 AM on December 17, 2006


matt, just subtract .0000000000000098 from everything.
posted by quonsar at 7:35 AM on December 17, 2006


anastasiav has the same error and thinks it's a problem with the user near me code.
posted by Mitheral at 7:36 AM on December 17, 2006


And you guys live near each other, actually.
posted by jessamyn (staff) at 8:00 AM on December 17, 2006


yeah, there's some huge math function to determine users near me and for some reason, a few people in the northeast end up making it divide by zero or something.

I'll see if I can trap that error and make it go away for now.
posted by mathowie (staff) at 8:29 AM on December 17, 2006


a few people in the northeast end up making it divide by zero

damn yankees.
posted by sonofslim at 8:45 AM on December 17, 2006


And you guys live near each other, actually.

That's why I even noticed.
posted by Civil_Disobedient at 9:53 AM on December 17, 2006


Matt, do you recognize that there is a difference between 1.0000000000000002 dollars and 1.0000000000000002 cents?
posted by arcticwoman at 10:05 AM on December 17, 2006


yes, but he does not recognize that there's a difference between exceeding an allowable range by .0000000000000002 and dividing by zero.
posted by quonsar at 10:36 AM on December 17, 2006


Math owie.
posted by chrismear at 11:09 AM on December 17, 2006 [2 favorites]


yes, but he does not recognize that there's a difference between exceeding an allowable range by .0000000000000002 and dividing by zero.

He said divide by zero or something
posted by delmoi at 11:16 AM on December 17, 2006 [1 favorite]


This is just your garden variety floating point confusion. Notice that there are 15 zeros, so the .2 is in the 16th place. Also remember that a standard IEEE 754 double can only represent approximately 15 digits of precision. So this value is really 1.0, and the 2 on the end is a rounding error that came up because of flawed algorithms. The flaw is doing things like "if (a - b) = 0" when dealing with floating point values. You have to change that to "if (a - b) < (smallest representable number in the precision used, epsilon).br>
What Every Computer Scientist Should Know About Floating-Point Arithmetic

It's amazing how little people actually know about how floating point math works.
posted by Rhomboid at 11:43 AM on December 17, 2006 [2 favorites]


MetaTalk: divide by something
posted by Ceiling Cat at 12:36 PM on December 17, 2006


This is just your garden variety floating point confusion.

GEEEEEEEEEEEK.
posted by chrismear at 1:58 PM on December 17, 2006 [1 favorite]


Almost there! Keep trying!
posted by armoured-ant at 2:04 PM on December 17, 2006


GREEEEEEEK?
posted by chrismear at 2:14 PM on December 17, 2006


Col' fusion?
posted by interrobang at 2:17 PM on December 17, 2006


Yep, this bug has been around for a while. Presumably it only happens to a few accounts, otherwise I suspect there would be more complaints.
posted by RichardP at 2:52 PM on December 17, 2006


fixed!
posted by mathowie (staff) at 3:55 PM on December 17, 2006


Gotta love those easy-to-fix bugs.
posted by Civil_Disobedient at 11:08 AM on December 18, 2006


« Older Can we number favorites pages?   |   Browser affected by Metafilter post Newer »

You are not logged in, either login or create an account to post comments