Re: "A diagram of C23 basic types"

Liste des GroupesRevenir à cl c 
Sujet : Re: "A diagram of C23 basic types"
De : cr88192 (at) *nospam* gmail.com (BGB)
Groupes : comp.lang.c
Date : 29. Apr 2025, 19:38:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vur6i7$2c2qa$2@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 4/28/2025 8:27 AM, Michael S wrote:
On Sun, 27 Apr 2025 12:05:16 -0700
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
 
Michael S <already5chosen@yahoo.com> writes:
>
On Wed, 02 Apr 2025 16:59:59 +1100
Alexis <flexibeast@gmail.com> wrote:
 
Thought people here might be interested in this image on Jens
Gustedt's blog, which translates section 6.2.5, "Types", of the C23
standard into a graph of inclusions:
>
   https://gustedt.wordpress.com/2025/03/29/a-diagram-of-c23-basic-types/
 
>
That's a little disappointing.
IMHO, C23 should have added optional types _Binary32, _Binary64,
_Binary128 and _Binary256 that designate their IEEE-754 namesakes.
Plus, a mandatory requirement that if compiler supports any of
IEEE-754 binary types then they have to be accessible by
above-mentioned names.
>
I see where you're coming from,
 I suppose, you know it because you followed my failed attempt to improve
speed and cross-platform consistency of gcc IEEE binary128 arithmetic.
Granted, in this case absence of common name for the type was much
smaller obstacle than general indifference of gcc maintainers.
So, yes, on the "producer" side the problem of absence of common name
was annoying but could be regarded as minor.
 Apart from being a "producer", quite often I am on the other side,
wearing a hat of consumer of extended precision types. When in this
role, I feel that the relative weight of inconsistent type names is
rather significant. I'd guess that it is even more significant for
people whose work, unlike mine, is routinely multi-platform. I would
not be surprised if for many of them it ends up as main reason to
refrain completely from use IEEE binary128 in their software; even when
it causes complications to their work and when the type is
readily available, under different names, on all platforms they care
about.
 
