Always false float comparisons
Iain Buclaw via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 16 02:54:51 PDT 2016
On 16 May 2016 at 10:52, Ola Fosheim Grøstad via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Monday, 16 May 2016 at 08:47:03 UTC, Iain Buclaw wrote:
>>
>> But you *didn't* request coercion to 32 bit floats. Otherwise you would
>> have used 1.30f.
>
>
> const float f = 1.3f;
> float c = f;
> assert(c*1.0 == f*1.0); // Fails! SHUTDOWN!
>
>
Your still using doubles. Are you intentionally missing the point?
More information about the Digitalmars-d
mailing list