On Monday, 18 November 2019 at 21:14:37 UTC, mipri wrote: >> double f; > > If this is changed to `real f;`, you get the desired result. > > real is also the type used for the comparison code: > https://dlang.org/spec/float.html#fp_const_folding Yes, it worked as expected. Thank you, Luiz.