Real.maxFinite bug

Stephen Weeks MLton@sourcelight.com
Wed, 3 Oct 2001 15:03:58 -0700


> The other, and, as you note, orthogonal issue is the Real.maxFinite and
> Real.min* constants.  I'm proposing defining them like
> 
> val maxFinite = let
> 		  val maxFiniteBytes : Word8.word 
>                     = Word8Vector.fromList [...]
>                 in
>                   PackReal.fromBytes maxFiniteBytes
>                 end

This is fine by me.  I guess Henry was mentioning another alternative, which is
to leave them as primitives throughout compilation, and spit out the right stuff
in the backend.  Maybe it's better to put the nonportable stuff in the compiler
as opposed to the basis code, but I have no strong feeling, and we're already so
non-portable in so many ways.

One other tradeoff is that in your approach above, maxFinite will not be
globalized, and will hence have to be stored in closure records, while if it is
kept as a primitive, then it will not.