The new 128-bit floating point _Float128 per ISO/IEC/IEEE 60559:2011 ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxxxx>
To: Dennis Clarke <dclarke@xxxxxxxxxxxxx>
CC: GCC help <gcc-help@xxxxxxxxxxx>

<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.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux