🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #88

Re: Taking hypot(3) To The Edge

#88
From: MitchAlsup
Date: Tue, 13 Oct 2026 21:33
42 lines
2541 bytes
Michael S <already5chosen@yahoo.com> posted:

> On Thu, 1 Oct 2026 10:17:57 +0200
> David Brown <david.brown@hesbynett.no> wrote:
> 
> > On 01/10/2026 03:33, bart wrote:
> > > On 01/10/2026 01:47, Lawrence D’Oliveiro wrote:
> > >   
> > >> A couple of things stand out immediately: one is that the “long
> > >> double” type doesn’t seem to make use of all the 128 bits it
> > >> occupies. I was expecting a mantissa length closer to 100 bits,
> > >> but it’s nowhere near that.  
> > > 
> > > Probably it uses Intel's 80-bit x87 FPU format. That uses a 64-bit 
> > > mantissa (with explicit top bit).
> > >   
> > 
> > Yes, that's the default for "long double" in the standard x86-64 ABI.
> > 
> > On 32-bit x86, these 10-byte doubles were often stored in 12-byte 
> > (96-bit) containers for better alignment, but I don't know the ABI 
> > standards here.
> > 
> > On 64-bit x86, for better alignment they are stored in 16-byte 
> > containers.  The rest of the space will be padding.
> > 
> > gcc supports "-mlong-double-64", "-mlong-double-80" and 
> > "-mlong-double-128" flags.
> 
> The latter appears to be a default on ARM64 Linux.

I personally have not seen an extended FP format supported for a long time
{20 years)--yes, x86 still gives lip service to then, but "support is iffy"
at best.

For example, I have eXcel from 2003, and on AMD machines I get 80-bit
precision (when real careful in eXcel math)--but those same programs 
on Intel and Arm display 64-bit precision.

I think looking forward, one should anticipate long double being 128-bits
rather than 80-bits.
Technical Details
Message-ID: <1791927203-5857@newsgrouper.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
References: <119kaj9$npbg$1@dont-email.me> <119kd8g$opnp$1@dont-email.me> <119l4vl$t831$2@dont-email.me> <20261001141212.00002f20@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
From: MitchAlsup <user5857@newsgrouper.org.invalid>
Newsgroups: comp.arch
Subject: Re: Taking hypot(3) To The Edge
References: <119kaj9$npbg$1@dont-email.me>
 	<119kd8g$opnp$1@dont-email.me>
 	<119l4vl$t831$2@dont-email.me> <20261001141212.00002f20@yahoo.com>
Date: Tue, 13 Oct 2026 21:33:23 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <1791927203-5857@newsgrouper.org>
Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user5857
Injection-Date: Tue, 13 Oct 2026 21:33:23 GMT
User-Agent: Newsgrouper/0.9.0