Re: How to describe this bug?

On July 10, 2012 10:39:41 Colin Adams wrote:
Sure they would be better modelled that way, but the whole point of using floating point arithmetic is to sacrifice accuracy for performance, is it not?
True. I just find it interesting that some types have a builtin Nothing value. Some further examples are pointer (where NULL is Nothing) and clamped/saturation arithmetic (where min and max values are Nothing). It would be nice if somehow they could be unified at the top level without the performance penalty associated with a genuine Maybe value. Another possibility might be to consider NaN to encode bottom in Float#. When you constructed Float from Float# with a NaN it would give bottom. Would the existance of unboxed lifted types be a problem? Cheers! -Tyson
participants (1)
-
Tyson Whitehead