I can confirm that 1838 appears to fix this. I now see the following responses, for x and y as before:
y < x; (* false *) x < y; (* false *)
Phil
25/08/13 22:57, Phil Clayton wrote:
Interesting. Things looked all right when I double-checked this:
val a = 0.999999999999999722444243843710864894092082977294921874 val m = 0.999999999999999722444243843710864894092082977294921875 val b = 0.999999999999999722444243843710864894092082977294921876 ; a < b; (* true *) a < m; (* true *) b < m; (* false *) m < b; (* false *)
(* So we have a < m = b *)
However, when I tried your value for a, it doesn't work. I think the problem can be reduced to:
val x = 0.99999999999999972244424384371086489409208297729492187 val y = 0.999999999999999722444243843710864894092082977294921874 ; y < x; (* true *)
Phil
25/08/13 19:50, Florian Weimer wrote:
I noticed this:
Poly/ML 5.5.1 Development
val a = 0.99999999999999972244424384371086489409208297729492187;;
val a = 1.0: real
val b = 0.999999999999999722444243843710864894092082977294921876;;
val b = 1.0: real
a < b;;
val it = false: bool
a > b;;
val it = false: bool
So both values are equal according to Poly/ML. But the correct conversion for the first one is (in hexadecimal floating point notation) 0x1.ffffffffffffdp-1, and for the second 0x1.ffffffffffffep-1, so the values should be different. _______________________________________________ polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml