critical wrong code

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Sat Nov 14 16:50:28 PST 2015


This code fails on 32 bit Linux / FreeBSD.
It is very dangerous bug.
Please pay attention to it!

```
unittest {
     double a, b;
         a = -5.50533e+307;
         b = 4.49423e+307;
     writefln("a = %a, b = %a, (a+b)/2.0 = %a", a, b, (a+b)/2.0);
     assert((a+b)/2.0 > a);
}
```
issue: https://issues.dlang.org/show_bug.cgi?id=15204


More information about the Digitalmars-d mailing list