Writing documentation for my trivial implementation of the extended real number line in Gerbil Scheme, I realized my base case was wrong for (xreal-min), returning negative infinity instead of positive infinity. I was not just wrong—I was INFINITELY wrong.
vyzo remarked that Scheme already has +inf.0 and -inf.0 (why .0 ???) as IEEE numbers representing infinity on the extended real line. So I used that. < and <= work, but I had to fix min and max (with wrappers xmin and xmax) to do the right thing for the empty case. Sigh.
-
-
I assume because the .0 suffix means it cannot be lexed as a identifier, but agree it looks funny to me too.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!