]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add totalorder, totalorderf, totalorderl.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 12 Oct 2016 01:20:30 +0000 (01:20 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 12 Oct 2016 01:20:30 +0000 (01:20 +0000)
TS 18661-1 defines totalorder functions implementing the totalOrder
comparison operation from IEEE 754-2008.  This patch implements these
functions for glibc, including the type-generic macro in <tgmath.h>.
(The totalordermag functions will be added in a separate patch.)

The description of the totalOrder operation is complicated.  However,
for IEEE interchange binary formats and the preferred quiet NaN
convention, what that complicated description means is that you
interpret the representation as a sign-magnitude integer (with -0
coming before +0) and do a <= comparison on that interpretation.  For
finite values and infinities the ordering of the sign-magnitude
integers is just the same as the ordering of floating-point values, so
this extends that to all representations.  (Different representations
of the same floating-point value - which includes same quantum in the
decimal case - must still be considered equal by this operation, but
that issue doesn't arise for IEEE interchange binary formats.)  So the
complications are:

* When MIPS quiet NaN conventions are in use, the representation of
  NaNs needs adjusting before making such an integer comparison.  This
  patch does this adjustment only when both arguments are NaNs, as
  there's no need for it if only one is a NaN, and as long as both are
  NaNs you can just flip the relevant bits without any problems from
  this turning a NaN into an infinity.

* For the m68k version of ldbl-96, where the high mantissa bit is
  "don't care" for infinities and NaNs, representations where it
  differs must compare the same.  Note: although the testcase for this
  compiles, I have not actually tested on m68k.

* For ldbl-128ibm, the low part must be ignored when the high part is
  NaN, and low parts of +0 and -0 must be considered the same whatever
  the high part.

The new tests in libm-test.inc are the first tests there specifying
particular payloads for input NaNs.  Separate tests are also added for
the ldbl-96 and ldbl-128ibm special cases where there are different
representations of the same value that must compare equal (which can't
be covered in libm-test.inc as that only specifies values, not
representations).

Tested for x86_64, x86, mips64 and powerpc.

* math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)]
(totalorder): New declaration.
* math/tgmath.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (totalorder):
New macro.
* math/Versions (totalorder): New libm symbol at version
GLIBC_2.25.
(totalorderf): Likewise.
(totalorderl): Likewise.
* math/Makefile (libm-calls): Add s_totalorderF.
* math/gen-libm-test.pl (parse_args): Escape quotes in test name
string.
* math/libm-test.inc (PAYLOAD_DIG): New macro.
(qnan_value_pl): Likewise.
(snan_value_pl): Likewise.
(qnan_value): Define using qnan_value_pl.
(snan_value): Define using snan_value_pl.
(struct test_ff_i_data): Add comment about which tests use this
structure.
(RUN_TEST_ff_b): New macro.
(RUN_TEST_LOOP_ff_b): Likewise.
(totalorder_test_data): New array.
(totalorder_test): New function.
(main): Call totalorder_test.
* math/test-tgmath.c (NCALLS): Increase to 122.
(F(compile_test)): Call totalorder.
(F(totalorder)): New function.
* manual/arith.texi (FP Comparison Functions): Document
totalorder, totalorderf and totalorderl.
* manual/libm-err-tab.pl: Update comment on interfaces without
ulps tabulated.
* sysdeps/ieee754/dbl-64/s_totalorder.c: New file.
* sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c: Likewise.
* sysdeps/ieee754/flt-32/s_totalorderf.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_totalorderl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_totalorderl.c: Likewise.
* sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c: Likewise.
* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add
totalorder.
(CFLAGS-nldbl-totalorder.c): New variable.
* sysdeps/ieee754/ldbl-128ibm/test-totalorderl-ldbl-128ibm.c: New
file.
* sysdeps/ieee754/ldbl-128ibm/Makefile [$(subdir) = math] (tests):
Add test-totalorderl-ldbl-128ibm.
* sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c: New file.
* sysdeps/ieee754/ldbl-96/Makefile [$(subdir) = math] (tests): Add
test-totalorderl-ldbl-96.
* sysdeps/nacl/libm.abilist: Update.
* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.

50 files changed:
ChangeLog
NEWS
manual/arith.texi
manual/libm-err-tab.pl
math/Makefile
math/Versions
math/bits/mathcalls.h
math/gen-libm-test.pl
math/libm-test.inc
math/test-tgmath.c
math/tgmath.h
sysdeps/ieee754/dbl-64/s_totalorder.c [new file with mode: 0644]
sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c [new file with mode: 0644]
sysdeps/ieee754/flt-32/s_totalorderf.c [new file with mode: 0644]
sysdeps/ieee754/ldbl-128/s_totalorderl.c [new file with mode: 0644]
sysdeps/ieee754/ldbl-128ibm/Makefile
sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c [new file with mode: 0644]
sysdeps/ieee754/ldbl-128ibm/test-totalorderl-ldbl-128ibm.c [new file with mode: 0644]
sysdeps/ieee754/ldbl-96/Makefile
sysdeps/ieee754/ldbl-96/s_totalorderl.c [new file with mode: 0644]
sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c [new file with mode: 0644]
sysdeps/ieee754/ldbl-opt/Makefile
sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c [new file with mode: 0644]
sysdeps/nacl/libm.abilist
sysdeps/unix/sysv/linux/aarch64/libm.abilist
sysdeps/unix/sysv/linux/alpha/libm.abilist
sysdeps/unix/sysv/linux/arm/libm.abilist
sysdeps/unix/sysv/linux/hppa/libm.abilist
sysdeps/unix/sysv/linux/i386/libm.abilist
sysdeps/unix/sysv/linux/ia64/libm.abilist
sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist
sysdeps/unix/sysv/linux/microblaze/libm.abilist
sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
sysdeps/unix/sysv/linux/nios2/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist
sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
sysdeps/unix/sysv/linux/sh/libm.abilist
sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist
sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist
sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist
sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist

