A Philosophy of Software Design
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Tue Jun 30 04:05:40 UTC 2026
On 30/06/2026 7:54 AM, Walter Bright wrote:
> On 6/28/2026 12:31 PM, FinalEvilution wrote:
>> I'd just like to note that there are floating point hardware exceptions
>
> True, but pretty much nobody enables that.
About that...
I've been thinking about a check specifically for this.
Initially I thought about a read barrier, but that would be too costly.
If however, there was a flag that was set in the ISA that we could read,
then we could inject a check at the end of any expression (according to
statements), if they contain a float.
```d
float n;
if (n * 2 > 0) // auto _tmp = n * 2 > 0, !isnanflagset ||
_d_nanfoundcheck, _tmp
```
More information about the Digitalmars-d
mailing list