Handling big FP numbers

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Feb 9 03:14:47 UTC 2019

On Sat, Feb 09, 2019 at 02:54:18AM +0000, Adam D. Ruppe via Digitalmars-d-learn wrote:
> (The `real` thing in D was a massive mistake. It is slow and adds
> nothing but confusion.)

Yeah, it is also the only variable-width built-in type in D, which makes
it a wart in an otherwise elegant system of fixed-width types.

And 80-bit extended precision is non-standard and non-conformant to IEEE
754, and who other than Intel engineers can tell how it behaves in
corner cases?

It also causes std.math to make a laughing stock of D, because the
majority of math functions implicitly convert to real and cast the
result back to the source type, thus representing a hidden performance
cost even if the caller explicitly used float precisely to reduce the
cost of computing at a higher precision. And it prevents the optimizer
from, e.g., taking advantage of SSE instructions for faster computation
with float/double.


If lightning were to ever strike an orchestra, it'd always hit the conductor first.

More information about the Digitalmars-d-learn mailing list