Re: real.sizeof

2024-02-05 Thread Dom DiSc via Digitalmars-d-learn
On Monday, 5 February 2024 at 17:28:38 UTC, Iain Buclaw wrote: Padding. x86 ABI prefers things to be aligned, so on x86 it's 12 bytes, x86_64 16 bytes. In both cases you don't get any extra precision over the 80-bits that x87 gives you. This is exactly what I mean. The ABI may pad it, but

Re: real.sizeof

2024-02-05 Thread Iain Buclaw via Digitalmars-d-learn
On Monday, 5 February 2024 at 16:45:03 UTC, Dom DiSc wrote: Why is real.sizeof == 16 on x86-systems?!? Its the IEEE 754 extended format: 64bit mantissa + 15bit exponent + sign. It should be size 10! I mean, alignment may be different, but why wasting so much memory even in arrays? Padding

Re: real.sizeof

2024-02-05 Thread Paul Backus via Digitalmars-d-learn
On Monday, 5 February 2024 at 16:45:03 UTC, Dom DiSc wrote: Why is real.sizeof == 16 on x86-systems?!? Its the IEEE 754 extended format: 64bit mantissa + 15bit exponent + sign. It should be size 10! I mean, alignment may be different, but why wasting so much memory even in arrays? According