In my compiler, it exists as "long double" (though, in the past, understanding "long double" as an alias for "double" was also done, depending on the ABI rules; ended up moving to Binary128 here after noting that code generally didn't use "long double" lightly, so could be used here without too much undue performance penalty).
Though, there are different conventions:
   Understand "long double" as Binary64 (common in MS tools);
   Understand "long double" as Binary128 (typical in GCC);
   Understand "long double" as Intel 80-bit format;
     Common on older 32-bit x86 compilers.
Also "__float128", which is more explicit.
   __float16  / "short float"
   __float32  / "float"
   __float64  / "double"
   __float128 / "long double"
_Binary128 would also be fine IMO.
   Checks, these names didn't exist in my compiler, added them as well.
   Not like one would be using these names for much else...
There are no scalar types for 8-bit FP formats in my compiler, which for now only really exist as SIMD vector types. Could add if really needed, as they "sorta" exist in converter ops.
Internally, my compiler does all scalar floating point math as Binary64 internally regardless of in-memory format (with the FPU ops only operating on Binary64). Narrower formats were handled initially via converters; though ended up adding optional Load/Store ops with built-in converters for Binary32 and Binary16.
The 8 bit formats would require 2 converters (alongside the load/store op; issue being that there are a comparably larger variety of 8-bit formats):
   S.E4.F3, E4.F4, E4.F3.S, S.E3.F4
     And, S.E3.F4 where max is 1.9375 or 0.96875 (*).
*1: The slight loss of low-order dynamic range, but gain of some "above 1.0" values, helping for unit-range values as now 1.0 is directly representable, and there is some overhead to allow for values slightly outside unit range. This helps to some extent with the accuracy of storing normal vectors and unit quaternions as 8-bit FP.
But, with 8-bit formats, precision is bad enough that one can't address all use cases with a single format.

but I disagree with the suggested
addition;  it simultaneously does too much and not enough.  If
someone wants some capability along these lines, the first step
should be to understand what the underlying need is, and then to
figure out how to accommodate that need.  The addition described
above creates more problems than it solves.
 IMHO, a need for a common name for IEEE binary128 exists for quite some
time. For IEEE binary256 the real need didn't emerge yet. But it will
emerge in the hopefully near future.
 
Probably true...

Date Sujet#  Auteur
2 Apr 25 * "A diagram of C23 basic types"377Alexis
2 Apr 25 +* Re: "A diagram of C23 basic types"4Lawrence D'Oliveiro
3 Apr 25 i`* Re: "A diagram of C23 basic types"3BGB
3 Apr 25 i `* Re: "A diagram of C23 basic types"2Lawrence D'Oliveiro
4 Apr 25 i  `- Re: "A diagram of C23 basic types"1BGB
2 Apr 25 +* Re: "A diagram of C23 basic types"9Janis Papanagnou
2 Apr 25 i+* Re: "A diagram of C23 basic types"6Kaz Kylheku
3 Apr 25 ii`* Re: "A diagram of C23 basic types"5Janis Papanagnou
3 Apr 25 ii +* Re: "A diagram of C23 basic types"3David Brown
3 Apr 25 ii i`* Re: "A diagram of C23 basic types"2Janis Papanagnou
3 Apr 25 ii i `- Re: "A diagram of C23 basic types"1BGB
3 Apr 25 ii `- Re: "A diagram of C23 basic types"1BGB
2 Apr 25 i+- Re: "A diagram of C23 basic types"1David Brown
3 Apr 25 i`- Re: "A diagram of C23 basic types"1Tim Rentsch
2 Apr 25 +* Re: "A diagram of C23 basic types"353bart
2 Apr 25 i+* Re: "A diagram of C23 basic types"320Muttley
2 Apr 25 ii+* Re: "A diagram of C23 basic types"290David Brown
2 Apr 25 iii+* Re: "A diagram of C23 basic types"286Muttley
2 Apr 25 iiii+* Re: "A diagram of C23 basic types"207Thiago Adams
2 Apr 25 iiiii`* Re: "A diagram of C23 basic types"206Muttley
2 Apr 25 iiiii +* Re: "A diagram of C23 basic types"204bart
2 Apr 25 iiiii i+* Re: "A diagram of C23 basic types"61Muttley
2 Apr 25 iiiii ii+* Re: "A diagram of C23 basic types"5Janis Papanagnou
3 Apr 25 iiiii iii+* Re: "A diagram of C23 basic types"2Janis Papanagnou
3 Apr 25 iiiii iiii`- Re: "A diagram of C23 basic types"1Janis Papanagnou
3 Apr 25 iiiii iii`* Re: "A diagram of C23 basic types"2David Brown
3 Apr 25 iiiii iii `- Re: "A diagram of C23 basic types"1BGB
3 Apr 25 iiiii ii+* Re: "A diagram of C23 basic types"52bart
3 Apr 25 iiiii iii+* Re: "A diagram of C23 basic types"49Kaz Kylheku
3 Apr 25 iiiii iiii+* Re: "A diagram of C23 basic types"46Keith Thompson
3 Apr 25 iiiii iiiii+* Re: "A diagram of C23 basic types"44BGB
3 Apr 25 iiiii iiiiii`* Re: "A diagram of C23 basic types"43Kaz Kylheku
3 Apr 25 iiiii iiiiii +* Re: "A diagram of C23 basic types"39bart
4 Apr 25 iiiii iiiiii i+* Re: "A diagram of C23 basic types"34Lawrence D'Oliveiro
9 Apr 25 iiiii iiiiii ii`* Re: "A diagram of C23 basic types"33Michael S
9 Apr 25 iiiii iiiiii ii +* Re: "A diagram of C23 basic types"21David Brown
9 Apr 25 iiiii iiiiii ii i+* Re: "A diagram of C23 basic types"17BGB
9 Apr 25 iiiii iiiiii ii ii`* Re: "A diagram of C23 basic types"16bart
10 Apr 25 iiiii iiiiii ii ii `* Re: "A diagram of C23 basic types"15David Brown
10 Apr 25 iiiii iiiiii ii ii  +* Re: "A diagram of C23 basic types"5Michael S
12 Apr 25 iiiii iiiiii ii ii  i`* Re: "A diagram of C23 basic types"4Lawrence D'Oliveiro
12 Apr 25 iiiii iiiiii ii ii  i +- Re: "A diagram of C23 basic types"1James Kuyper
12 Apr 25 iiiii iiiiii ii ii  i `* Re: "A diagram of C23 basic types"2David Brown
12 Apr 25 iiiii iiiiii ii ii  i  `- Re: "A diagram of C23 basic types"1BGB
10 Apr 25 iiiii iiiiii ii ii  +* Re: "A diagram of C23 basic types"4Muttley
10 Apr 25 iiiii iiiiii ii ii  i`* Re: "A diagram of C23 basic types"3bart
10 Apr 25 iiiii iiiiii ii ii  i +- Re: "A diagram of C23 basic types"1Muttley
12 Apr 25 iiiii iiiiii ii ii  i `- Re: "A diagram of C23 basic types"1Lawrence D'Oliveiro
10 Apr 25 iiiii iiiiii ii ii  +* Re: "A diagram of C23 basic types"4bart
10 Apr 25 iiiii iiiiii ii ii  i`* Re: "A diagram of C23 basic types"3David Brown
10 Apr 25 iiiii iiiiii ii ii  i `* Re: "A diagram of C23 basic types"2bart
10 Apr 25 iiiii iiiiii ii ii  i  `- Re: "A diagram of C23 basic types"1David Brown
10 Apr 25 iiiii iiiiii ii ii  `- Re: "A diagram of C23 basic types"1BGB
9 Apr 25 iiiii iiiiii ii i`* Re: "A diagram of C23 basic types"3Keith Thompson
12 Apr 25 iiiii iiiiii ii i `* Re: "A diagram of C23 basic types"2Lawrence D'Oliveiro
12 Apr 25 iiiii iiiiii ii i  `- Re: "A diagram of C23 basic types"1Keith Thompson
9 Apr 25 iiiii iiiiii ii +* Re: "A diagram of C23 basic types"10Tim Rentsch
9 Apr 25 iiiii iiiiii ii i+* Re: "A diagram of C23 basic types"3Keith Thompson
14 Apr 25 iiiii iiiiii ii ii`* Re: "A diagram of C23 basic types"2Tim Rentsch
14 Apr 25 iiiii iiiiii ii ii `- Re: "A diagram of C23 basic types"1Keith Thompson
10 Apr 25 iiiii iiiiii ii i`* Re: "A diagram of C23 basic types"6Michael S
14 Apr 25 iiiii iiiiii ii i `* Re: "A diagram of C23 basic types"5Tim Rentsch
14 Apr 25 iiiii iiiiii ii i  `* Re: "A diagram of C23 basic types"4Michael S
6 May 25 iiiii iiiiii ii i   `* Re: "A diagram of C23 basic types"3Tim Rentsch
6 May 25 iiiii iiiiii ii i    `* Re: "A diagram of C23 basic types"2Michael S
8 May 25 iiiii iiiiii ii i     `- Re: "A diagram of C23 basic types"1Tim Rentsch
9 Apr 25 iiiii iiiiii ii `- Re: "A diagram of C23 basic types"1Kaz Kylheku
4 Apr 25 iiiii iiiiii i`* Re: "A diagram of C23 basic types"4Waldek Hebisch
4 Apr 25 iiiii iiiiii i +* Re: "A diagram of C23 basic types"2Keith Thompson
4 Apr 25 iiiii iiiiii i i`- Re: "A diagram of C23 basic types"1Waldek Hebisch
8 Apr 25 iiiii iiiiii i `- Re: "A diagram of C23 basic types"1Lawrence D'Oliveiro
3 Apr 25 iiiii iiiiii +* Re: "A diagram of C23 basic types"2Keith Thompson
4 Apr 25 iiiii iiiiii i`- Re: "A diagram of C23 basic types"1Kaz Kylheku
4 Apr 25 iiiii iiiiii `- Re: "A diagram of C23 basic types"1Michael S
4 Apr 25 iiiii iiiii`- Re: "A diagram of C23 basic types"1Lawrence D'Oliveiro
3 Apr 25 iiiii iiii+- Re: "A diagram of C23 basic types"1Muttley
3 Apr 25 iiiii iiii`- Re: "A diagram of C23 basic types"1Keith Thompson
3 Apr 25 iiiii iii+- Re: "A diagram of C23 basic types"1David Brown
4 Apr 25 iiiii iii`- Re: "A diagram of C23 basic types"1Lawrence D'Oliveiro
3 Apr 25 iiiii ii`* Re: "A diagram of C23 basic types"3Muttley
4 Apr 25 iiiii ii `* Re: "A diagram of C23 basic types"2Muttley
4 Apr 25 iiiii ii  `- Re: "A diagram of C23 basic types"1Muttley
4 Apr 25 iiiii i`* Re: "A diagram of C23 basic types"142Lawrence D'Oliveiro
4 Apr 25 iiiii i +- Re: "A diagram of C23 basic types"1Keith Thompson
7 Apr 25 iiiii i +* Re: "A diagram of C23 basic types"87candycanearter07
7 Apr 25 iiiii i i+* Re: "A diagram of C23 basic types"85Janis Papanagnou
8 Apr 25 iiiii i ii+- Re: "A diagram of C23 basic types"1candycanearter07
14 Apr 25 iiiii i ii`* Re: "A diagram of C23 basic types"83Lawrence D'Oliveiro
14 Apr 25 iiiii i ii `* Re: "A diagram of C23 basic types"82candycanearter07
14 Apr 25 iiiii i ii  +* Re: "A diagram of C23 basic types"2Kaz Kylheku
15 Apr 25 iiiii i ii  i`- Re: "A diagram of C23 basic types"1Janis Papanagnou
14 Apr 25 iiiii i ii  `* Re: "A diagram of C23 basic types"79BGB
14 Apr 25 iiiii i ii   +- Re: "A diagram of C23 basic types"1Keith Thompson
14 Apr 25 iiiii i ii   `* Re: "A diagram of C23 basic types"77Lawrence D'Oliveiro
14 Apr 25 iiiii i ii    +* Re: "A diagram of C23 basic types"39Keith Thompson
15 Apr 25 iiiii i ii    i+* Re: "A diagram of C23 basic types"28Lawrence D'Oliveiro
15 Apr 25 iiiii i ii    ii+- Re: "A diagram of C23 basic types"1Keith Thompson
15 Apr 25 iiiii i ii    ii`* Re: "A diagram of C23 basic types"26James Kuyper
15 Apr 25 iiiii i ii    ii +* Re: "A diagram of C23 basic types"18Lawrence D'Oliveiro
15 Apr 25 iiiii i ii    ii i`* Re: "A diagram of C23 basic types"17James Kuyper
15 Apr 25 iiiii i ii    ii i +* Re: "A diagram of C23 basic types"13Keith Thompson
15 Apr 25 iiiii i ii    ii i `* Re: "A diagram of C23 basic types"3Lawrence D'Oliveiro
15 Apr 25 iiiii i ii    ii `* Re: "A diagram of C23 basic types"7BGB
15 Apr 25 iiiii i ii    i`* Re: "A diagram of C23 basic types"10Chris M. Thomasson
15 Apr 25 iiiii i ii    `* Re: "A diagram of C23 basic types"37BGB
8 Apr 25 iiiii i i`- Re: "A diagram of C23 basic types"1Lawrence D'Oliveiro
7 Apr 25 iiiii i `* Re: "A diagram of C23 basic types"53bart
4 Apr 25 iiiii `- Re: "A diagram of C23 basic types"1Lawrence D'Oliveiro
2 Apr 25 iiii+* Re: "A diagram of C23 basic types"2Michael S
2 Apr 25 iiii`* Re: "A diagram of C23 basic types"76David Brown
2 Apr 25 iii`* Re: "A diagram of C23 basic types"3Kaz Kylheku
2 Apr 25 ii`* Re: "A diagram of C23 basic types"29Waldek Hebisch
5 Apr 25 i`* Re: "A diagram of C23 basic types"32Philipp Klaus Krause
3 Apr 25 +* Re: "A diagram of C23 basic types"6Michael S
11 Apr 25 +* Re: "A diagram of C23 basic types"2Tim Rentsch
11 Apr 25 `* Re: "A diagram of C23 basic types"2Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal