On Wednesday, November 19, 2014 6:04:54 PM UTC-5, John Myles White wrote:
>
> This does not happen on my machine. Can you give more details about your 
> setup? 
>
> To be clear, 1/1 is a floating point number, which means that the whole 
> idea of doing == is dangerous. A safer comparison is the distance between 
> the values. I get the following: 


Nothing dangerous in this case.  1/1 will be exactly 1.0 in 
correctly-rounded floating point (i.e. IEEE), and as Stefan says, x * 1.0 
== x for all non-NaN floating-point values due to correct rounding.   Let's 
not elevate floating-point roundoff to the level of superstition.

(I can't reproduce the behavior reported by the original poster either.)

Reply via email to