index e87cd68a13202c50ec955a029a3c4b2010619701..d129219fd172cb1334d729bf43fd8a855e22e3da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,86 @@
+2016-10-12  Joseph Myers  <joseph@codesourcery.com>
+
+       * math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)]
+       (totalorder): New declaration.
+       * math/tgmath.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (totalorder):
+       New macro.
+       * math/Versions (totalorder): New libm symbol at version
+       GLIBC_2.25.
+       (totalorderf): Likewise.
+       (totalorderl): Likewise.
+       * math/Makefile (libm-calls): Add s_totalorderF.
+       * math/gen-libm-test.pl (parse_args): Escape quotes in test name
+       string.
+       * math/libm-test.inc (PAYLOAD_DIG): New macro.
+       (qnan_value_pl): Likewise.
+       (snan_value_pl): Likewise.
+       (qnan_value): Define using qnan_value_pl.
+       (snan_value): Define using snan_value_pl.
+       (struct test_ff_i_data): Add comment about which tests use this
+       structure.
+       (RUN_TEST_ff_b): New macro.
+       (RUN_TEST_LOOP_ff_b): Likewise.
+       (totalorder_test_data): New array.
+       (totalorder_test): New function.
+       (main): Call totalorder_test.
+       * math/test-tgmath.c (NCALLS): Increase to 122.
+       (F(compile_test)): Call totalorder.
+       (F(totalorder)): New function.
+       * manual/arith.texi (FP Comparison Functions): Document
+       totalorder, totalorderf and totalorderl.
+       * manual/libm-err-tab.pl: Update comment on interfaces without
+       ulps tabulated.
+       * sysdeps/ieee754/dbl-64/s_totalorder.c: New file.
+       * sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c: Likewise.
+       * sysdeps/ieee754/flt-32/s_totalorderf.c: Likewise.
+       * sysdeps/ieee754/ldbl-128/s_totalorderl.c: Likewise.
+       * sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c: Likewise.
+       * sysdeps/ieee754/ldbl-96/s_totalorderl.c: Likewise.
+       * sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c: Likewise.
+       * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add
+       totalorder.
+       (CFLAGS-nldbl-totalorder.c): New variable.
+       * sysdeps/ieee754/ldbl-128ibm/test-totalorderl-ldbl-128ibm.c: New
+       file.
+       * sysdeps/ieee754/ldbl-128ibm/Makefile [$(subdir) = math] (tests):
+       Add test-totalorderl-ldbl-128ibm.
+       * sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c: New file.
+       * sysdeps/ieee754/ldbl-96/Makefile [$(subdir) = math] (tests): Add
+       test-totalorderl-ldbl-96.
+       * sysdeps/nacl/libm.abilist: Update.
+       * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist:
+       Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist:
+       Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
+       Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist:
+       Likewise.
+       * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist:
+       Likewise.
+       * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist:
+       Likewise.
+       * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
+
 2016-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-sync_file_range.
diff --git a/NEWS b/NEWS
index 3b46fb10c613977bc771415a7fc08c57a7ad3a81..22a5a5afd4d625b619b46990b21ee8b3220c9ac3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,8 @@ Version 2.25
 
   - Classification macros: iscanonical, issubnormal, iszero.
 
+  - Total order functions: totalorder, totalorderf, totalorderl.
+
 * The <sys/quota.h> header now includes the <linux/quota.h> header.  Support
   for the Linux quota interface which predates kernel version 2.4.22 has
   been removed.
index 5fb18f35613f097497375b96e6dec6ae220117fd..75d34c84271a8b6fdcaa18cd0ceeacb92446b2a7 100644 (file)
@@ -1874,7 +1874,10 @@ do not raise exceptions when NaN is examined.  All of the functions are
 implemented as macros which allow their arguments to be of any
 floating-point type.  The macros are guaranteed to evaluate their
 arguments only once.  TS 18661-1:2014 adds such a macro for an
-equality comparison that @emph{does} raise an exception for a NaN argument.
+equality comparison that @emph{does} raise an exception for a NaN
+argument; it also adds functions that provide a total ordering on all
+floating-point values, including NaNs, without raising any exceptions
+even for signaling NaNs.
 
 @comment math.h
 @comment ISO
@@ -1943,6 +1946,28 @@ exception and sets @code{errno} to @code{EDOM} is either argument is a
 NaN.
 @end deftypefn
 
+@comment math.h
+@comment ISO
+@deftypefun int totalorder (double @var{x}, double @var{y})
+@comment ISO
+@deftypefunx int totalorderf (float @var{x}, float @var{y})
+@comment ISO
+@deftypefunx int totalorderl (long double @var{x}, long double @var{y})
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+These functions determine whether the total order relationship,
+defined in IEEE 754-2008, is true for @var{x} and @var{y}, returning
+nonzero if it is true and zero if it is false.  No exceptions are
+raised even for signaling NaNs.  The relationship is true if they are
+the same floating-point value (including sign for zero and NaNs, and
+payload for NaNs), or if @var{x} comes before @var{y} in the following
+order: negative quiet NaNs, in order of decreasing payload; negative
+signaling NaNs, in order of decreasing payload; negative infinity;
+finite numbers, in ascending order, with negative zero before positive
+zero; positive infinity; positive signaling NaNs, in order of
+increasing payload; positive quiet NaNs, in order of increasing
+payload.
+@end deftypefun
+
 Not all machines provide hardware support for these operations.  On
 machines that don't, the macros can be very slow.  Therefore, you should
 not use these functions when NaN is not a concern.
index 451547871b9ab3bcf10c0616e2cd65a6a15578e5..9989605e5beac2d7df2a376dbe06f32a21e5ba2d 100755 (executable)
@@ -79,7 +79,7 @@ use vars qw (%results @all_floats %suffices @all_functions);
     "trunc", "y0", "y1", "yn" );
 # fpclassify, iscanonical, isnormal, isfinite, isinf, isnan, issignaling,
 # issubnormal, iszero, signbit, iseqsig, isgreater, isgreaterequal, isless,
