2024-11-24 09:14 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000147mercuryBugpublic2010-05-25 13:30
Reporterjuliensf 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusnewResolutionopen 
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

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2010-05-25 13:30 juliensf New Issue
+Issue History