RFC: std.json sucessor

Don via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 26 03:55:19 PDT 2014


On Tuesday, 26 August 2014 at 07:34:05 UTC, Ola Fosheim Gr wrote:
> On Tuesday, 26 August 2014 at 07:24:19 UTC, Don wrote:
>> Processors from AMD have signalling NaN behaviour which is 
>> different from processors from Intel.
>>
>> And the situation is worst on most other architectures. It's a 
>> lost cause, I think.
>
> I disagree. AFAIK signaling NaN was standardized in IEEE 
> 754-2008.
> So it receives attention.

It was always in IEEE754. The decision in 754-2008 was simply to 
not remove it from the spec (a lot of people wanted to remove 
it). I don't think anything has changed.

The point is, existing hardware does not support it consistently. 
It's not possible at reasonable cost.

---
real uninitialized_var = real.snan;

void foo()
{
   real other_var = void;
   asm {
      fld uninitialized_var;
      fstp other_var;
   }
}
---

will signal on AMD, but not Intel. I'd love for this to work, but 
the hardware is fighting against us. I think it's useful only for 
debugging.



More information about the Digitalmars-d mailing list