On Fri, Jul 05, 2024 at 07:13:05PM -0700, Michael Cheponis wrote:
> sizeof(long double) reports 16 in both amd64 and arm64. I think that amd64
> uses 80-bit long double floats, and arm64 uses 128-bit long double floats.
> See enclosed code.
The storage size of a long double is one thing, but the exact format
used in calculations may vary.
On amd64:
> cc -dM -E - < /dev/null | fgrep LDBL_MANT
#define __LDBL_MANT_DIG__ 64
On aarch64:
> cc -dM -E - < /dev/null | fgrep LDBL_MAN
#define __LDBL_MANT_DIG__ 113
(use just LDBL in the fgrep to see more exact limits of the format in use)
Martin