[racket] "error: degrees->complex: 360.0"

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon May 12 23:12:51 EDT 2014

Right. Probably there is a better fix, but the essential problem, as I
understand it, is that there are more floating points between 0 and 1
than between any two other integers and the code made the assumption
that that didn't happen....

The basic desire is to turn a real number into a number in [0,360)
such that the result represents the same number in degrees but is
normalized somehow.

Robby

On Mon, May 12, 2014 at 10:06 PM, Danny Yoo <dyoo at hashcollision.org> wrote:
> Wow.  Floating point really is nasty.  I see how it might have happened now.
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>> -0.0000000000000001
> -1e-16
>> (+ 360 -1e-16)
> 360.0
>>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Posted on the users mailing list.