OT: floats
Timon Gehr
timon.gehr at gmx.ch
Sat May 25 06:52:56 UTC 2024
On 5/25/24 00:21, Walter Bright wrote:
> On 5/24/2024 4:51 AM, Timon Gehr wrote:
>> (E.g, D's specified floating-point semantics are completely insane,
>
> I presume you are talking about doing intermediate computations as 80
> bit floats. This was inevitable with the x86 prior to XMM. With XMM,
> floats and doubles are evaluated with XMM instructions that do 32/64 bit
> respectively.
>
It was avoidable, as even the x87 allows controlling the mantissa size
(which is insufficient but "more" correct) or flushing floats and
doubles to memory.
D compilers are allowed by the spec e.g. to use 64-bit XMM registers to
compute with 32-bit float intermediates, with incorrect rounding behavior.
More information about the dip.development
mailing list