-# islessequal, islessgreater, isunordered are not tabulated.
+# islessequal, islessgreater, isunordered, totalorder are not tabulated.
 
 if ($#ARGV == 0) {
   $sources = $ARGV[0];
index ca07f9d1fd39fdbc6b8ba5fde7a6284ff57e4abc..ffaeb7c958b882a640ceb2477d75c08bdf469951 100644 (file)
@@ -72,7 +72,7 @@ libm-calls =                                                            \
        s_fmaF s_lrintF s_llrintF s_lroundF s_llroundF e_exp10F w_log2F   \
        s_issignalingF $(calls:s_%=m_%) x2y2m1F                           \
        gamma_productF lgamma_negF lgamma_productF                        \
-       s_nextupF $(gen-libm-calls)
+       s_nextupF s_totalorderF $(gen-libm-calls)
 
 libm-compat-calls-ldouble-yes = w_lgamma_compatl k_standardl
 libm-compat-calls = w_lgamma_compatf w_lgamma_compat k_standard k_standardf \
index e658a1037caaa4eb3609dc35fb984577b9d0b961..29246de94a538e41305d4572956919f735b2eff0 100644 (file)
@@ -217,5 +217,6 @@ libm {
   GLIBC_2.25 {
     fesetexcept; fetestexceptflag; fegetmode; fesetmode;
     __iscanonicall; __iseqsigf; __iseqsig; __iseqsigl;
+    totalorder; totalorderf; totalorderl;
   }
 }
index 4fc18659f8c670fe20277e5641c56074b4a6d210..c800c2d27d0e9ea68b6318fa2e5834af3cde0598 100644 (file)
@@ -386,6 +386,10 @@ __MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y));
 /* Test for signaling NaN.  */
 __MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value))
      __attribute__ ((__const__));
+
+/* Total order operation.  */
+__MATHDECL_1 (int, totalorder,, (_Mdouble_ __x, _Mdouble_ __y))
+     __attribute__ ((__const__));
 #endif
 
 #if defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
index 577964c3c6b06b3827f9ea16ec97c559f3b6ab28..4d02873c6f52a8a541ddf29b30992880a1c195eb 100755 (executable)
@@ -280,6 +280,7 @@ sub parse_args {
   # Put the C program line together
   # Reset some variables to start again
   $current_arg = 1;
+  $call_args =~ s/\"/\\\"/g;
   $cline = "{ \"$call_args\"";
   @descr = split //,$descr_args;
   for ($i=0; $i <= $#descr; $i++) {
index 4573482f653b17c8f6987abfba0f7b9bf716807a..c8d2702aebfdf032e95d3c562ce988047bd6d0f5 100644 (file)
@@ -53,7 +53,8 @@
    modf, nearbyint, nextafter, nexttoward,
    pow, pow10, remainder, remquo, rint, lrint, llrint,
    round, lround, llround,
-   scalb, scalbn, scalbln, signbit, sin, sincos, sinh, sqrt, tan, tanh, tgamma, trunc,
+   scalb, scalbn, scalbln, signbit, sin, sincos, sinh, sqrt,
+   tan, tanh, tgamma, totalorder, trunc,
    y0, y1, yn, significand
 
    and for the following complex math functions:
@@ -84,7 +85,8 @@
    against.  These implemented tests should check all cases that are
    specified in ISO C99.
 
-   NaN values: The payload of NaNs is not examined.
+   NaN values: The payload of NaNs is not examined, but is set in
+   inputs for functions where it is significant.
 
    Inline functions: Inlining functions should give an improvement in
    speed - but not in precission.  The inlined functions return
                          && MIN_EXP == -16382  \
                          && MAX_EXP == 16384)
 
+/* Number of bits in NaN payload.  */
+#if TEST_COND_ibm128
+# define PAYLOAD_DIG (DBL_MANT_DIG - 2)
+#else
+# define PAYLOAD_DIG (MANT_DIG - 2)
+#endif
+
 /* Values underflowing only for float.  */
 #if TEST_COND_binary32
 # define UNDERFLOW_EXCEPTION_FLOAT     UNDERFLOW_EXCEPTION
@@ -312,8 +321,10 @@ static int ignore_max_ulp; /* Should we ignore max_ulp?  */
 #define minus_zero     LIT (-0.0)
 #define plus_infty     FUNC (__builtin_inf) ()
 #define minus_infty    -(FUNC (__builtin_inf) ())
-#define qnan_value     FUNC (__builtin_nan) ("")
-#define snan_value     FUNC (__builtin_nans) ("")
+#define qnan_value_pl(S)       FUNC (__builtin_nan) (S)
+#define qnan_value     qnan_value_pl ("")
+#define snan_value_pl(S)       FUNC (__builtin_nans) (S)
+#define snan_value     snan_value_pl ("")
 #define max_value      TYPE_MAX
 #define min_value      TYPE_MIN
 #define min_subnorm_value TYPE_TRUE_MIN
@@ -1220,6 +1231,7 @@ struct test_f_i_data
     int exceptions;
   } rd, rn, rz, ru;
 };
