Mercury Bugs - mercury
View Issue Details
0000147mercuryBugpublic2010-05-25 13:302010-05-25 13:30
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000147: NaN behaviour
DescriptionFrom the BUGS file:


Subject: NaN behaviour
Date: Mon, 21 Oct 2002 21:02:00 +1000

The mercury standard library tends to avoid producing NaN (e.g. throwing
an exception in many places where libc would return NaN), but it's still
possible from arithmetic functions (e.g. 0.0*Inf, Inf - Inf, Inf + -Inf,
Inf / Inf), sin,cos,tan when passed infinity, and perhaps other things (I
haven't done a full search). Presumably it can also arise from using the
foreign language interface.

When NaN does arise, we have a problem that `=' (and unification) aren't
reflexive. From a logical point of view, this is a fairly serious problem.

A lesser problem is that `<' doesn't induce a total order on floats.
TagsNo tags attached.
Attached Files

There are no notes attached to this issue.

Issue History
2010-05-25 13:30juliensfNew Issue