On Saturday, 9 February 2019 at 02:46:52 UTC, Murilo wrote:
But I used the type double in D which is supposed to be only 64 bits long and not 80 bits long, the type real is the one which is supposed to be 80 bits long. Right?

Right, BUT the compile time stuff is done before that.

double a = 1.0 * 2.0;

The 1.0*2.0 is done as real inside the compiler, then the *result* is assigned to the 64 bit double.

Whereas in a C++ compiler, that would be done 64 bit throughout. So the different intermediate rounding can give a different result.

(The `real` thing in D was a massive mistake. It is slow and adds nothing but confusion.)

Reply via email to