Always false float comparisons
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 9 13:22:17 PDT 2016
On 5/9/2016 6:46 AM, Steven Schveighoffer wrote:
> I know this is a bit band-aid-ish, but if one is comparing literals to a float,
> why not treat the literal as the type being compared against? In other words,
> imply the 1.3f. This isn't integer-land where promotions do not change the outcome.
Because it's yet another special case, and we know where those lead. For
example, what if the 1.30 was the result of CTFE?
More information about the Digitalmars-d
mailing list