+/* Used for both RUN_TEST_LOOP_ff_b and RUN_TEST_LOOP_ff_i_tg.  */
 struct test_ff_i_data
 {
   const char *arg_str;
@@ -1596,6 +1608,25 @@ struct test_fFF_11_data
                       (ARRAY)[i].RM_##ROUNDING_MODE.expected,          \
                       (ARRAY)[i].RM_##ROUNDING_MODE.exceptions);       \
   ROUND_RESTORE_ ## ROUNDING_MODE
+#define RUN_TEST_ff_b(ARG_STR, FUNC_NAME, ARG1, ARG2, EXPECTED,                \
+                     EXCEPTIONS)                                       \
+  do                                                                   \
+    if (enable_test (EXCEPTIONS))                                      \
+      {                                                                        \
+       COMMON_TEST_SETUP (ARG_STR);                                    \
+       check_bool (test_name, FUNC_TEST (FUNC_NAME) (ARG1, ARG2),      \
+                   EXPECTED, EXCEPTIONS);                              \
+       COMMON_TEST_CLEANUP;                                            \
+      }                                                                        \
+  while (0)
+#define RUN_TEST_LOOP_ff_b(FUNC_NAME, ARRAY, ROUNDING_MODE)            \
+  IF_ROUND_INIT_ ## ROUNDING_MODE                                      \
+    for (size_t i = 0; i < sizeof (ARRAY) / sizeof (ARRAY)[0]; i++)    \
+      RUN_TEST_ff_b ((ARRAY)[i].arg_str, FUNC_NAME,                    \
+                    (ARRAY)[i].arg1, (ARRAY)[i].arg2,                  \
+                    (ARRAY)[i].RM_##ROUNDING_MODE.expected,            \
+                    (ARRAY)[i].RM_##ROUNDING_MODE.exceptions);         \
+  ROUND_RESTORE_ ## ROUNDING_MODE
 #define RUN_TEST_ff_i_tg(ARG_STR, FUNC_NAME, ARG1, ARG2, EXPECTED,     \
                         EXCEPTIONS)                                    \
   do                                                                   \
@@ -12238,6 +12269,226 @@ tgamma_test (void)
 }
 
 
