[Issue 13474] Discard excess precision when returning double in x87 register
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Feb 15 22:50:53 PST 2015
https://issues.dlang.org/show_bug.cgi?id=13474
--- Comment #18 from yebblies <yebblies at gmail.com> ---
(In reply to Илья Ярошенко from comment #17)
> (In reply to yebblies from comment #15)
>
> Why you have changed the name of this issue?
> Bug is not only for return. Truncation should be during all calculations.
>
I changed the title because the old one was not accurate. The optimizer is
working as designed, even if that design is not what you want.
Please change the title if you want to request no extra intermediate precision
anywhere, I just kept it to the scope of the original report.
>
> Yes. D is unique language in this question.
> In other other words D is not a system language because it can't compile
> correctly IEEE 754 standard.
>
I'm not sure this counts as violating IEEE 754, though I'm not an expert. C
has the same problem, so I guess C isn't a system language either by that
logic.
> I am disappointed.
> All D contributors explain me that "it is a feature for precise math".
> But this feature prohibits price math:
> https://github.com/D-Programming-Language/phobos/pull/2513.
>
Maybe. The logic in here does seem sound, although again I'm not an expert.
http://dlang.org/d-floating-point.html
So the idea is that strict double rounding would be a big performance hit, and
> The problem is that value isn't "more price". The value is wrong because
> truncation should be performed during ALL calculation.
Technically the value _is_ more precise. The way it interacts with rounding is
what produces the incorrect result.
Under the current spec the rounding is not required.
>
> > 3. Lobbying Walter for a language change enforcing this in some way.
>
> Can you help me to do it?
>
I don't know enough about the algorithms you're using to be sure either you or
Walter is right here. You may want to comment on issue 9937 and see if Don
agrees with you.
--
More information about the Digitalmars-d-bugs
mailing list