How many bytes in a real ?

Guillaume Chatelet via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 24 15:29:27 PDT 2015


On Monday, 24 August 2015 at 22:08:03 UTC, Guillaume Chatelet 
wrote:
> On Monday, 24 August 2015 at 21:58:48 UTC, rsw0x wrote:
>> On Monday, 24 August 2015 at 21:55:40 UTC, Guillaume Chatelet 
>> wrote:
>>> On linux x86_64 : real.sizeof == 16 but it looks like only 
>>> the first the first 10 bytes are used (ie. 80bits)
>>>
>>> Is there a way to know the real size of a real ?
>>
>> http://dlang.org/type.html
>> 	largest FP size implemented in hardwareImplementation Note: 
>> 80 bits for x86 CPUs or double size, whichever is larger
>
> Yep I found this, I'd like to know this information at compile 
> time.

I actually found another way(1) but if someone knows how to get 
this information at compile time I'm still interested. Thx !

1. https://github.com/D-Programming-Language/dmd/pull/4952


More information about the Digitalmars-d mailing list