+static const struct test_ff_i_data totalorder_test_data[] =
+  {
+    TEST_ff_b (totalorder, minus_zero, minus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, plus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, -qnan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, plus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, -qnan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, -qnan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, 1, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, minus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, plus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, minus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, -qnan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_infty, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, -qnan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_infty, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, minus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, plus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, minus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, minus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, plus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, minus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, -qnan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, -qnan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, -qnan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, -min_subnorm_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, minus_zero, min_subnorm_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, -min_subnorm_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, plus_zero, min_subnorm_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -min_subnorm_value, minus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -min_subnorm_value, plus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, min_subnorm_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, min_subnorm_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, min_value, max_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, min_value, -max_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -min_value, max_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -min_value, -max_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, max_value, min_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, max_value, -min_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -max_value, min_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -max_value, -min_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x1"), qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x1"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x1"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x2"), qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x2"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x2"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x1"), -qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x1"), -qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x1"), -qnan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x2"), -qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x2"), -qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x2"), -qnan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x1"), qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x1"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x1"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x2"), qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x2"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x2"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x1"), -qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x1"), -qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x1"), -qnan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x2"), -qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x2"), -qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x2"), -qnan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x1"), snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x1"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x1"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x2"), snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x2"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x2"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x3fffff"), snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x3fffff"), snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x3fffff"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x1"), -snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x1"), -snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x1"), -snan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x2"), -snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x2"), -snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x2"), -snan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x3fffff"), -snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x3fffff"), -snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x3fffff"), -snan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x1"), snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x1"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x1"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x2"), snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x2"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x2"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x3fffff"), snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x3fffff"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x3fffff"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x1"), -snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x1"), -snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x1"), -snan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x2"), -snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x2"), -snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x2"), -snan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x3fffff"), -snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x3fffff"), -snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x3fffff"), -snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x3fffff"), qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x3fffff"), -qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x1"), snan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x1"), -snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+#if PAYLOAD_DIG >= 34
+    TEST_ff_b (totalorder, qnan_value_pl ("0xffffffff"), qnan_value_pl ("0x100000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0xffffffff"), -qnan_value_pl ("0x100000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x100000000"), qnan_value_pl ("0xffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x100000000"), -qnan_value_pl ("0xffffffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0xffffffff"), snan_value_pl ("0x100000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0xffffffff"), -snan_value_pl ("0x100000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x100000000"), snan_value_pl ("0xffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x100000000"), -snan_value_pl ("0xffffffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x100000000"), qnan_value_pl ("0x200000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x100000000"), -qnan_value_pl ("0x200000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x200000000"), qnan_value_pl ("0x100000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x200000000"), -qnan_value_pl ("0x100000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x100000000"), snan_value_pl ("0x200000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x100000000"), -snan_value_pl ("0x200000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x200000000"), snan_value_pl ("0x100000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x200000000"), -snan_value_pl ("0x100000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+#endif
+#if PAYLOAD_DIG >= 66
+    TEST_ff_b (totalorder, qnan_value_pl ("0xffffffffffffffff"), qnan_value_pl ("0x10000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0xffffffffffffffff"), -qnan_value_pl ("0x10000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x10000000000000000"), qnan_value_pl ("0xffffffffffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x10000000000000000"), -qnan_value_pl ("0xffffffffffffffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0xffffffffffffffff"), snan_value_pl ("0x10000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0xffffffffffffffff"), -snan_value_pl ("0x10000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x10000000000000000"), snan_value_pl ("0xffffffffffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x10000000000000000"), -snan_value_pl ("0xffffffffffffffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x10000000000000000"), qnan_value_pl ("0x20000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x10000000000000000"), -qnan_value_pl ("0x20000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, qnan_value_pl ("0x20000000000000000"), qnan_value_pl ("0x10000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -qnan_value_pl ("0x20000000000000000"), -qnan_value_pl ("0x10000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x10000000000000000"), snan_value_pl ("0x20000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x10000000000000000"), -snan_value_pl ("0x20000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, snan_value_pl ("0x20000000000000000"), snan_value_pl ("0x10000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_ff_b (totalorder, -snan_value_pl ("0x20000000000000000"), -snan_value_pl ("0x10000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+#endif
+  };
+
+static void
+totalorder_test (void)
+{
+  ALL_RM_TEST (totalorder, 1, totalorder_test_data, RUN_TEST_LOOP_ff_b, END);
+}
+
+
 static const struct test_f_f_data trunc_test_data[] =
   {
     TEST_f_f (trunc, plus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -12900,6 +13151,9 @@ main (int argc, char **argv)
   islessgreater_test ();
   isunordered_test ();
 
+  /* Total order functions:  */
+  totalorder_test ();
+
   /* Complex functions:  */
   cabs_test ();
   cacos_test ();
index 70ab42881a44ccd1e2885eb240dbe5bab67dcd9b..a24058c9bd2daf1859455f731d59c1a35766b9c8 100644 (file)
@@ -50,7 +50,7 @@ int count_cdouble;
 int count_cfloat;
 int count_cldouble;
 
-#define NCALLS     119
+#define NCALLS     122
 #define NCALLS_INT 4
 #define NCCALLS    47
 
@@ -285,6 +285,7 @@ F(compile_test) (void)
   b = fmax (fmax (a, x), fmax (c, b));
   a = fmin (fmin (x, a), fmin (c, b));
   b = fma (sin (a), sin (x), sin (c));
+  a = totalorder (totalorder (x, b), totalorder (c, x));
 
 #ifdef TEST_INT
   a = atan2 (i, b);
@@ -381,6 +382,7 @@ F(compile_test) (void)
       a = fmax (y, y);
       a = fmin (y, y);
       a = fma (y, y, y);
+      a = totalorder (y, y);
 
 #ifdef TEST_INT
       a = atan2 (i, y);
@@ -874,6 +876,14 @@ TYPE
   return x + y + z;
 }
 
+int
+(F(totalorder)) (TYPE x, TYPE y)
+{
+  ++count;
+  P ();
+  return x + y;
+}
+
 complex TYPE
 (F(cacos)) (complex TYPE x)
 {
index de1eb985fe795ba06a38711eeb93b6c5b2736d31..267e2921d5bd1b1d7eb988b38e7d161bb79b2d0e 100644 (file)
 #define fma(Val1, Val2, Val3) \
      __TGMATH_TERNARY_REAL_ONLY (Val1, Val2, Val3, fma)
 
+#if __GLIBC_USE (IEC_60559_BFP_EXT)
+/* Total order operation.  */
+# define totalorder(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, \
+                                                          totalorder)
+#endif
+
 
 /* Absolute value, conjugates, and projection.  */
 
diff --git a/sysdeps/ieee754/dbl-64/s_totalorder.c b/sysdeps/ieee754/dbl-64/s_totalorder.c
new file mode 100644 (file)
index 0000000..73ac32f
--- /dev/null
@@ -0,0 +1,53 @@
+/* Total order operation.  dbl-64 version.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math_private.h>
+#include <stdint.h>
+
+int
+totalorder (double x, double y)
+{
+  int32_t hx, hy;
+  uint32_t lx, ly;
+  EXTRACT_WORDS (hx, lx, x);
+  EXTRACT_WORDS (hy, ly, y);
+#ifdef HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+  uint32_t uhx = hx & 0x7fffffff, uhy = hy & 0x7fffffff;
+  /* For the preferred quiet NaN convention, this operation is a
+     comparison of the representations of the arguments interpreted as
+     sign-magnitude integers.  If both arguments are NaNs, invert the
+     quiet/signaling bit so comparing that way works.  */
+  if ((uhx > 0x7ff00000 || (uhx == 0x7ff00000 && lx != 0))
+      && (uhy > 0x7ff00000 || (uhy == 0x7ff00000 && ly != 0)))
+    {
+      hx ^= 0x00080000;
+      hy ^= 0x00080000;
+    }
+#endif
+  uint32_t hx_sign = hx >> 31;
+  uint32_t hy_sign = hy >> 31;
+  hx ^= hx_sign >> 1;
+  lx ^= hx_sign;
+  hy ^= hy_sign >> 1;
+  ly ^= hy_sign;
+  return hx < hy || (hx == hy && lx <= ly);
+}
+#ifdef NO_LONG_DOUBLE
+weak_alias (totalorder, totalorderl)
+#endif
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c
new file mode 100644 (file)
index 0000000..02cd799
--- /dev/null
@@ -0,0 +1,49 @@
+/* Total order operation.  dbl-64/wordsize-64 version.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math_private.h>
+#include <stdint.h>
+
+int
+totalorder (double x, double y)
+{
+  int64_t ix, iy;
+  EXTRACT_WORDS64 (ix, x);
+  EXTRACT_WORDS64 (iy, y);
+#ifdef HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+  /* For the preferred quiet NaN convention, this operation is a
+     comparison of the representations of the arguments interpreted as
+     sign-magnitude integers.  If both arguments are NaNs, invert the
+     quiet/signaling bit so comparing that way works.  */
+  if ((ix & 0x7fffffffffffffffULL) > 0x7ff0000000000000ULL
+      && (iy & 0x7fffffffffffffffULL) > 0x7ff0000000000000ULL)
+    {
+      ix ^= 0x0008000000000000ULL;
+      iy ^= 0x0008000000000000ULL;
+    }
+#endif
+  uint64_t ix_sign = ix >> 63;
+  uint64_t iy_sign = iy >> 63;
+  ix ^= ix_sign >> 1;
+  iy ^= iy_sign >> 1;
+  return ix <= iy;
+}
+#ifdef NO_LONG_DOUBLE
+weak_alias (totalorder, totalorderl)
+#endif
diff --git a/sysdeps/ieee754/flt-32/s_totalorderf.c b/sysdeps/ieee754/flt-32/s_totalorderf.c
new file mode 100644 (file)
index 0000000..1ed30d8
--- /dev/null
@@ -0,0 +1,45 @@
+/* Total order operation.  flt-32 version.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math_private.h>
+#include <stdint.h>
+
+int
+totalorderf (float x, float y)
+{
+  int32_t ix, iy;
+  GET_FLOAT_WORD (ix, x);
+  GET_FLOAT_WORD (iy, y);
+#ifdef HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+  /* For the preferred quiet NaN convention, this operation is a
+     comparison of the representations of the arguments interpreted as
+     sign-magnitude integers.  If both arguments are NaNs, invert the
+     quiet/signaling bit so comparing that way works.  */
+  if ((ix & 0x7fffffff) > 0x7f800000 && (iy & 0x7fffffff) > 0x7f800000)
+    {
+      ix ^= 0x00400000;
+      iy ^= 0x00400000;
+    }
+#endif
+  uint32_t ix_sign = ix >> 31;
+  uint32_t iy_sign = iy >> 31;
+  ix ^= ix_sign >> 1;
+  iy ^= iy_sign >> 1;
+  return ix <= iy;
+}
diff --git a/sysdeps/ieee754/ldbl-128/s_totalorderl.c b/sysdeps/ieee754/ldbl-128/s_totalorderl.c
new file mode 100644 (file)
index 0000000..dc76ccf
--- /dev/null
@@ -0,0 +1,53 @@
+/* Total order operation.  ldbl-128 version.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math_private.h>
+#include <stdint.h>
+
+int
+totalorderl (_Float128 x, _Float128 y)
+{
+  int64_t hx, hy;
+  uint64_t lx, ly;
+  GET_LDOUBLE_WORDS64 (hx, lx, x);
+  GET_LDOUBLE_WORDS64 (hy, ly, y);
+#ifdef HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+  uint64_t uhx = hx & 0x7fffffffffffffffULL;
+  uint64_t uhy = hy & 0x7fffffffffffffffULL;
+  /* For the preferred quiet NaN convention, this operation is a
+     comparison of the representations of the arguments interpreted as
+     sign-magnitude integers.  If both arguments are NaNs, invert the
+     quiet/signaling bit so comparing that way works.  */
+  if ((uhx > 0x7fff000000000000ULL || (uhx == 0x7fff000000000000ULL
+                                      && lx != 0))
+      && (uhy > 0x7fff000000000000ULL || (uhy == 0x7fff000000000000ULL
+                                         && ly != 0)))
+    {
+      hx ^= 0x0000800000000000ULL;
+      hy ^= 0x0000800000000000ULL;
+    }
+#endif
+  uint64_t hx_sign = hx >> 63;
+  uint64_t hy_sign = hy >> 63;
+  hx ^= hx_sign >> 1;
+  lx ^= hx_sign;
+  hy ^= hy_sign >> 1;
+  ly ^= hy_sign;
+  return hx < hy || (hx == hy && lx <= ly);
+}
index 56bebf839118dc6586f055cbaab8e329206dce1c..eb625a72342393c25ce048962cb1b8d30c9138f9 100644 (file)
@@ -11,5 +11,6 @@ endif
 
 ifeq ($(subdir),math)
 tests += test-fmodl-ldbl-128ibm test-remainderl-ldbl-128ibm \
-        test-remquol-ldbl-128ibm test-iscanonical-ldbl-128ibm
+        test-remquol-ldbl-128ibm test-iscanonical-ldbl-128ibm \
+        test-totalorderl-ldbl-128ibm
 endif
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c b/sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c
new file mode 100644 (file)
index 0000000..1535b2f
--- /dev/null
@@ -0,0 +1,61 @@
+/* Total order operation.  ldbl-128ibm version.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math_private.h>
+#include <stdint.h>
+
+int
+totalorderl (long double x, long double y)
+{
+  double xhi, xlo, yhi, ylo;
+  int64_t hx, hy, lx, ly;
+
+  ldbl_unpack (x, &xhi, &xlo);
+  EXTRACT_WORDS64 (hx, xhi);
+  ldbl_unpack (y, &yhi, &ylo);
+  EXTRACT_WORDS64 (hy, yhi);
+#ifdef HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+# error not implemented
+#endif
+  uint64_t hx_sign = hx >> 63;
+  uint64_t hy_sign = hy >> 63;
+  int64_t hx_adj = hx ^ (hx_sign >> 1);
+  int64_t hy_adj = hy ^ (hy_sign >> 1);
+  if (hx_adj < hy_adj)
+    return 1;
+  else if (hx_adj > hy_adj)
+    return 0;
+
+  /* The high doubles are identical.  If they are NaNs or both the low
+     parts are zero, the low parts are not significant (and if they
+     are infinities, both the low parts must be zero).  */
+  if ((hx & 0x7fffffffffffffffULL) >= 0x7ff0000000000000ULL)
+    return 1;
+  EXTRACT_WORDS64 (lx, xlo);
+  EXTRACT_WORDS64 (ly, ylo);
+  if (((lx | ly) & 0x7fffffffffffffffULL) == 0)
+    return 1;
+
+  /* Otherwise compare the low parts.  */
+  uint64_t lx_sign = lx >> 63;
+  uint64_t ly_sign = ly >> 63;
+  lx ^= lx_sign >> 1;
+  ly ^= ly_sign >> 1;
+  return lx <= ly;
+}
diff --git a/sysdeps/ieee754/ldbl-128ibm/test-totalorderl-ldbl-128ibm.c b/sysdeps/ieee754/ldbl-128ibm/test-totalorderl-ldbl-128ibm.c
new file mode 100644 (file)
index 0000000..78b162c
--- /dev/null
@@ -0,0 +1,64 @@
+/* Test totalorderl for ldbl-128ibm.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <math_private.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+struct test
+{
+  double hi, lo1, lo2;
+};
+
+static const struct test tests[] =
+  {
+    { __builtin_nan (""), 1, __builtin_nans ("") },
+    { -__builtin_nan (""), 1, __builtin_nans ("") },
+    { __builtin_nans (""), 1, __builtin_nan ("") },
+    { -__builtin_nans (""), 1, __builtin_nan ("") },
+    { __builtin_inf (), 0.0, -0.0 },
+    { -__builtin_inf (), 0.0, -0.0 },
+    { 1.5, 0.0, -0.0 },
+  };
+
+static int
+do_test (void)
+{
+  int result = 0;
+
+  for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
+    {
+      long double ldx = ldbl_pack (tests[i].hi, tests[i].lo1);
+      long double ldy = ldbl_pack (tests[i].hi, tests[i].lo2);
+      bool to1 = totalorderl (ldx, ldy);
+      bool to2 = totalorderl (ldy, ldx);
+      if (to1 && to2)
+       printf ("PASS: test %zu\n", i);
+      else
+       {
+         printf ("FAIL: test %zu\n", i);
+         result = 1;
+       }
+    }
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index bf9676e907b27cde60a8aea48daf08e5b4aa759f..931976d7b1df4c2e911bbd6fddb766d16ea87fe2 100644 (file)
@@ -17,5 +17,5 @@
 # <http://www.gnu.org/licenses/>.
 
 ifeq ($(subdir),math)
-tests += test-iscanonical-ldbl-96
+tests += test-iscanonical-ldbl-96 test-totalorderl-ldbl-96
 endif
diff --git a/sysdeps/ieee754/ldbl-96/s_totalorderl.c b/sysdeps/ieee754/ldbl-96/s_totalorderl.c
new file mode 100644 (file)
index 0000000..4f14baf
--- /dev/null
@@ -0,0 +1,56 @@
+/* Total order operation.  ldbl-96 version.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <float.h>
+#include <math.h>
+#include <math_private.h>
+#include <stdint.h>
+
+int
+totalorderl (long double x, long double y)
+{
+  int16_t expx, expy;
+  uint32_t hx, hy;
+  uint32_t lx, ly;
+  GET_LDOUBLE_WORDS (expx, hx, lx, x);
+  GET_LDOUBLE_WORDS (expy, hy, ly, y);
+  if (LDBL_MIN_EXP == -16382)
+    {
+      /* M68K variant: for the greatest exponent, the high mantissa
+        bit is not significant and both values of it are valid, so
+        set it before comparing.  For the Intel variant, only one
+        value of the high mantissa bit is valid for each exponent, so
+        this is not necessary.  */
+      if ((expx & 0x7fff) == 0x7fff)
+       hx |= 0x80000000;
+      if ((expy & 0x7fff) == 0x7fff)
+       hy |= 0x80000000;
+    }
+#ifdef HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+# error not implemented
+#endif
+  uint32_t x_sign = expx >> 15;
+  uint32_t y_sign = expy >> 15;
+  expx ^= x_sign >> 17;
+  hx ^= x_sign;
+  lx ^= x_sign;
+  expy ^= y_sign >> 17;
+  hy ^= y_sign;
+  ly ^= y_sign;
+  return expx < expy || (expx == expy && (hx < hy || (hx == hy && lx <= ly)));
+}
diff --git a/sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c b/sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c
new file mode 100644 (file)
index 0000000..07fa772
--- /dev/null
@@ -0,0 +1,71 @@
+/* Test totalorderl for ldbl-96.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <float.h>
+#include <math.h>
+#include <math_private.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+
+static const uint64_t tests[] =
+  {
+    0, 1, 0x4000000000000000ULL, 0x4000000000000001ULL,
+    0x7fffffffffffffffULL
+  };
+
+static int
+do_test (void)
+{
+  int result = 0;
+
+  if (LDBL_MIN_EXP == -16382)
+    for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
+      {
+       long double ldx, ldy, ldnx, ldny;
+       /* Verify that the high bit of the mantissa is ignored for
+          infinities and NaNs for the M68K variant of this
+          format.  */
+       SET_LDOUBLE_WORDS (ldx, 0x7fff,
+                          tests[i] >> 32, tests[i] & 0xffffffffULL);
+       SET_LDOUBLE_WORDS (ldy, 0x7fff,
+                          (tests[i] >> 32) | 0x80000000,
+                          tests[i] & 0xffffffffULL);
+       SET_LDOUBLE_WORDS (ldnx, 0xffff,
+                          tests[i] >> 32, tests[i] & 0xffffffffULL);
+       SET_LDOUBLE_WORDS (ldny, 0xffff,
+                          (tests[i] >> 32) | 0x80000000,
+                          tests[i] & 0xffffffffULL);
+       bool to1 = totalorderl (ldx, ldy);
+       bool to2 = totalorderl (ldy, ldx);
+       bool to3 = totalorderl (ldnx, ldny);
+       bool to4 = totalorderl (ldny, ldnx);
+       if (to1 && to2 && to3 && to4)
+         printf ("PASS: test %zu\n", i);
+       else
+         {
+           printf ("FAIL: test %zu\n", i);
+           result = 1;
+         }
+      }
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index af08209570b3af528981ed240553ee35055df91c..12255d6951610958c03982064939c110975ae17d 100644 (file)
@@ -41,7 +41,7 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
                 isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \
                 isoc99_wscanf isoc99_fwscanf isoc99_swscanf \
                 isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf \
