Re: Double implicitly converted to real

2011-11-03 Thread bearophile
Charles McAnany Wrote: > I noticed that one of the guarantees in TDPL is that any code that is valid > in both C > and D should compile with the same result. This is almost true (there are few differences, in D fixed-size arrays are managed by value instead of by pointer, and global floating po

Re: Double implicitly converted to real

2011-11-03 Thread deadalnix
Le 03/11/2011 15:39, Charles McAnany a écrit : Hi. I noticed that one of the guarantees in TDPL is that any code that is valid in both C and D should compile with the same result. But I'm seeing a different behavior here. I'm trying to find the smallest double for which the comparison x+1/x = x

Double implicitly converted to real

2011-11-03 Thread Charles McAnany
Hi. I noticed that one of the guarantees in TDPL is that any code that is valid in both C and D should compile with the same result. But I'm seeing a different behavior here. I'm trying to find the smallest double for which the comparison x+1/x = x is true. I take a number way too small, and a n