[Issue 17160] Apparently faulty behavior comparing enum members using `is`

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 8 13:15:04 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17160

--- Comment #1 from Sophie <meapineapple at gmail.com> ---
This issue seems not to occur when using `enum Enum: real` instead of double.

>From IRC:

<skl> hmm it does a byte comparison but they differ, one is 00D0CC... the other
is CDCCCCCC...
<adam_d_ruppe> i am guessing that the enum treats it more like a literal than
the variable does so it gets imprecise passed to functions
<skl> it stores the literial enum value as a real 80-bit floating point number
<skl> but it looks like it passes a double into the function

--


More information about the Digitalmars-d-bugs mailing list