On Sat, 07 Feb 2015 21:33:46 +0000, Kenny wrote:

> The above code snippet works correctly when I use LDC compiler (it finds
> expected 'f' value and prints it to console). I'm wondering is it a bug
> in DMD?

nope, this is a bug in your code. compiler (by the specs) is free to 
perform intermediate calculations with any precision that is not lower 
than a highest used type (i.e. not lower that `float`'s one for `while` 
condition (`f + eps != f`). it may be even infinite precision, so your 
code may not exit the loop at all.

Attachment: signature.asc
Description: PGP signature

Reply via email to