Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #118592

Re: Taking hypot(3) To The Edge

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 2026-10-13 21:33 +0000
Message-ID <1791927203-5857@newsgrouper.org> (permalink)

Show all headers | View raw


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.

Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Taking hypot(3) To The Edge Michael S <already5chosen@yahoo.com> - 2026-10-01 14:12 +0300
  Re: Taking hypot(3) To The Edge David Brown <david.brown@hesbynett.no> - 2026-10-01 13:47 +0200
    Re: Taking hypot(3) To The Edge Terje Mathisen <terje.mathisen@tmsw.no> - 2026-10-02 20:35 +0200
      Re: Taking hypot(3) To The Edge BGB <cr88192@gmail.com> - 2026-10-02 17:13 -0500
        Re: Taking hypot(3) To The Edge Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-03 02:17 +0000
          Re: Taking hypot(3) To The Edge BGB <cr88192@gmail.com> - 2026-10-03 15:20 -0500
            Re: Taking hypot(3) To The Edge Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-03 21:46 +0000
              Re: Taking hypot(3) To The Edge BGB <cr88192@gmail.com> - 2026-10-03 20:35 -0500
                Re: Taking hypot(3) To The Edge Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-04 23:54 +0000
      Re: Taking hypot(3) To The Edge Michael S <already5chosen@yahoo.com> - 2026-10-03 21:06 +0300
        Re: Taking hypot(3) To The Edge Terje Mathisen <terje.mathisen@tmsw.no> - 2026-10-03 20:22 +0200
          Re: Taking hypot(3) To The Edge Michael S <already5chosen@yahoo.com> - 2026-10-03 22:01 +0300
            Re: Taking hypot(3) To The Edge Terje Mathisen <terje.mathisen@tmsw.no> - 2026-10-03 23:20 +0200
            Re: Taking hypot(3) To The Edge MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-10-04 17:49 +0000
          Re: Taking hypot(3) To The Edge Thomas Koenig <tkoenig@netcologne.de> - 2026-10-03 19:47 +0000
  Re: Taking hypot(3) To The Edge MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-10-13 21:33 +0000
    Re: Taking hypot(3) To The Edge Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-13 21:51 +0000
    Re: Taking hypot(3) To The Edge anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-10-13 21:54 +0000
    Re: Taking hypot(3) To The Edge Michael S <already5chosen@yahoo.com> - 2026-10-14 22:45 +0300
      Re: Taking hypot(3) To The Edge MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-10-14 22:13 +0000
        Re: Taking hypot(3) To The Edge Michael S <already5chosen@yahoo.com> - 2026-10-15 22:03 +0300
          Re: Taking hypot(3) To The Edge MitchAlsup <user5857@newsgrouper.org.invalid> - 2026-10-15 19:19 +0000

csiph-web