Comment #0 by ilyayaroshenko — 2015-10-15T00:10:38Z
See debug code in https://github.com/D-Programming-Language/phobos/pull/3559 :
====
writeln("ttt ", [i, a, b, m, (a + b) / 2, (a + b) / 2.0, ], a <= m, m <= b);
====
produce text:
===
ttt [8, -5.50533e+307, 4.49423e+307, -8.08875e+307, -8.08875e+307, -8.08875e+307]truetrue
===
So, (-5.50533e+307 + 4.49423e+307) / 2.0 = -8.08875e+307, but it is wrong.
32 code on FreeBSD/Linux fails, but on OSX works fine.
Comment #1 by aliloko — 2015-10-15T14:41:51Z
I'm also encountering codegen problems since dmd >= 2.069-b1
Still working on reducing that.
Comment #2 by dlang-bugzilla — 2015-10-15T16:22:39Z
Comment #3 by ilyayaroshenko — 2015-11-15T00:22:37Z
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);
}
Comment #4 by ilyayaroshenko — 2015-11-15T00:23:22Z
(In reply to Vladimir Panteleev from comment #2)
> (In reply to Илья Ярошенко from comment #0)
> > See debug code in https://github.com/D-Programming-Language/phobos/pull/3559
>
> Can you post a self-contained test case here?
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);
}
Comment #5 by ilyayaroshenko — 2016-04-19T14:30:20Z
Fixed somehow O_o
Comment #6 by dlang-bugzilla — 2016-04-19T14:32:11Z
(In reply to Илья Ярошенко from comment #5)
> Fixed somehow O_o
Perhaps a duplicate of 15861 ?
Comment #7 by ilyayaroshenko — 2016-04-19T14:38:02Z
(In reply to Vladimir Panteleev from comment #6)
> (In reply to Илья Ярошенко from comment #5)
> > Fixed somehow O_o
>
> Perhaps a duplicate of 15861 ?
I don't know