-                nextup nextdown
+                nextup nextdown totalorder
 libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
 libnldbl-inhibit-o = $(object-suffixes)
 libnldbl-static-only-routines = $(libnldbl-routines)
@@ -142,6 +142,7 @@ CFLAGS-nldbl-sqrt.c = -fno-builtin-sqrtl
 CFLAGS-nldbl-tan.c = -fno-builtin-tanl
 CFLAGS-nldbl-tanh.c = -fno-builtin-tanhl
 CFLAGS-nldbl-tgamma.c = -fno-builtin-tgammal
+CFLAGS-nldbl-totalorder.c = -fno-builtin-totalorderl
 CFLAGS-nldbl-trunc.c = -fno-builtin-truncl
 CFLAGS-nldbl-y0.c = -fno-builtin-y0l
 CFLAGS-nldbl-y1.c = -fno-builtin-y1l
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c b/sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c
new file mode 100644 (file)
index 0000000..0be5a6d
--- /dev/null
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for totalorder.
+   Copyright (C) 2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+totalorderl (double x, double y)
+{
+  return totalorder (x, y);
+}
index cdc65c3069a0a7c57c019f9def6331e1f09b5fe2..8f01f608874b550f0c04567a4530fafbea4c2d05 100644 (file)
@@ -386,3 +386,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
index 1ec00012c8a1234d05bb8973d0d6f9bf4686a6a1..32a464ac50af576e821e3920754563f7d1005372 100644 (file)
@@ -418,3 +418,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
index 1edbb96e87c1895da62beff477b95fa896a7f840..3c7ed06bf4f07c04f662718c4a1eec433de67ba7 100644 (file)
@@ -428,6 +428,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.3.4 GLIBC_2.3.4 A
 GLIBC_2.3.4 __c1_cabsf F
 GLIBC_2.3.4 __c1_cacosf F
