public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* The new 128-bit floating point _Float128 per ISO/IEC/IEEE 60559:2011 ??
       [not found] <CAH6eHdRFiHHNfHEWcPF+6ZgthGfPLWz3T7Qetz6hcjFySWQGEA@mail.gmail.com>
@ 2018-03-13  2:47 ` Dennis Clarke
  2018-03-13 12:04   ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Dennis Clarke @ 2018-03-13  2:47 UTC (permalink / raw)
  To: gcc-help



I did some digging and found that the new floating point types[1] really
only exist in a few architectures.  Near as I can tell. However I have
yet to see them.  Yet.  Working on it.  I am not sure if the Debian
packages for gcc allow them nor sure if the kernel config even has the
options yet. Certianly math emulation can be done but actual software
implementations of _Float128?  I don't *yet* know.  I have linux kernel
4.15.9 on ppc64 however that won't suffice.  Certainly won't work on
plain jane 32-bit x86 either regardless of kernel rev.

Has anyone seen these in the wild?

Dennis

[1] per https://sourceware.org/bugzilla/show_bug.cgi?id=21539

* On ia64, powerpc64le, x86-32, and x86-64, the math library now implements
   128-bit floating point as defined by ISO/IEC/IEEE 60559:2011 (IEEE
   754-2008) and ISO/IEC TS 18661-3:2015.  Contributed by Paul E. Murphy,
   Gabriel F. T. Gomes, Tulio Magno Quites Machado Filho, and Joseph Myers.

   To compile programs that use this feature, the compiler must support
   128-bit floating point with the type name _Float128 (as defined by TS
   18661-3) or __float128 (the nonstandard name used by GCC for C++, and for
   C prior to version 7).  _GNU_SOURCE or __STDC_WANT_IEC_60559_TYPES_EXT__
   must be defined to make the new interfaces visible.

   The new functions and macros correspond to those present for other
   floating-point types (except for a few obsolescent interfaces not
   supported for the new type), with F128 or f128 suffixes; for example,
   strtof128, HUGE_VAL_F128 and cosf128.  Following TS 18661-3, there are no
   printf or scanf formats for the new type; the strfromf128 and strtof128
   interfaces should be used instead.



Also from earlier ....

-------- Forwarded Message --------
Subject: Re: documentation error on 
https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/x86-Options.html
Date: Mon, 12 Mar 2018 22:33:06 +0000
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Dennis Clarke <dclarke@blastwave.org>
CC: GCC help <gcc-help@gcc.gnu.org>

<snip>
>     gcc: error: unrecognized command line option '-mno-clfushopt'; did you
> mean '-mno-clflushopt'?
>
>
> yep .. I did.
>
>
> Just a spelling error there for "-mclfushopt".

Fixed on trunk with https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00554.html

>
<snip>
>
> deb_i586$ ./sinl
> Our pi constant was
>  3.1415926535897932384626433832795028841971693993751L
>
> ---------+---------+---------+---------+---------+
> sizeof(long double) = 16
>       pi may be +0.00000000000000000000000000000000000000
> sinl(pi) may be                                     +nan
>     approx_pi =                                     +nan
>      ld_error = -0.00000000000000000000000000000000000000
> .
> .
> .
>
> .. as well as a truely awesome mess of digits and just really borked
>  up results if I try anything else "fancy" like sinl().  Not surprised.


I'm not sure, but I think you need a libc that is also built with
-mlong-double-128, otherwise its printf doesn't know you're passing it
128-bit types.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: The new 128-bit floating point _Float128 per ISO/IEC/IEEE 60559:2011 ??
  2018-03-13  2:47 ` The new 128-bit floating point _Float128 per ISO/IEC/IEEE 60559:2011 ?? Dennis Clarke
@ 2018-03-13 12:04   ` Jonathan Wakely
  2018-03-13 12:38     ` Dennis Clarke
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2018-03-13 12:04 UTC (permalink / raw)
  To: Dennis Clarke; +Cc: gcc-help

On 13 March 2018 at 02:47, Dennis Clarke wrote:
>
>
> I did some digging and found that the new floating point types[1] really
> only exist in a few architectures.  Near as I can tell. However I have
> yet to see them.  Yet.  Working on it.  I am not sure if the Debian
> packages for gcc allow them nor sure if the kernel config even has the
> options yet. Certianly math emulation can be done but actual software
> implementations of _Float128?  I don't *yet* know.  I have linux kernel
> 4.15.9 on ppc64 however that won't suffice.  Certainly won't work on
> plain jane 32-bit x86 either regardless of kernel rev.

The kernel has nothing to do with it, does it? The requirements are on
GCC and glibc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: The new 128-bit floating point _Float128 per ISO/IEC/IEEE 60559:2011 ??
  2018-03-13 12:04   ` Jonathan Wakely
@ 2018-03-13 12:38     ` Dennis Clarke
  0 siblings, 0 replies; 3+ messages in thread
From: Dennis Clarke @ 2018-03-13 12:38 UTC (permalink / raw)
  To: gcc-help

On 13/03/18 08:04 AM, Jonathan Wakely wrote:
> On 13 March 2018 at 02:47, Dennis Clarke wrote:
>>
>>
>> I did some digging and found that the new floating point types[1] really
>> only exist in a few architectures.  Near as I can tell. However I have
>> yet to see them.  Yet.  Working on it.  I am not sure if the Debian
>> packages for gcc allow them nor sure if the kernel config even has the
>> options yet. Certianly math emulation can be done but actual software
>> implementations of _Float128?  I don't *yet* know.  I have linux kernel
>> 4.15.9 on ppc64 however that won't suffice.  Certainly won't work on
>> plain jane 32-bit x86 either regardless of kernel rev.
> 
> The kernel has nothing to do with it, does it? The requirements are on
> GCC and glibc.
> 

yep https://gcc.gnu.org/ml/gcc-help/2018-03/msg00036.html

I have been digging around in this for months and on various platforms
for a while.  Have not seen things working .. yet.  Real soon now.  :-)

The folks at Oracle state that Oracle Studio 12.6 has full support for
just about everything you would want but then again, where?  Oh yeah, on
Solaris and even then .. maybe.   I don't know yet as I have seen some
breakage down in the bits there too.

Anyways ... it really is great to see what recent gcc and glibc "can" do
where I have been following :

  See GNU libc release message for 2.26 :
      https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html

  See GNU libc release message for 2.27 :
      https://sourceware.org/ml/libc-alpha/2018-02/msg00054.html


Dennis

ps: catching floating point exceptions is a whole other can o worms

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-13 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAH6eHdRFiHHNfHEWcPF+6ZgthGfPLWz3T7Qetz6hcjFySWQGEA@mail.gmail.com>
2018-03-13  2:47 ` The new 128-bit floating point _Float128 per ISO/IEC/IEEE 60559:2011 ?? Dennis Clarke
2018-03-13 12:04   ` Jonathan Wakely
2018-03-13 12:38     ` Dennis Clarke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).