NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Error in returned value of sizeof(long double) in amd64?
On Sat, Jul 06, 2024 at 12:01:10PM -0700, Michael Cheponis wrote:
> Thank you.
>
> We, then, in effect, are carrying around 'dead bytes' on amd64, for, reason?
>
> That is, what is the 'win' in doing this ?
>
> This is of no consequence for a handful of long doubles, but big arrays of
> long double....
>
> (This is just curiosity; I have found exactly one scientific calculation I
> needed to do whose precision improved using long doubles, a satellite
> orbital prediction over very long times)
(I am not a x86/amd64 expert and haven't followed lates architectures
closely, so take with a grain of salt)
There would be two options to do it differently on amd64:
- make long double use emulation (i.e. don't use the FPU at all)
- create a strange 12 (or maybe only 10) byte IEEE754 storage format
The former would make long double unreasonabley slow while the latter would
break alignment restrictions for some instructions.
Maybe one of the next generations of the instruction set gets a reasonable
FPU mode to do better long doubles.
Martin
Home |
Main Index |
Thread Index |
Old Index