index 26d9cc674be220e0199731bdec6f3d159eae7be0..df07c0813f6fa6ae79ed10d0c3263d7ca6311d89 100644 (file)
@@ -75,6 +75,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 _LIB_VERSION D 0x4
 GLIBC_2.4 __clog10 F
index a191cd8e0b107ddfcfb11048884fbd745868fe92..8843496ece5a2f0ef47134c7fcc0f0827502084e 100644 (file)
@@ -387,5 +387,8 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 exp2l F
index 0a0383f01641599347a000dc774f0ebe6ccc625e..d1906009937f9877ead3702daa01fb5794a769c0 100644 (file)
@@ -431,4 +431,7 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
index 017b0f9f7a915951fbf1ace8796f6a15b84d14e8..134ac93610cfc1f48794cecb15368ac26705e599 100644 (file)
@@ -360,4 +360,7 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
index 26d9cc674be220e0199731bdec6f3d159eae7be0..df07c0813f6fa6ae79ed10d0c3263d7ca6311d89 100644 (file)
@@ -75,6 +75,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 _LIB_VERSION D 0x4
 GLIBC_2.4 __clog10 F
index 945d51e325a0e6cf7c4b86d86dfee594d1b2b945..92330262a592db7de12d3c98dd0d828642396843 100644 (file)
@@ -429,4 +429,7 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
index deb4189844a42dbe0ca5e86fe9e0b042dce2e301..c2e23410077606c6bf066094955ab393b3f05eba 100644 (file)
@@ -386,3 +386,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
index ceb12918e9905afc1be4a731359562910cec558d..0711143030ba80088f85e6b50c4efb1c119aba37 100644 (file)
@@ -388,6 +388,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 exp2l F
 _gp_disp _gp_disp A
