On Sunday, 25 February 2018 at 14:52:19 UTC, Steven Schveighoffer wrote:

1 == 1.0, no?

no. at least, not when a language forces you to think in terms of types.

1 is an int.
1.0 is a floating point.

I admit, I've never printed output without using format specifiers, but still, if I say write(1.0), it should not go off and print what looks to me, like an int.

Inheriting crap from C is no excuse ;-)

and what's going on here btw?

assert( 1 == 1.000000000000000001 ); // assertion error in DMD but not in LDC
assert( 1 == 1.0000000000000000001 );  // no assertion error??

(compiled in 64bit mode)

Reply via email to