index 003fe7b56794783bfbe80f3943f568e31446ce34..8a8c95b52949fa3b8a16c2800645661d0de1db39 100644 (file)
@@ -420,4 +420,7 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
index d57c3ebc1cff224654edb961734e3a871c9c5c32..c0c94ac4fd9eec2d1f70997a9ced046ae3ef6b4b 100644 (file)
@@ -386,3 +386,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
index b22ec567403c2106ec7ece4b9054eefa49532172..2bec6c63b46b14f58c80638166ed0abee3f6d99d 100644 (file)
@@ -431,6 +431,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
index 777a39d0e15c9e0c2ff1ec1ed4d42691dc8a55b6..4e04409a83282018a72aa79f73ec507f90c7c8b2 100644 (file)
@@ -430,6 +430,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
index 1b900c7144d53ee0760de8eefcc7ac917af936a9..1a30becc27cfb72d7a3d2950202ddfbb09c15e58 100644 (file)
@@ -425,3 +425,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
index 0a8600e29de30c560631af4b77a20c5a70c59c30..015a1149f228b166448c10ee8a5c6d90fb5c2093 100644 (file)
@@ -106,6 +106,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 _LIB_VERSION D 0x4
 GLIBC_2.3 __clog10 F
index d7fff5327fa235c1d728b6bb18ca0629ff5b68f3..0c2c3e90a4386cb8bfe2ff8d2b8e5809a9486415 100644 (file)
@@ -418,6 +418,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
index 4d682e604f1424cefedeaac00ab991e2984e8a62..d19275302052c341e6e733a90e35bfdbd96919b1 100644 (file)
@@ -416,6 +416,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
index 0092b62a240183442b47d7d4916353f072ca0f57..3f6a29622ce523739e7e7a7da30d3fd0840f4ae9 100644 (file)
@@ -387,5 +387,8 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 exp2l F
index 4ad593cbae3ff80cc860627ed274bc4ad7fa2cc5..739a06134a061cbaf39d500ac694cdcd248b6048 100644 (file)
@@ -421,6 +421,9 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
index 90a2bd57edf879e3edebd5c8b2b1d385cd24a9a4..80fd387a32627738af49aea36a9a4168446c5b8d 100644 (file)
@@ -419,4 +419,7 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
index 5d502c0bc8a352c6d17d949c21f44ab3d345db69..6154ee89802af9ee6ab1517004542415cc790732 100644 (file)
@@ -387,3 +387,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
index 5d502c0bc8a352c6d17d949c21f44ab3d345db69..6154ee89802af9ee6ab1517004542415cc790732 100644 (file)
@@ -387,3 +387,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
index 5d502c0bc8a352c6d17d949c21f44ab3d345db69..6154ee89802af9ee6ab1517004542415cc790732 100644 (file)
@@ -387,3 +387,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
index 3364b0271d2158f2831965e18432e2067e1a5b00..9b2c5abfe69fa544c1af1f8ef8816d6c109d9988 100644 (file)
@@ -420,4 +420,7 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
 GLIBC_2.4 GLIBC_2.4 A
index 6a3a3ce0ca394449e70bda5a6daf456389b5744c..a93e4837e6ad2a375261b54dbefe0241b9b92b67 100644 (file)
@@ -419,3 +419,6 @@ GLIBC_2.25 fegetmode F
 GLIBC_2.25 fesetexcept F
 GLIBC_2.25 fesetmode F
 GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F