$ git diff --patch-with-stat --summary e55355fcc88cab5381db92422f66eec686e49bce..65c46b016b5811a385c120ef0546f9d71625800f
...x86-64-Remove-sysdeps-x86_64-fpu-s_sinf.S.patch | 587 +
0002-x86-64-Add-sinf-with-FMA.patch | 106 +
exp.patch | 144 -
exp2.patch | 1265 +
fma-expf-fix.patch | 67 -
fma-expf.patch | 473 -
fma.patch | 964 -
glibc-2.25.90-Float128-clang.patch | 53 -
glibc-2.26-float128-clang-6.0.patch | 88 +
glibc.spec | 29 +-
math-2.27.patch | 29404 +++++++++++++++++++
mathlto.patch | 30 +-
12 files changed, 31482 insertions(+), 1728 deletions(-)
create mode 100644 0001-x86-64-Remove-sysdeps-x86_64-fpu-s_sinf.S.patch
create mode 100644 0002-x86-64-Add-sinf-with-FMA.patch
delete mode 100644 exp.patch
create mode 100644 exp2.patch
delete mode 100644 fma-expf-fix.patch
delete mode 100644 fma-expf.patch
delete mode 100644 fma.patch
delete mode 100644 glibc-2.25.90-Float128-clang.patch
create mode 100644 glibc-2.26-float128-clang-6.0.patch
create mode 100644 math-2.27.patch
diff --git a/0001-x86-64-Remove-sysdeps-x86_64-fpu-s_sinf.S.patch b/0001-x86-64-Remove-sysdeps-x86_64-fpu-s_sinf.S.patch
new file mode 100644
index 0000000..a3f44a8
--- /dev/null
+++ b/0001-x86-64-Remove-sysdeps-x86_64-fpu-s_sinf.S.patch
@@ -0,0 +1,587 @@
+From 9574c7b68ddc9f2b940d412dca87592414274b48 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Thu, 7 Dec 2017 09:44:04 -0800
+Subject: [PATCH 1/2] x86-64: Remove sysdeps/x86_64/fpu/s_sinf.S
+
+On Ivy Bridge, bench-sinf reports performance improvement:
+
+ s_sinf.S s_sinf.c Improvement
+max 91.521 86.148 6%
+min 14.061 11.265 25%
+mean 23.3758 23.3344 0.2%
+
+ * sysdeps/x86_64/fpu/s_sinf.S: Removed.
+---
+ ChangeLog | 4 +
+ sysdeps/x86_64/fpu/s_sinf.S | 559 --------------------------------------------
+ 2 files changed, 4 insertions(+), 559 deletions(-)
+ delete mode 100644 sysdeps/x86_64/fpu/s_sinf.S
+
+diff --git a/sysdeps/x86_64/fpu/s_sinf.S b/sysdeps/x86_64/fpu/s_sinf.S
+deleted file mode 100644
+index c505d60091..0000000000
+--- a/sysdeps/x86_64/fpu/s_sinf.S
++++ /dev/null
+@@ -1,559 +0,0 @@
+-/* Optimized sinf function.
+- Copyright (C) 2012-2017 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 <sysdep.h>
+-#include <errno.h>
+-#include <libm-alias-float.h>
+-
+-/* Short algorithm description:
+- *
+- * 1) if |x| == 0: return x.
+- * 2) if |x| < 2^-27: return x-x*DP_SMALL, raise underflow only when needed.
+- * 3) if |x| < 2^-5 : return x+x^3*DP_SIN2_0+x^5*DP_SIN2_1.
+- * 4) if |x| < Pi/4: return x+x^3*(S0+x^2*(S1+x^2*(S2+x^2*(S3+x^2*S4)))).
+- * 5) if |x| < 9*Pi/4:
+- * 5.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0x0e, n=k+1,
+- * t=|x|-j*Pi/4.
+- * 5.2) Reconstruction:
+- * s = sign(x) * (-1.0)^((n>>2)&1)
+- * if(n&2 != 0) {
+- * using cos(t) polynomial for |t|<Pi/4, result is
+- * s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4))))).
+- * } else {
+- * using sin(t) polynomial for |t|<Pi/4, result is
+- * s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4))))).
+- * }
+- * 6) if |x| < 2^23, large args:
+- * 6.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1,
+- * t=|x|-j*Pi/4.
+- * 6.2) Reconstruction same as (5.2).
+- * 7) if |x| >= 2^23, very large args:
+- * 7.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1,
+- * t=|x|-j*Pi/4.
+- * 7.2) Reconstruction same as (5.2).
+- * 8) if x is Inf, return x-x, and set errno=EDOM.
+- * 9) if x is NaN, return x-x.
+- *
+- * Special cases:
+- * sin(+-0) = +-0 not raising inexact/underflow,
+- * sin(subnormal) raises inexact/underflow,
+- * sin(min_normalized) raises inexact/underflow,
+- * sin(normalized) raises inexact,
+- * sin(Inf) = NaN, raises invalid, sets errno to EDOM,
+- * sin(NaN) = NaN.
+- */
+-
+- .text
+-ENTRY(__sinf)
+- /* Input: single precision x in %xmm0 */
+-
+- movd %xmm0, %eax /* Bits of x */
+- movaps %xmm0, %xmm7 /* Copy of x */
+- cvtss2sd %xmm0, %xmm0 /* DP x */
+- movss L(SP_ABS_MASK)(%rip), %xmm3
+- movl %eax, %edi /* Copy of x bits */
+- andl $0x7fffffff, %eax /* |x| */
+-
+- cmpl $0x3f490fdb, %eax /* |x|<Pi/4? */
+- jb L(arg_less_pio4)
+-
+- /* Here if |x|>=Pi/4 */
+- andps %xmm7, %xmm3 /* SP |x| */
+- andpd L(DP_ABS_MASK)(%rip),%xmm0 /* DP |x| */
+- movss L(SP_INVPIO4)(%rip), %xmm2 /* SP 1/(Pi/4) */
+-
+- cmpl $0x40e231d6, %eax /* |x|<9*Pi/4? */
+- jae L(large_args)
+-
+- /* Here if Pi/4<=|x|<9*Pi/4 */
+- mulss %xmm3, %xmm2 /* SP |x|/(Pi/4) */
+- movl %edi, %ecx /* Load x */
+- cvttss2si %xmm2, %eax /* k, number of Pi/4 in x */
+- lea L(PIO4J)(%rip), %rsi
+- shrl $31, %ecx /* sign of x */
+- addl $1, %eax /* k+1 */
+- movl $0x0e, %edx
+- andl %eax, %edx /* j = (k+1)&0x0e */
+- subsd (%rsi,%rdx,8), %xmm0 /* t = |x| - j * Pi/4 */
+-
+-L(reconstruction):
+- /* Input: %eax=n, %xmm0=t, %ecx=sign(x) */
+- testl $2, %eax /* n&2 != 0? */
+- jz L(sin_poly)
+-
+-/*L(cos_poly):*/
+- /* Here if sin(x) calculated using cos(t) polynomial for |t|<Pi/4:
+- * y = t*t; z = y*y;
+- * s = sign(x) * (-1.0)^((n>>2)&1)
+- * result = s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))))
+- */
+- shrl $2, %eax /* n>>2 */
+- mulsd %xmm0, %xmm0 /* y=t^2 */
+- andl $1, %eax /* (n>>2)&1 */
+- movaps %xmm0, %xmm1 /* y */
+- mulsd %xmm0, %xmm0 /* z=t^4 */
+-
+- movsd L(DP_C4)(%rip), %xmm4 /* C4 */
+- mulsd %xmm0, %xmm4 /* z*C4 */
+- xorl %eax, %ecx /* (-1.0)^((n>>2)&1) XOR sign(x) */
+- movsd L(DP_C3)(%rip), %xmm3 /* C3 */
+- mulsd %xmm0, %xmm3 /* z*C3 */
+- lea L(DP_ONES)(%rip), %rsi
+- addsd L(DP_C2)(%rip), %xmm4 /* C2+z*C4 */
+- mulsd %xmm0, %xmm4 /* z*(C2+z*C4) */
+- addsd L(DP_C1)(%rip), %xmm3 /* C1+z*C3 */
+- mulsd %xmm0, %xmm3 /* z*(C1+z*C3) */
+- addsd L(DP_C0)(%rip), %xmm4 /* C0+z*(C2+z*C4) */
+- mulsd %xmm1, %xmm4 /* y*(C0+z*(C2+z*C4)) */
+-
+- /* y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+- addsd %xmm4, %xmm3
+- /* 1.0+y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+- addsd L(DP_ONES)(%rip), %xmm3
+-
+- mulsd (%rsi,%rcx,8), %xmm3 /* DP result */
+- cvtsd2ss %xmm3, %xmm0 /* SP result */
+- ret
+-
+- .p2align 4
+-L(sin_poly):
+- /* Here if sin(x) calculated using sin(t) polynomial for |t|<Pi/4:
+- * y = t*t; z = y*y;
+- * s = sign(x) * (-1.0)^((n>>2)&1)
+- * result = s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))))
+- */
+-
+- movaps %xmm0, %xmm4 /* t */
+- shrl $2, %eax /* n>>2 */
+- mulsd %xmm0, %xmm0 /* y=t^2 */
+- andl $1, %eax /* (n>>2)&1 */
+- movaps %xmm0, %xmm1 /* y */
+- xorl %eax, %ecx /* (-1.0)^((n>>2)&1) XOR sign(x) */
+- mulsd %xmm0, %xmm0 /* z=t^4 */
+-
+- movsd L(DP_S4)(%rip), %xmm2 /* S4 */
+- mulsd %xmm0, %xmm2 /* z*S4 */
+- movsd L(DP_S3)(%rip), %xmm3 /* S3 */
+- mulsd %xmm0, %xmm3 /* z*S3 */
+- lea L(DP_ONES)(%rip), %rsi
+- addsd L(DP_S2)(%rip), %xmm2 /* S2+z*S4 */
+- mulsd %xmm0, %xmm2 /* z*(S2+z*S4) */
+- addsd L(DP_S1)(%rip), %xmm3 /* S1+z*S3 */
+- mulsd %xmm0, %xmm3 /* z*(S1+z*S3) */
+- addsd L(DP_S0)(%rip), %xmm2 /* S0+z*(S2+z*S4) */
+- mulsd %xmm1, %xmm2 /* y*(S0+z*(S2+z*S4)) */
+- /* t*s, where s = sign(x) * (-1.0)^((n>>2)&1) */
+- mulsd (%rsi,%rcx,8), %xmm4
+- /* y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+- addsd %xmm2, %xmm3
+- /* t*s*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+- mulsd %xmm4, %xmm3
+- /* t*s*(1.0+y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+- addsd %xmm4, %xmm3
+- cvtsd2ss %xmm3, %xmm0 /* SP result */
+- ret
+-
+- .p2align 4
+-L(large_args):
+- /* Here if |x|>=9*Pi/4 */
+- cmpl $0x7f800000, %eax /* x is Inf or NaN? */
+- jae L(arg_inf_or_nan)
+-
+- /* Here if finite |x|>=9*Pi/4 */
+- cmpl $0x4b000000, %eax /* |x|<2^23? */
+- jae L(very_large_args)
+-
+- /* Here if 9*Pi/4<=|x|<2^23 */
+- movsd L(DP_INVPIO4)(%rip), %xmm1 /* 1/(Pi/4) */
+- mulsd %xmm0, %xmm1 /* |x|/(Pi/4) */
+- cvttsd2si %xmm1, %eax /* k=trunc(|x|/(Pi/4)) */
+- addl $1, %eax /* k+1 */
+- movl %eax, %edx
+- andl $0xfffffffe, %edx /* j=(k+1)&0xfffffffe */
+- cvtsi2sdl %edx, %xmm4 /* DP j */
+- movl %edi, %ecx /* Load x */
+- movsd L(DP_PIO4HI)(%rip), %xmm2 /* -PIO4HI = high part of -Pi/4 */
+- shrl $31, %ecx /* sign bit of x */
+- mulsd %xmm4, %xmm2 /* -j*PIO4HI */
+- movsd L(DP_PIO4LO)(%rip), %xmm3 /* -PIO4LO = low part of -Pi/4 */
+- addsd %xmm2, %xmm0 /* |x| - j*PIO4HI */
+- mulsd %xmm3, %xmm4 /* j*PIO4LO */
+- addsd %xmm4, %xmm0 /* t = |x| - j*PIO4HI - j*PIO4LO */
+- jmp L(reconstruction)
+-
+- .p2align 4
+-L(very_large_args):
+- /* Here if finite |x|>=2^23 */
+-
+- /* bitpos = (ix>>23) - BIAS_32 + 59; */
+- shrl $23, %eax /* eb = biased exponent of x */
+- /* bitpos = eb - 0x7f + 59, where 0x7f is exponent bias */
+- subl $68, %eax
+- movl $28, %ecx /* %cl=28 */
+- movl %eax, %edx /* bitpos copy */
+-
+- /* j = bitpos/28; */
+- div %cl /* j in register %al=%ax/%cl */
+- movapd %xmm0, %xmm3 /* |x| */
+- /* clear unneeded remainder from %ah */
+- andl $0xff, %eax
+-
+- imull $28, %eax, %ecx /* j*28 */
+- lea L(_FPI)(%rip), %rsi
+- movsd L(DP_HI_MASK)(%rip), %xmm4 /* DP_HI_MASK */
+- movapd %xmm0, %xmm5 /* |x| */
+- mulsd -16(%rsi,%rax,8), %xmm3 /* tmp3 = FPI[j-2]*|x| */
+- movapd %xmm0, %xmm1 /* |x| */
+- mulsd -8(%rsi,%rax,8), %xmm5 /* tmp2 = FPI[j-1]*|x| */
+- mulsd (%rsi,%rax,8), %xmm0 /* tmp0 = FPI[j]*|x| */
+- addl $19, %ecx /* j*28+19 */
+- mulsd 8(%rsi,%rax,8), %xmm1 /* tmp1 = FPI[j+1]*|x| */
+- cmpl %ecx, %edx /* bitpos>=j*28+19? */
+- jl L(very_large_skip1)
+-
+- /* Here if bitpos>=j*28+19 */
+- andpd %xmm3, %xmm4 /* HI(tmp3) */
+- subsd %xmm4, %xmm3 /* tmp3 = tmp3 - HI(tmp3) */
+-L(very_large_skip1):
+-
+- movsd L(DP_2POW52)(%rip), %xmm6
+- movapd %xmm5, %xmm2 /* tmp2 copy */
+- addsd %xmm3, %xmm5 /* tmp5 = tmp3 + tmp2 */
+- movl $1, %edx
+- addsd %xmm5, %xmm6 /* tmp6 = tmp5 + 2^52 */
+- movsd 8+L(DP_2POW52)(%rip), %xmm4
+- movd %xmm6, %eax /* k = I64_LO(tmp6); */
+- addsd %xmm6, %xmm4 /* tmp4 = tmp6 - 2^52 */
+- movl %edi, %ecx /* Load x */
+- comisd %xmm5, %xmm4 /* tmp4 > tmp5? */
+- jbe L(very_large_skip2)
+-
+- /* Here if tmp4 > tmp5 */
+- subl $1, %eax /* k-- */
+- addsd 8+L(DP_ONES)(%rip), %xmm4 /* tmp4 -= 1.0 */
+-L(very_large_skip2):
+-
+- andl %eax, %edx /* k&1 */
+- lea L(DP_ZERONE)(%rip), %rsi
+- subsd %xmm4, %xmm3 /* tmp3 -= tmp4 */
+- addsd (%rsi,%rdx,8), %xmm3 /* t = DP_ZERONE[k&1] + tmp3 */
+- addsd %xmm2, %xmm3 /* t += tmp2 */
+- shrl $31, %ecx /* sign of x */
+- addsd %xmm3, %xmm0 /* t += tmp0 */
+- addl $1, %eax /* n=k+1 */
+- addsd %xmm1, %xmm0 /* t += tmp1 */
+- mulsd L(DP_PIO4)(%rip), %xmm0 /* t *= PI04 */
+-
+- jmp L(reconstruction) /* end of very_large_args peth */
+-
+- .p2align 4
+-L(arg_less_pio4):
+- /* Here if |x|<Pi/4 */
+- cmpl $0x3d000000, %eax /* |x|<2^-5? */
+- jl L(arg_less_2pn5)
+-
+- /* Here if 2^-5<=|x|<Pi/4 */
+- movaps %xmm0, %xmm3 /* x */
+- mulsd %xmm0, %xmm0 /* y=x^2 */
+- movaps %xmm0, %xmm1 /* y */
+- mulsd %xmm0, %xmm0 /* z=x^4 */
+- movsd L(DP_S4)(%rip), %xmm4 /* S4 */
+- mulsd %xmm0, %xmm4 /* z*S4 */
+- movsd L(DP_S3)(%rip), %xmm5 /* S3 */
+- mulsd %xmm0, %xmm5 /* z*S3 */
+- addsd L(DP_S2)(%rip), %xmm4 /* S2+z*S4 */
+- mulsd %xmm0, %xmm4 /* z*(S2+z*S4) */
+- addsd L(DP_S1)(%rip), %xmm5 /* S1+z*S3 */
+- mulsd %xmm0, %xmm5 /* z*(S1+z*S3) */
+- addsd L(DP_S0)(%rip), %xmm4 /* S0+z*(S2+z*S4) */
+- mulsd %xmm1, %xmm4 /* y*(S0+z*(S2+z*S4)) */
+- mulsd %xmm3, %xmm5 /* x*z*(S1+z*S3) */
+- mulsd %xmm3, %xmm4 /* x*y*(S0+z*(S2+z*S4)) */
+- /* x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+- addsd %xmm5, %xmm4
+- /* x + x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+- addsd %xmm4, %xmm3
+- cvtsd2ss %xmm3, %xmm0 /* SP result */
+- ret
+-
+- .p2align 4
+-L(arg_less_2pn5):
+- /* Here if |x|<2^-5 */
+- cmpl $0x32000000, %eax /* |x|<2^-27? */
+- jl L(arg_less_2pn27)
+-
+- /* Here if 2^-27<=|x|<2^-5 */
+- movaps %xmm0, %xmm1 /* DP x */
+- mulsd %xmm0, %xmm0 /* DP x^2 */
+- movsd L(DP_SIN2_1)(%rip), %xmm3 /* DP DP_SIN2_1 */
+- mulsd %xmm0, %xmm3 /* DP x^2*DP_SIN2_1 */
+- addsd L(DP_SIN2_0)(%rip), %xmm3 /* DP DP_SIN2_0+x^2*DP_SIN2_1 */
+- mulsd %xmm0, %xmm3 /* DP x^2*DP_SIN2_0+x^4*DP_SIN2_1 */
+- mulsd %xmm1, %xmm3 /* DP x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+- addsd %xmm1, %xmm3 /* DP x+x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+- cvtsd2ss %xmm3, %xmm0 /* SP result */
+- ret
+-
+- .p2align 4
+-L(arg_less_2pn27):
+- cmpl $0, %eax /* x=0? */
+- je L(arg_zero) /* in case x=0 return sin(+-0)==+-0 */
+- /* Here if |x|<2^-27 */
+- /*
+- * Special cases here:
+- * sin(subnormal) raises inexact/underflow
+- * sin(min_normalized) raises inexact/underflow
+- * sin(normalized) raises inexact
+- */
+- movaps %xmm0, %xmm3 /* Copy of DP x */
+- mulsd L(DP_SMALL)(%rip), %xmm0 /* x*DP_SMALL */
+- subsd %xmm0, %xmm3 /* Result is x-x*DP_SMALL */
+- cvtsd2ss %xmm3, %xmm0 /* Result converted to SP */
+- ret
+-
+- .p2align 4
+-L(arg_zero):
+- movaps %xmm7, %xmm0 /* SP x */
+- ret
+-
+- .p2align 4
+-L(arg_inf_or_nan):
+- /* Here if |x| is Inf or NAN */
+- jne L(skip_errno_setting) /* in case of x is NaN */
+-
+- /* Align stack to 16 bytes. */
+- subq $8, %rsp
+- cfi_adjust_cfa_offset (8)
+- /* Here if x is Inf. Set errno to EDOM. */
+- call JUMPTARGET(__errno_location)
+- addq $8, %rsp
+- cfi_adjust_cfa_offset (-8)
+-
+- movl $EDOM, (%rax)
+-
+- .p2align 4
+-L(skip_errno_setting):
+- /* Here if |x| is Inf or NAN. Continued. */
+- movaps %xmm7, %xmm0 /* load x */
+- subss %xmm0, %xmm0 /* Result is NaN */
+- ret
+-END(__sinf)
+-
+- .section .rodata, "a"
+- .p2align 3
+-L(PIO4J): /* Table of j*Pi/4, for j=0,1,..,10 */
+- .long 0x00000000,0x00000000
+- .long 0x54442d18,0x3fe921fb
+- .long 0x54442d18,0x3ff921fb
+- .long 0x7f3321d2,0x4002d97c
+- .long 0x54442d18,0x400921fb
+- .long 0x2955385e,0x400f6a7a
+- .long 0x7f3321d2,0x4012d97c
+- .long 0xe9bba775,0x4015fdbb
+- .long 0x54442d18,0x401921fb
+- .long 0xbeccb2bb,0x401c463a
+- .long 0x2955385e,0x401f6a7a
+- .type L(PIO4J), @object
+- ASM_SIZE_DIRECTIVE(L(PIO4J))
+-
+- .p2align 3
+-L(_FPI): /* 4/Pi broken into sum of positive DP values */
+- .long 0x00000000,0x00000000
+- .long 0x6c000000,0x3ff45f30
+- .long 0x2a000000,0x3e3c9c88
+- .long 0xa8000000,0x3c54fe13
+- .long 0xd0000000,0x3aaf47d4
+- .long 0x6c000000,0x38fbb81b
+- .long 0xe0000000,0x3714acc9
+- .long 0x7c000000,0x3560e410
+- .long 0x56000000,0x33bca2c7
+- .long 0xac000000,0x31fbd778
+- .long 0xe0000000,0x300b7246
+- .long 0xe8000000,0x2e5d2126
+- .long 0x48000000,0x2c970032
+- .long 0xe8000000,0x2ad77504
+- .long 0xe0000000,0x290921cf
+- .long 0xb0000000,0x274deb1c
+- .long 0xe0000000,0x25829a73
+- .long 0xbe000000,0x23fd1046
+- .long 0x10000000,0x2224baed
+- .long 0x8e000000,0x20709d33
+- .long 0x80000000,0x1e535a2f
+- .long 0x64000000,0x1cef904e
+- .long 0x30000000,0x1b0d6398
+- .long 0x24000000,0x1964ce7d
+- .long 0x16000000,0x17b908bf
+- .type L(_FPI), @object
+- ASM_SIZE_DIRECTIVE(L(_FPI))
+-
+-/* Coefficients of polynomial
+- for sin(x)~=x+x^3*DP_SIN2_0+x^5*DP_SIN2_1, |x|<2^-5. */
+- .p2align 3
+-L(DP_SIN2_0):
+- .long 0x5543d49d,0xbfc55555
+- .type L(DP_SIN2_0), @object
+- ASM_SIZE_DIRECTIVE(L(DP_SIN2_0))
+-
+- .p2align 3
+-L(DP_SIN2_1):
+- .long 0x75cec8c5,0x3f8110f4
+- .type L(DP_SIN2_1), @object
+- ASM_SIZE_DIRECTIVE(L(DP_SIN2_1))
+-
+- .p2align 3
+-L(DP_ZERONE):
+- .long 0x00000000,0x00000000 /* 0.0 */
+- .long 0x00000000,0xbff00000 /* 1.0 */
+- .type L(DP_ZERONE), @object
+- ASM_SIZE_DIRECTIVE(L(DP_ZERONE))
+-
+- .p2align 3
+-L(DP_ONES):
+- .long 0x00000000,0x3ff00000 /* +1.0 */
+- .long 0x00000000,0xbff00000 /* -1.0 */
+- .type L(DP_ONES), @object
+- ASM_SIZE_DIRECTIVE(L(DP_ONES))
+-
+-/* Coefficients of polynomial
+- for sin(t)~=t+t^3*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))), |t|<Pi/4. */
+- .p2align 3
+-L(DP_S3):
+- .long 0x64e6b5b4,0x3ec71d72
+- .type L(DP_S3), @object
+- ASM_SIZE_DIRECTIVE(L(DP_S3))
+-
+- .p2align 3
+-L(DP_S1):
+- .long 0x10c2688b,0x3f811111
+- .type L(DP_S1), @object
+- ASM_SIZE_DIRECTIVE(L(DP_S1))
+-
+- .p2align 3
+-L(DP_S4):
+- .long 0x1674b58a,0xbe5a947e
+- .type L(DP_S4), @object
+- ASM_SIZE_DIRECTIVE(L(DP_S4))
+-
+- .p2align 3
+-L(DP_S2):
+- .long 0x8b4bd1f9,0xbf2a019f
+- .type L(DP_S2), @object
+- ASM_SIZE_DIRECTIVE(L(DP_S2))
+-
+- .p2align 3
+-L(DP_S0):
+- .long 0x55551cd9,0xbfc55555
+- .type L(DP_S0), @object
+- ASM_SIZE_DIRECTIVE(L(DP_S0))
+-
+- .p2align 3
+-L(DP_SMALL):
+- .long 0x00000000,0x3cd00000 /* 2^(-50) */
+- .type L(DP_SMALL), @object
+- ASM_SIZE_DIRECTIVE(L(DP_SMALL))
+-
+-/* Coefficients of polynomial
+- for cos(t)~=1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))), |t|<Pi/4. */
+- .p2align 3
+-L(DP_C3):
+- .long 0x9ac43cc0,0x3efa00eb
+- .type L(DP_C3), @object
+- ASM_SIZE_DIRECTIVE(L(DP_C3))
+-
+- .p2align 3
+-L(DP_C1):
+- .long 0x545c50c7,0x3fa55555
+- .type L(DP_C1), @object
+- ASM_SIZE_DIRECTIVE(L(DP_C1))
+-
+- .p2align 3
+-L(DP_C4):
+- .long 0xdd8844d7,0xbe923c97
+- .type L(DP_C4), @object
+- ASM_SIZE_DIRECTIVE(L(DP_C4))
+-
+- .p2align 3
+-L(DP_C2):
+- .long 0x348b6874,0xbf56c16b
+- .type L(DP_C2), @object
+- ASM_SIZE_DIRECTIVE(L(DP_C2))
+-
+- .p2align 3
+-L(DP_C0):
+- .long 0xfffe98ae,0xbfdfffff
+- .type L(DP_C0), @object
+- ASM_SIZE_DIRECTIVE(L(DP_C0))
+-
+- .p2align 3
+-L(DP_PIO4):
+- .long 0x54442d18,0x3fe921fb /* Pi/4 */
+- .type L(DP_PIO4), @object
+- ASM_SIZE_DIRECTIVE(L(DP_PIO4))
+-
+- .p2align 3
+-L(DP_2POW52):
+- .long 0x00000000,0x43300000 /* +2^52 */
+- .long 0x00000000,0xc3300000 /* -2^52 */
+- .type L(DP_2POW52), @object
+- ASM_SIZE_DIRECTIVE(L(DP_2POW52))
+-
+- .p2align 3
+-L(DP_INVPIO4):
+- .long 0x6dc9c883,0x3ff45f30 /* 4/Pi */
+- .type L(DP_INVPIO4), @object
+- ASM_SIZE_DIRECTIVE(L(DP_INVPIO4))
+-
+- .p2align 3
+-L(DP_PIO4HI):
+- .long 0x54000000,0xbfe921fb /* High part of Pi/4 */
+- .type L(DP_PIO4HI), @object
+- ASM_SIZE_DIRECTIVE(L(DP_PIO4HI))
+-
+- .p2align 3
+-L(DP_PIO4LO):
+- .long 0x11A62633,0xbe010b46 /* Low part of Pi/4 */
+- .type L(DP_PIO4LO), @object
+- ASM_SIZE_DIRECTIVE(L(DP_PIO4LO))
+-
+- .p2align 2
+-L(SP_INVPIO4):
+- .long 0x3fa2f983 /* 4/Pi */
+- .type L(SP_INVPIO4), @object
+- ASM_SIZE_DIRECTIVE(L(SP_INVPIO4))
+-
+- .p2align 4
+-L(DP_ABS_MASK): /* Mask for getting DP absolute value */
+- .long 0xffffffff,0x7fffffff
+- .long 0xffffffff,0x7fffffff
+- .type L(DP_ABS_MASK), @object
+- ASM_SIZE_DIRECTIVE(L(DP_ABS_MASK))
+-
+- .p2align 3
+-L(DP_HI_MASK): /* Mask for getting high 21 bits of DP value */
+- .long 0x00000000,0xffffffff
+- .type L(DP_HI_MASK),@object
+- ASM_SIZE_DIRECTIVE(L(DP_HI_MASK))
+-
+- .p2align 4
+-L(SP_ABS_MASK): /* Mask for getting SP absolute value */
+- .long 0x7fffffff,0x7fffffff
+- .long 0x7fffffff,0x7fffffff
+- .type L(SP_ABS_MASK), @object
+- ASM_SIZE_DIRECTIVE(L(SP_ABS_MASK))
+-
+-libm_alias_float (__sin, sin)
+--
+2.15.1
+
diff --git a/0002-x86-64-Add-sinf-with-FMA.patch b/0002-x86-64-Add-sinf-with-FMA.patch
new file mode 100644
index 0000000..aa8ef43
--- /dev/null
+++ b/0002-x86-64-Add-sinf-with-FMA.patch
@@ -0,0 +1,106 @@
+From 9d0ffa60ad88799b33ab6437ba0f29b39c019462 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Thu, 7 Dec 2017 10:11:02 -0800
+Subject: [PATCH 2/2] x86-64: Add sinf with FMA
+
+On Skylake, bench-sinf reports performance improvement:
+
+ Before After Improvement
+max 153.996 100.094 54%
+min 8.546 6.852 25%
+mean 18.1223 11.802 54%
+
+ * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
+ Add s_sinf-sse2 and s_sinf-fma.
+ (CFLAGS-s_sinf-fma.c): New.
+ * sysdeps/x86_64/fpu/multiarch/s_sinf-fma.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_sinf-sse2.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_sinf.c: Likewise.
+---
+ ChangeLog | 9 +++++++++
+ NEWS | 4 ++--
+ sysdeps/x86_64/fpu/multiarch/Makefile | 5 ++++-
+ sysdeps/x86_64/fpu/multiarch/s_sinf-fma.c | 2 ++
+ sysdeps/x86_64/fpu/multiarch/s_sinf-sse2.c | 2 ++
+ sysdeps/x86_64/fpu/multiarch/s_sinf.c | 28 ++++++++++++++++++++++++++++
+ 6 files changed, 47 insertions(+), 3 deletions(-)
+ create mode 100644 sysdeps/x86_64/fpu/multiarch/s_sinf-fma.c
+ create mode 100644 sysdeps/x86_64/fpu/multiarch/s_sinf-sse2.c
+ create mode 100644 sysdeps/x86_64/fpu/multiarch/s_sinf.c
+
+diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
+index c78624b47d..cab84bff3a 100644
+--- a/sysdeps/x86_64/fpu/multiarch/Makefile
++++ b/sysdeps/x86_64/fpu/multiarch/Makefile
+@@ -37,14 +37,17 @@ CFLAGS-slowpow-fma.c = -mfma -mavx2
+ CFLAGS-s_sin-fma.c = -mfma -mavx2
+ CFLAGS-s_tan-fma.c = -mfma -mavx2
+
++libm-sysdep_routines += s_sinf-sse2
++
+ libm-sysdep_routines += e_exp2f-fma e_expf-fma e_log2f-fma e_logf-fma \
+- e_powf-fma
++ e_powf-fma s_sinf-fma
+
+ CFLAGS-e_exp2f-fma.c = -mfma -mavx2
+ CFLAGS-e_expf-fma.c = -mfma -mavx2
+ CFLAGS-e_log2f-fma.c = -mfma -mavx2
+ CFLAGS-e_logf-fma.c = -mfma -mavx2
+ CFLAGS-e_powf-fma.c = -mfma -mavx2
++CFLAGS-s_sinf-fma.c = -mfma -mavx2
+
+ libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
+ e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_sinf-fma.c b/sysdeps/x86_64/fpu/multiarch/s_sinf-fma.c
+new file mode 100644
+index 0000000000..34440ebf4a
+--- /dev/null
++++ b/sysdeps/x86_64/fpu/multiarch/s_sinf-fma.c
+@@ -0,0 +1,2 @@
++#define SINF __sinf_fma
++#include <sysdeps/ieee754/flt-32/s_sinf.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_sinf-sse2.c b/sysdeps/x86_64/fpu/multiarch/s_sinf-sse2.c
+new file mode 100644
+index 0000000000..74e32c98db
+--- /dev/null
++++ b/sysdeps/x86_64/fpu/multiarch/s_sinf-sse2.c
+@@ -0,0 +1,2 @@
++#define SINF __sinf_sse2
++#include <sysdeps/ieee754/flt-32/s_sinf.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_sinf.c b/sysdeps/x86_64/fpu/multiarch/s_sinf.c
+new file mode 100644
+index 0000000000..831bc6f131
+--- /dev/null
++++ b/sysdeps/x86_64/fpu/multiarch/s_sinf.c
+@@ -0,0 +1,28 @@
++/* Multiple versions of sinf.
++ Copyright (C) 2017 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 <libm-alias-float.h>
++
++extern float __redirect_sinf (float);
++
++#define SYMBOL_NAME sinf
++#include "ifunc-fma.h"
++
++libc_ifunc_redirected (__redirect_sinf, __sinf, IFUNC_SELECTOR ());
++
++libm_alias_float (__sin, sin)
+--
+2.15.1
+
diff --git a/exp.patch b/exp.patch
deleted file mode 100644
index e19bdeb..0000000
--- a/exp.patch
+++ /dev/null
@@ -1,144 +0,0 @@
---- glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c.org 2017-09-02 16:43:42.896349422 +0000
-+++ glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c 2017-09-02 16:47:24.554729150 +0000
-@@ -50,9 +50,9 @@
-
- /* An ultimate exp routine. Given an IEEE double machine number x it computes
- the correctly rounded (to nearest) value of e^x. */
--double
-+static double
- SECTION
--__ieee754_exp (double x)
-+__ieee754_exp_rounding_set (double x)
- {
- double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
- mynumber junk1, junk2, binexp = {{0, 0}};
-@@ -60,8 +60,6 @@
- double retval;
-
- {
-- SET_RESTORE_ROUND (FE_TONEAREST);
--
- junk1.x = x;
- m = junk1.i[HIGH_HALF];
- n = m & hugeint;
-@@ -229,6 +227,39 @@
- ret_tiny:
- return tiny * tiny;
- }
-+
-+
-+static double
-+SECTION
-+__ieee754_exp_fix_rounding (double x)
-+{
-+ SET_RESTORE_ROUND (FE_TONEAREST);
-+ return __ieee754_exp_rounding_set(x);
-+}
-+
-+
-+static double __glibc_constant_extff = 6755399441055743.0;
-+
-+double
-+SECTION
-+__ieee754_exp (double x)
-+{
-+ double d1 = 1.9, d2 = 2.1;
-+ unsigned long *l1,*l2;
-+
-+
-+ d1 += __glibc_constant_extff;
-+ d2 += __glibc_constant_extff;
-+
-+ l1 = (unsigned long*)&d1; l2 = (unsigned long*)&d2;
-+ if (*l1 != *l2)
-+ return __ieee754_exp_fix_rounding(x);
-+ else
-+ return __ieee754_exp_rounding_set(x);
-+
-+}
-+
-+
- #ifndef __ieee754_exp
- strong_alias (__ieee754_exp, __exp_finite)
- #endif
---- glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c~ 2017-09-02 19:32:24.000000000 +0000
-+++ glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c 2017-09-02 19:34:21.700406705 +0000
-@@ -95,7 +95,7 @@
- if (res == (res + cor * err_0))
- {
- retval = res * binexp.x;
-- goto ret;
-+ goto ret_good;
- }
- else
- {
---- glibc-2.26/sysdeps/ieee754/dbl-64/w_exp_compat.c~ 2017-08-02 12:57:16.000000000 +0000
-+++ glibc-2.26/sysdeps/ieee754/dbl-64/w_exp_compat.c 2017-09-02 19:35:03.754178946 +0000
-@@ -23,12 +23,7 @@
- double
- __exp (double x)
- {
-- double z = __ieee754_exp (x);
-- if (__builtin_expect (!isfinite (z) || z == 0, 0)
-- && isfinite (x) && _LIB_VERSION != _IEEE_)
-- return __kernel_standard (x, x, 6 + !!signbit (x));
--
-- return z;
-+ return __ieee754_exp (x);
- }
- hidden_def (__exp)
- weak_alias (__exp, exp)
---- glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c~ 2017-09-02 19:37:00.000000000 +0000
-+++ glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c 2017-09-02 19:38:45.830462443 +0000
-@@ -219,13 +219,24 @@
- }
- }
- ret:
-+ if (__builtin_expect (!isfinite (retval) || retval == 0, 0)
-+ && isfinite (x))
-+ return __kernel_standard (x, x, 6 + !!signbit (x));
- return retval;
-
- ret_huge:
-- return hhuge * hhuge;
-+ retval = hhuge * hhuge;
-+ if (__builtin_expect (!isfinite (retval) || retval == 0, 0)
-+ && isfinite (x))
-+ return __kernel_standard (x, x, 6 + !!signbit (x));
-+ return retval;
-
- ret_tiny:
-- return tiny * tiny;
-+ retval = tiny * tiny;
-+ if (__builtin_expect (!isfinite (retval) || retval == 0, 0)
-+ && isfinite (x))
-+ return __kernel_standard (x, x, 6 + !!signbit (x));
-+ return retval;
- }
-
-
---- glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c~ 2017-09-02 19:38:45.000000000 +0000
-+++ glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c 2017-09-02 19:39:40.636205289 +0000
-@@ -224,6 +224,9 @@
- return __kernel_standard (x, x, 6 + !!signbit (x));
- return retval;
-
-+ret_good:
-+ return retval;
-+
- ret_huge:
- retval = hhuge * hhuge;
- if (__builtin_expect (!isfinite (retval) || retval == 0, 0)
---- glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c~ 2017-09-02 19:39:40.000000000 +0000
-+++ glibc-2.26/sysdeps/ieee754/dbl-64/e_exp.c 2017-09-02 22:31:08.917146268 +0000
-@@ -99,6 +99,10 @@
- }
- else
- {
-+ if (x > -2E-14 && x < 2E-14) {
-+ retval = 1 + x + x*x/2;
-+ goto ret;
-+ }
- retval = __slowexp (x);
- goto ret;
- } /*if error is over bound */
diff --git a/exp2.patch b/exp2.patch
new file mode 100644
index 0000000..4059595
--- /dev/null
+++ b/exp2.patch
@@ -0,0 +1,1265 @@
+From: Patrick McGehearty <patrick.mcgehearty@oracle.com>
+To: libc-alpha@sourceware.org
+Subject: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.
+Date: Thu, 26 Oct 2017 12:44:23 -0400
+Message-Id: <1509036263-113745-1-git-send-email-patrick.mcgehearty@oracle.com>
+
+Version 2 of proposed patch.
+Revised copyright notice and formatting issues.
+Removed slowexp.c and related references.
+Replaced tables of double float constants with hex constants, taking special
+ attention to correctly handle little endian and big endian versions.
+ Using hex initialization also required changing variables to be declared
+ as unions. Tables moved from e_exp.c to sysdeps/ieee754/dbl-64/eexp.tbl.
+Replaced __fegetround(), __fesetround() with get_rounding_mode and
+ libc_fesetround().
+Removed use of "small". "inexact mode" now ignored.
+Retested and rebenchmarked on sparc and x86 with the above changes.
+
+These changes will be active for all platforms that don't provide
+their own exp() routines. They will also be active for ieee754
+versions of ccos, ccosh, cosh, csin, csinh, sinh, exp10, gamma, and
+erf.
+
+Typical performance gains is typically around 5x when measured on
+Sparc s7 for common values between exp(1) and exp(40).
+
+Using the glibc perf tests on sparc,
+ sparc (nsec) x86 (nsec)
+ old new old new
+max 17629 381 5173 766
+min 399 54 15 13
+mean 5317 199 1349 24
+
+The extreme max times for the old (ieee754) exp are due to the
+multiprecision computation in the old algorithm when the true value is
+very near 0.5 ulp away from an value representable in double
+precision. The new algorithm does not take special measures for those
+cases. The current glibc exp perf tests overrepresent those values.
+Informal testing suggests approximately one in 200 cases might
+invoke the high cost computation. The performance advantage of the new
+algorithm for other values is still large but not as large as indicated
+by the chart above.
+
+Glibc correctness tests for exp() and expf() were run. Within the
+test suite 3 input values were found to cause 1 bit differences (ulp)
+when "FE_TONEAREST" rounding mode is set. No differences in exp() were
+seen for the tested values for the other rounding modes.
+Typical example:
+exp(-0x1.760cd2p+0) (-1.46113312244415283203125)
+ new code: 2.31973271630014299393707e-01 0x1.db14cd799387ap-3
+ old code: 2.31973271630014271638132e-01 0x1.db14cd7993879p-3
+ exp = 2.31973271630014285508337 (high precision)
+Old delta: off by 0.49 ulp
+New delta: off by 0.51 ulp
+
+In addition, because ieee754_exp() is used by other routines, cexp()
+showed test results with very small imaginary input values where the
+imaginary portion of the result was off by 3 ulp when in upward
+rounding mode, but not in the other rounding modes. For x86, tgamma
+showed a few values where the ulp increased to 6 (max ulp for tgamma
+is 5). Sparc tgamma did not show these failures. I presume the tgamma
+differences are due to compiler optimization differences within the
+gamma function. The gamma function is known to be difficult to compute
+accurately.
+---
+ manual/probes.texi | 14 -
+ math/Makefile | 2 +-
+ sysdeps/generic/math_private.h | 1 -
+ sysdeps/ieee754/dbl-64/e_exp.c | 379 +++++++++++++-----------
+ sysdeps/ieee754/dbl-64/e_pow.c | 2 +-
+ sysdeps/ieee754/dbl-64/eexp.tbl | 440 +++++++++++++++++++++++++++
+ sysdeps/ieee754/dbl-64/slowexp.c | 86 ------
+ sysdeps/powerpc/power4/fpu/Makefile | 1 -
+ sysdeps/x86_64/fpu/multiarch/Makefile | 9 +-
+ sysdeps/x86_64/fpu/multiarch/e_exp-avx.c | 1 -
+ sysdeps/x86_64/fpu/multiarch/e_exp-fma.c | 1 -
+ sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c | 1 -
+ sysdeps/x86_64/fpu/multiarch/slowexp-avx.c | 9 -
+ sysdeps/x86_64/fpu/multiarch/slowexp-fma.c | 9 -
+ sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c | 9 -
+ 15 files changed, 651 insertions(+), 313 deletions(-)
+ create mode 100644 sysdeps/ieee754/dbl-64/eexp.tbl
+ delete mode 100644 sysdeps/ieee754/dbl-64/slowexp.c
+ delete mode 100644 sysdeps/x86_64/fpu/multiarch/slowexp-avx.c
+ delete mode 100644 sysdeps/x86_64/fpu/multiarch/slowexp-fma.c
+ delete mode 100644 sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c
+
+diff --git a/manual/probes.texi b/manual/probes.texi
+index 8ab6756..f8ae64b 100644
+--- a/manual/probes.texi
++++ b/manual/probes.texi
+@@ -258,20 +258,6 @@ Unless explicitly mentioned otherwise, a precision of 1 implies 24 bits of
+ precision in the mantissa of the multiple precision number. Hence, a precision
+ level of 32 implies 768 bits of precision in the mantissa.
+
+-@deftp Probe slowexp_p6 (double @var{$arg1}, double @var{$arg2})
+-This probe is triggered when the @code{exp} function is called with an
+-input that results in multiple precision computation with precision
+-6. Argument @var{$arg1} is the input value and @var{$arg2} is the
+-computed output.
+-@end deftp
+-
+-@deftp Probe slowexp_p32 (double @var{$arg1}, double @var{$arg2})
+-This probe is triggered when the @code{exp} function is called with an
+-input that results in multiple precision computation with precision
+-32. Argument @var{$arg1} is the input value and @var{$arg2} is the
+-computed output.
+-@end deftp
+-
+ @deftp Probe slowpow_p10 (double @var{$arg1}, double @var{$arg2}, double @var{$arg3}, double @var{$arg4})
+ This probe is triggered when the @code{pow} function is called with
+ inputs that result in multiple precision computation with precision
+diff --git a/math/Makefile b/math/Makefile
+index 1feb425..f70aebf 100644
+--- a/math/Makefile
++++ b/math/Makefile
+@@ -114,7 +114,7 @@ type-ldouble-yes := ldouble
+ # double support
+ type-double-suffix :=
+ type-double-routines := branred doasin dosincos halfulp mpa mpatan2 \
+- mpatan mpexp mplog mpsqrt mptan sincos32 slowexp \
++ mpatan mpexp mplog mpsqrt mptan sincos32 \
+ slowpow sincostab k_rem_pio2
+
+ # float support
+diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h
+index 80c7c92..30fc3c9 100644
+--- a/sysdeps/generic/math_private.h
++++ b/sysdeps/generic/math_private.h
+@@ -262,7 +262,6 @@ extern double __sin32 (double __x, double __res, double __res1);
+ extern double __cos32 (double __x, double __res, double __res1);
+ extern double __mpsin (double __x, double __dx, bool __range_reduce);
+ extern double __mpcos (double __x, double __dx, bool __range_reduce);
+-extern double __slowexp (double __x);
+ extern double __slowpow (double __x, double __y, double __z);
+ extern void __docos (double __x, double __dx, double __v[]);
+
+diff --git a/sysdeps/ieee754/dbl-64/e_exp.c b/sysdeps/ieee754/dbl-64/e_exp.c
+index 6757a14..0b0e0e3 100644
+--- a/sysdeps/ieee754/dbl-64/e_exp.c
++++ b/sysdeps/ieee754/dbl-64/e_exp.c
+@@ -1,3 +1,4 @@
++/* EXP function - Compute double precision exponential */
+ /*
+ * IBM Accurate Mathematical Library
+ * written by International Business Machines Corp.
+@@ -23,7 +24,7 @@
+ /* exp1 */
+ /* */
+ /* FILES NEEDED:dla.h endian.h mpa.h mydefs.h uexp.h */
+-/* mpa.c mpexp.x slowexp.c */
++/* mpa.c mpexp.x */
+ /* */
+ /* An ultimate exp routine. Given an IEEE double machine number x */
+ /* it computes the correctly rounded (to nearest) value of e^x */
+@@ -32,207 +33,239 @@
+ /* */
+ /***************************************************************************/
+
++/* IBM exp(x) replaced by following exp(x) in 2017. IBM exp1(x,xx) remains. */
++/*
++ exp(x)
++ Hybrid algorithm of Peter Tang's Table driven method (for large
++ arguments) and an accurate table (for small arguments).
++ Written by K.C. Ng, November 1988.
++ Method (large arguments):
++ 1. Argument Reduction: given the input x, find r and integer k
++ and j such that
++ x = (k+j/32)*(ln2) + r, |r| <= (1/64)*ln2
++
++ 2. exp(x) = 2^k * (2^(j/32) + 2^(j/32)*expm1(r))
++ a. expm1(r) is approximated by a polynomial:
++ expm1(r) ~ r + t1*r^2 + t2*r^3 + ... + t5*r^6
++ Here t1 = 1/2 exactly.
++ b. 2^(j/32) is represented to twice double precision
++ as TBL[2j]+TBL[2j+1].
++
++ Note: If divide were fast enough, we could use another approximation
++ in 2.a:
++ expm1(r) ~ (2r)/(2-R), R = r - r^2*(t1 + t2*r^2)
++ (for the same t1 and t2 as above)
++
++ Special cases:
++ exp(INF) is INF, exp(NaN) is NaN;
++ exp(-INF)= 0;
++ for finite argument, only exp(0)=1 is exact.
++
++ Accuracy:
++ According to an error analysis, the error is always less than
++ an ulp (unit in the last place). The largest errors observed
++ are less than 0.55 ulp for normal results and less than 0.75 ulp
++ for subnormal results.
++
++ Misc. info.
++ For IEEE double
++ if x > 7.09782712893383973096e+02 then exp(x) overflow
++ if x < -7.45133219101941108420e+02 then exp(x) underflow
++ */
++
+ #include <math.h>
++#include <math-svid-compat.h>
++#include <math_private.h>
++#include <errno.h>
+ #include "endian.h"
+ #include "uexp.h"
++#include "uexp.tbl"
+ #include "mydefs.h"
+ #include "MathLib.h"
+-#include "uexp.tbl"
+-#include <math_private.h>
+ #include <fenv.h>
+ #include <float.h>
+
+-#ifndef SECTION
+-# define SECTION
+-#endif
++extern double __ieee754_exp (double);
++
++#include "eexp.tbl"
++
++static const double
++ half = 0.5,
++ one = 1.0;
+
+-double __slowexp (double);
+
+-/* An ultimate exp routine. Given an IEEE double machine number x it computes
+- the correctly rounded (to nearest) value of e^x. */
+ double
+-SECTION
+-__ieee754_exp (double x)
++__ieee754_exp (double x_arg)
+ {
+- double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
+- mynumber junk1, junk2, binexp = {{0, 0}};
+- int4 i, j, m, n, ex;
++ double z, t;
+ double retval;
+-
++ int hx, ix, k, j, m;
++ int fe_val;
++ union
+ {
+- SET_RESTORE_ROUND (FE_TONEAREST);
+-
+- junk1.x = x;
+- m = junk1.i[HIGH_HALF];
+- n = m & hugeint;
+-
+- if (n > smallint && n < bigint)
+- {
+- y = x * log2e.x + three51.x;
+- bexp = y - three51.x; /* multiply the result by 2**bexp */
+-
+- junk1.x = y;
+-
+- eps = bexp * ln_two2.x; /* x = bexp*ln(2) + t - eps */
+- t = x - bexp * ln_two1.x;
+-
+- y = t + three33.x;
+- base = y - three33.x; /* t rounded to a multiple of 2**-18 */
+- junk2.x = y;
+- del = (t - base) - eps; /* x = bexp*ln(2) + base + del */
+- eps = del + del * del * (p3.x * del + p2.x);
+-
+- binexp.i[HIGH_HALF] = (junk1.i[LOW_HALF] + 1023) << 20;
+-
+- i = ((junk2.i[LOW_HALF] >> 8) & 0xfffffffe) + 356;
+- j = (junk2.i[LOW_HALF] & 511) << 1;
+-
+- al = coar.x[i] * fine.x[j];
+- bet = ((coar.x[i] * fine.x[j + 1] + coar.x[i + 1] * fine.x[j])
+- + coar.x[i + 1] * fine.x[j + 1]);
+-
+- rem = (bet + bet * eps) + al * eps;
+- res = al + rem;
+- cor = (al - res) + rem;
+- if (res == (res + cor * err_0))
+- {
+- retval = res * binexp.x;
+- goto ret;
++ int i_part[2];
++ double x;
++ } xx;
++ union
++ {
++ int y_part[2];
++ double y;
++ } yy;
++ xx.x = x_arg;
++
++ ix = xx.i_part[HIGH_HALF];
++ hx = ix & ~0x80000000;
++
++ if (hx < 0x3ff0a2b2)
++ { /* |x| < 3/2 ln 2 */
++ if (hx < 0x3f862e42)
++ { /* |x| < 1/64 ln 2 */
++ if (hx < 0x3ed00000)
++ { /* |x| < 2^-18 */
++ /* raise inexact if x != 0 */
++ if (hx < 0x3e300000)
++ {
++ retval = one + xx.x;
++ return (retval);
++ }
++ retval = one + xx.x * (one + half * xx.x);
++ return (retval);
++ }
++ /*
++ Use FE_TONEAREST rounding mode for computing yy.y
++ Avoid set/reset of rounding mode if already in FE_TONEAREST mode
++ */
++ fe_val = get_rounding_mode ();
++ if (fe_val == FE_TONEAREST) {
++ t = xx.x * xx.x;
++ yy.y = xx.x + (t * (half + xx.x * t2.x) +
++ (t * t) * (t3.x + xx.x * t4.x + t * t5.x));
++ retval = one + yy.y;
++ } else {
++ libc_fesetround (FE_TONEAREST);
++ t = xx.x * xx.x;
++ yy.y = xx.x + (t * (half + xx.x * t2.x) +
++ (t * t) * (t3.x + xx.x * t4.x + t * t5.x));
++ retval = one + yy.y;
++ libc_fesetround (fe_val);
+ }
+- else
+- {
+- retval = __slowexp (x);
+- goto ret;
+- } /*if error is over bound */
+- }
++ return (retval);
++ }
+
+- if (n <= smallint)
+- {
+- retval = 1.0;
+- goto ret;
++ /* find the multiple of 2^-6 nearest x */
++ k = hx >> 20;
++ j = (0x00100000 | (hx & 0x000fffff)) >> (0x40c - k);
++ j = (j - 1) & ~1;
++ if (ix < 0)
++ j += 134;
++ /*
++ Use FE_TONEAREST rounding mode for computing yy.y
++ Avoid set/reset of rounding mode if already in FE_TONEAREST mode
++ */
++ fe_val = get_rounding_mode ();
++ if (fe_val == FE_TONEAREST) {
++ z = xx.x - TBL2.x[j];
++ t = z * z;
++ yy.y = z + (t * (half + (z * t2.x)) +
++ (t * t) * (t3.x + z * t4.x + t * t5.x));
++ retval = TBL2.x[j + 1] + TBL2.x[j + 1] * yy.y;
++ } else {
++ libc_fesetround (FE_TONEAREST);
++ z = xx.x - TBL2.x[j];
++ t = z * z;
++ yy.y = z + (t * (half + (z * t2.x)) +
++ (t * t) * (t3.x + z * t4.x + t * t5.x));
++ retval = TBL2.x[j + 1] + TBL2.x[j + 1] * yy.y;
++ libc_fesetround (fe_val);
+ }
++ return (retval);
++ }
+
+- if (n >= badint)
+- {
+- if (n > infint)
+- {
+- retval = x + x;
+- goto ret;
+- } /* x is NaN */
+- if (n < infint)
+- {
+- if (x > 0)
+- goto ret_huge;
+- else
+- goto ret_tiny;
+- }
+- /* x is finite, cause either overflow or underflow */
+- if (junk1.i[LOW_HALF] != 0)
+- {
+- retval = x + x;
+- goto ret;
+- } /* x is NaN */
+- retval = (x > 0) ? inf.x : zero; /* |x| = inf; return either inf or 0 */
+- goto ret;
+- }
++ if (hx >= 0x40862e42)
++ { /* x is large, infinite, or nan */
++ if (hx >= 0x7ff00000)
++ {
++ if (ix == 0xfff00000 && xx.i_part[LOW_HALF] == 0)
++ return (zero); /* exp(-inf) = 0 */
++ return (xx.x * xx.x); /* exp(nan/inf) is nan or inf */
++ }
++ if (xx.x > threshold1.x)
++ { /* set overflow error condition */
++ retval = hhuge * hhuge;
++ return retval;
++ }
++ if (-xx.x > threshold2.x)
++ { /* set underflow error condition */
++ double force_underflow = tiny * tiny;
++ math_force_eval (force_underflow);
++ retval = zero;
++ return retval;
++ }
++ }
+
+- y = x * log2e.x + three51.x;
+- bexp = y - three51.x;
+- junk1.x = y;
+- eps = bexp * ln_two2.x;
+- t = x - bexp * ln_two1.x;
+- y = t + three33.x;
+- base = y - three33.x;
+- junk2.x = y;
+- del = (t - base) - eps;
+- eps = del + del * del * (p3.x * del + p2.x);
+- i = ((junk2.i[LOW_HALF] >> 8) & 0xfffffffe) + 356;
+- j = (junk2.i[LOW_HALF] & 511) << 1;
+- al = coar.x[i] * fine.x[j];
+- bet = ((coar.x[i] * fine.x[j + 1] + coar.x[i + 1] * fine.x[j])
+- + coar.x[i + 1] * fine.x[j + 1]);
+- rem = (bet + bet * eps) + al * eps;
+- res = al + rem;
+- cor = (al - res) + rem;
+- if (m >> 31)
+- {
+- ex = junk1.i[LOW_HALF];
+- if (res < 1.0)
+- {
+- res += res;
+- cor += cor;
+- ex -= 1;
+- }
+- if (ex >= -1022)
+- {
+- binexp.i[HIGH_HALF] = (1023 + ex) << 20;
+- if (res == (res + cor * err_0))
+- {
+- retval = res * binexp.x;
+- goto ret;
+- }
+- else
+- {
+- retval = __slowexp (x);
+- goto check_uflow_ret;
+- } /*if error is over bound */
+- }
+- ex = -(1022 + ex);
+- binexp.i[HIGH_HALF] = (1023 - ex) << 20;
+- res *= binexp.x;
+- cor *= binexp.x;
+- eps = 1.0000000001 + err_0 * binexp.x;
+- t = 1.0 + res;
+- y = ((1.0 - t) + res) + cor;
+- res = t + y;
+- cor = (t - res) + y;
+- if (res == (res + eps * cor))
+- {
+- binexp.i[HIGH_HALF] = 0x00100000;
+- retval = (res - 1.0) * binexp.x;
+- goto check_uflow_ret;
+- }
+- else
+- {
+- retval = __slowexp (x);
+- goto check_uflow_ret;
+- } /* if error is over bound */
+- check_uflow_ret:
+- if (retval < DBL_MIN)
+- {
+- double force_underflow = tiny * tiny;
+- math_force_eval (force_underflow);
+- }
+- if (retval == 0)
+- goto ret_tiny;
+- goto ret;
+- }
++ /*
++ Use FE_TONEAREST rounding mode for computing yy.y
++ Avoid set/reset of rounding mode if already in FE_TONEAREST mode
++ */
++ fe_val = get_rounding_mode ();
++ if (fe_val == FE_TONEAREST) {
++ t = invln2_32.x * xx.x;
++ if (ix < 0)
++ t -= half;
+ else
+- {
+- binexp.i[HIGH_HALF] = (junk1.i[LOW_HALF] + 767) << 20;
+- if (res == (res + cor * err_0))
+- retval = res * binexp.x * t256.x;
+- else
+- retval = __slowexp (x);
+- if (isinf (retval))
+- goto ret_huge;
+- else
+- goto ret;
+- }
++ t += half;
++ k = (int) t;
++ j = (k & 0x1f) << 1;
++ m = k >> 5;
++ z = (xx.x - k * ln2_32hi.x) - k * ln2_32lo.x;
++
++ /* z is now in primary range */
++ t = z * z;
++ yy.y = z + (t * (half + z * t2.x) +
++ (t * t) * (t3.x + z * t4.x + t * t5.x));
++ yy.y = TBL.x[j] + (TBL.x[j + 1] + TBL.x[j] * yy.y);
++ } else {
++ libc_fesetround (FE_TONEAREST);
++ t = invln2_32.x * xx.x;
++ if (ix < 0)
++ t -= half;
++ else
++ t += half;
++ k = (int) t;
++ j = (k & 0x1f) << 1;
++ m = k >> 5;
++ z = (xx.x - k * ln2_32hi.x) - k * ln2_32lo.x;
++
++ /* z is now in primary range */
++ t = z * z;
++ yy.y = z + (t * (half + z * t2.x) +
++ (t * t) * (t3.x + z * t4.x + t * t5.x));
++ yy.y = TBL.x[j] + (TBL.x[j + 1] + TBL.x[j] * yy.y);
++ libc_fesetround (fe_val);
+ }
+-ret:
+- return retval;
+
+- ret_huge:
+- return hhuge * hhuge;
+-
+- ret_tiny:
+- return tiny * tiny;
++ if (m < -1021)
++ {
++ yy.y_part[HIGH_HALF] += (m + 54) << 20;
++ retval = twom54.x * yy.y;
++ if (retval < DBL_MIN)
++ {
++ double force_underflow = tiny * tiny;
++ math_force_eval (force_underflow);
++ }
++ return retval;
++ }
++ yy.y_part[HIGH_HALF] += m << 20;
++ return (yy.y);
+ }
+ #ifndef __ieee754_exp
+ strong_alias (__ieee754_exp, __exp_finite)
+ #endif
+
++#ifndef SECTION
++# define SECTION
++#endif
++
+ /* Compute e^(x+xx). The routine also receives bound of error of previous
+ calculation. If after computing exp the error exceeds the allowed bounds,
+ the routine returns a non-positive number. Otherwise it returns the
+diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c
+index 9f6439e..2eb8dbf 100644
+--- a/sysdeps/ieee754/dbl-64/e_pow.c
++++ b/sysdeps/ieee754/dbl-64/e_pow.c
+@@ -25,7 +25,7 @@
+ /* log1 */
+ /* checkint */
+ /* FILES NEEDED: dla.h endian.h mpa.h mydefs.h */
+-/* halfulp.c mpexp.c mplog.c slowexp.c slowpow.c mpa.c */
++/* halfulp.c mpexp.c mplog.c slowpow.c mpa.c */
+ /* uexp.c upow.c */
+ /* root.tbl uexp.tbl upow.tbl */
+ /* An ultimate power routine. Given two IEEE double machine numbers y,x */
+diff --git a/sysdeps/ieee754/dbl-64/eexp.tbl b/sysdeps/ieee754/dbl-64/eexp.tbl
+new file mode 100644
+index 0000000..cecb8d4
+--- /dev/null
++++ b/sysdeps/ieee754/dbl-64/eexp.tbl
+@@ -0,0 +1,440 @@
++/* EXP function tables - for use in ocmputing double precisoin exponential
++ Copyright (C) 2017 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/>. */
++
++#ifdef BIG_ENDI
++static const union {
++ int i[128];
++ double x[64];
++} TBL = { .i = {
++ 0x3FF00000, 0x00000000, 0x00000000, 0x00000000,
++ 0x3FF059B0, 0xD3158574, 0x3C8D73E2, 0xA475B465,
++ 0x3FF0B558, 0x6CF9890F, 0x3C98A62E, 0x4ADC610A,
++ 0x3FF11301, 0xD0125B51, 0xBC96C510, 0x39449B3A,
++ 0x3FF172B8, 0x3C7D517B, 0xBC819041, 0xB9D78A76,
++ 0x3FF1D487, 0x3168B9AA, 0x3C9E016E, 0x00A2643C,
++ 0x3FF2387A, 0x6E756238, 0x3C99B07E, 0xB6C70573,
++ 0x3FF29E9D, 0xF51FDEE1, 0x3C8612E8, 0xAFAD1255,
++ 0x3FF306FE, 0x0A31B715, 0x3C86F46A, 0xD23182E4,
++ 0x3FF371A7, 0x373AA9CB, 0xBC963AEA, 0xBF42EAE2,
++ 0x3FF3DEA6, 0x4C123422, 0x3C8ADA09, 0x11F09EBC,
++ 0x3FF44E08, 0x6061892D, 0x3C489B7A, 0x04EF80D0,
++ 0x3FF4BFDA, 0xD5362A27, 0x3C7D4397, 0xAFEC42E2,
++ 0x3FF5342B, 0x569D4F82, 0xBC807ABE, 0x1DB13CAC,
++ 0x3FF5AB07, 0xDD485429, 0x3C96324C, 0x054647AD,
++ 0x3FF6247E, 0xB03A5585, 0xBC9383C1, 0x7E40B497,
++ 0x3FF6A09E, 0x667F3BCD, 0xBC9BDD34, 0x13B26456,
++ 0x3FF71F75, 0xE8EC5F74, 0xBC816E47, 0x86887A99,
++ 0x3FF7A114, 0x73EB0187, 0xBC841577, 0xEE04992F,
++ 0x3FF82589, 0x994CCE13, 0xBC9D4C1D, 0xD41532D8,
++ 0x3FF8ACE5, 0x422AA0DB, 0x3C96E9F1, 0x56864B27,
++ 0x3FF93737, 0xB0CDC5E5, 0xBC675FC7, 0x81B57EBC,
++ 0x3FF9C491, 0x82A3F090, 0x3C7C7C46, 0xB071F2BE,
++ 0x3FFA5503, 0xB23E255D, 0xBC9D2F6E, 0xDB8D41E1,
++ 0x3FFAE89F, 0x995AD3AD, 0x3C97A1CD, 0x345DCC81,
++ 0x3FFB7F76, 0xF2FB5E47, 0xBC75584F, 0x7E54AC3B,
++ 0x3FFC199B, 0xDD85529C, 0x3C811065, 0x895048DD,
++ 0x3FFCB720, 0xDCEF9069, 0x3C7503CB, 0xD1E949DB,
++ 0x3FFD5818, 0xDCFBA487, 0x3C82ED02, 0xD75B3706,
++ 0x3FFDFC97, 0x337B9B5F, 0xBC91A5CD, 0x4F184B5C,
++ 0x3FFEA4AF, 0xA2A490DA, 0xBC9E9C23, 0x179C2893,
++ 0x3FFF5076, 0x5B6E4540, 0x3C99D3E1, 0x2DD8A18B } };
++
++/*
++ For i = 0, ..., 66,
++ TBL2[2*i] is a double precision number near (i+1)*2^-6, and
++ TBL2[2*i+1] = exp(TBL2[2*i]) to within a relative error less
++ than 2^-60.
++
++ For i = 67, ..., 133,
++ TBL2[2*i] is a double precision number near -(i+1)*2^-6, and
++ TBL2[2*i+1] = exp(TBL2[2*i]) to within a relative error less
++ than 2^-60.
++*/
++static const union {
++ int i[536];
++ double x[268];
++} TBL2 = { .i = {
++ 0x3F8FFFFF, 0xFFFFFC82, 0x3FF04080, 0xAB55DE32,
++ 0x3F9FFFFF, 0xFFFFFFDB, 0x3FF08205, 0x601127EC,
++ 0x3FA80000, 0x000000A0, 0x3FF0C492, 0x36829E91,
++ 0x3FAFFFFF, 0xFFFFFF79, 0x3FF1082B, 0x577D34E9,
++ 0x3FB3FFFF, 0xFFFFFFFC, 0x3FF14CD4, 0xFC989CD6,
++ 0x3FB80000, 0x00000060, 0x3FF19293, 0x7074E0D4,
++ 0x3FBC0000, 0x00000061, 0x3FF1D96B, 0x0EFF0E80,
++ 0x3FBFFFFF, 0xFFFFFFD6, 0x3FF22160, 0x45B6F5CA,
++ 0x3FC1FFFF, 0xFFFFFF58, 0x3FF26A77, 0x93F6014C,
++ 0x3FC3FFFF, 0xFFFFFF75, 0x3FF2B4B5, 0x8B372C65,
++ 0x3FC5FFFF, 0xFFFFFF00, 0x3FF3001E, 0xCF601AD1,
++ 0x3FC80000, 0x00000020, 0x3FF34CB8, 0x170B583A,
++ 0x3FC9FFFF, 0xFFFFA629, 0x3FF39A86, 0x2BD3B344,
++ 0x3FCC0000, 0x0000000F, 0x3FF3E98D, 0xEAA11DCE,
++ 0x3FCE0000, 0x0000007F, 0x3FF439D4, 0x43F5F16D,
++ 0x3FD00000, 0x00000072, 0x3FF48B5E, 0x3C3E81AB,
++ 0x3FD0FFFF, 0xFFFFFECA, 0x3FF4DE30, 0xEC211DFB,
++ 0x3FD1FFFF, 0xFFFFFF8F, 0x3FF53251, 0x80CFACD2,
++ 0x3FD30000, 0x0000003B, 0x3FF587C5, 0x3C5A7B04,
++ 0x3FD40000, 0x00000034, 0x3FF5DE91, 0x76046007,
++ 0x3FD4FFFF, 0xFFFFFF89, 0x3FF636BB, 0x9A98322F,
++ 0x3FD5FFFF, 0xFFFFFFE7, 0x3FF69049, 0x2CBF942A,
++ 0x3FD6FFFF, 0xFFFFFF78, 0x3FF6EB3F, 0xC55B1E45,
++ 0x3FD7FFFF, 0xFFFFFF65, 0x3FF747A5, 0x13DBEF32,
++ 0x3FD8FFFF, 0xFFFFFFD5, 0x3FF7A57E, 0xDE9EA22E,
++ 0x3FD9FFFF, 0xFFFFFF6E, 0x3FF804D3, 0x0347B50F,
++ 0x3FDAFFFF, 0xFFFFFFC3, 0x3FF865A7, 0x772164AE,
++ 0x3FDC0000, 0x00000053, 0x3FF8C802, 0x477B0030,
++ 0x3FDD0000, 0x0000004D, 0x3FF92BE9, 0x9A09BF1E,
++ 0x3FDE0000, 0x00000096, 0x3FF99163, 0xAD4B1E08,
++ 0x3FDEFFFF, 0xFFFFFEFA, 0x3FF9F876, 0xD8E8C4FC,
++ 0x3FDFFFFF, 0xFFFFFFD0, 0x3FFA6129, 0x8E1E0688,
++ 0x3FE08000, 0x00000002, 0x3FFACB82, 0x581EEE56,
++ 0x3FE10000, 0x0000001F, 0x3FFB3787, 0xDC80F979,
++ 0x3FE17FFF, 0xFFFFFFF8, 0x3FFBA540, 0xDBA56E4F,
++ 0x3FE1FFFF, 0xFFFFFFFA, 0x3FFC14B4, 0x31256441,
++ 0x3FE27FFF, 0xFFFFFFC4, 0x3FFC85E8, 0xD43F7C9B,
++ 0x3FE2FFFF, 0xFFFFFFFD, 0x3FFCF8E5, 0xD84758A6,
++ 0x3FE38000, 0x0000001F, 0x3FFD6DB2, 0x6D16CD84,
++ 0x3FE3FFFF, 0xFFFFFFD8, 0x3FFDE455, 0xDF80E39B,
++ 0x3FE48000, 0x00000052, 0x3FFE5CD7, 0x99C6A59C,
++ 0x3FE4FFFF, 0xFFFFFFC8, 0x3FFED73F, 0x240DC10C,
++ 0x3FE58000, 0x00000013, 0x3FFF5394, 0x24D90F71,
++ 0x3FE5FFFF, 0xFFFFFFBC, 0x3FFFD1DE, 0x6182F885,
++ 0x3FE68000, 0x0000002D, 0x40002912, 0xDF5CE741,
++ 0x3FE70000, 0x00000040, 0x40006A39, 0x207F0A2A,
++ 0x3FE78000, 0x0000004F, 0x4000AC66, 0x0691652A,
++ 0x3FE7FFFF, 0xFFFFFF6F, 0x4000EF9D, 0xB467DCAB,
++ 0x3FE87FFF, 0xFFFFFFE5, 0x400133E4, 0x5D82E943,
++ 0x3FE90000, 0x00000035, 0x4001793E, 0x4652CC6D,
++ 0x3FE97FFF, 0xFFFFFFB3, 0x4001BFAF, 0xC47BDA48,
++ 0x3FEA0000, 0x00000000, 0x4002073D, 0x3F1BD518,
++ 0x3FEA8000, 0x0000004A, 0x40024FEB, 0x2F105CE2,
++ 0x3FEAFFFF, 0xFFFFFFED, 0x400299BE, 0x1F3E7F11,
++ 0x3FEB7FFF, 0xFFFFFFFB, 0x4002E4BA, 0xACDB6611,
++ 0x3FEC0000, 0x0000001D, 0x400330E5, 0x87B62B39,
++ 0x3FEC8000, 0x00000079, 0x40037E43, 0x7282D538,
++ 0x3FECFFFF, 0xFFFFFF51, 0x4003CCD9, 0x43268248,
++ 0x3FED7FFF, 0xFFFFFF74, 0x40041CAB, 0xE304CADC,
++ 0x3FEE0000, 0x00000011, 0x40046DC0, 0x4F4E5343,
++ 0x3FEE8000, 0x0000001E, 0x4004C01B, 0x9950A124,
++ 0x3FEEFFFF, 0xFFFFFF9E, 0x400513C2, 0xE6C73196,
++ 0x3FEF7FFF, 0xFFFFFFED, 0x400568BB, 0x722DD586,
++ 0x3FF00000, 0x00000034, 0x4005BF0A, 0x8B1457B0,
++ 0x3FF03FFF, 0xFFFFFFE2, 0x400616B5, 0x967376DF,
++ 0x3FF07FFF, 0xFFFFFF4B, 0x40066FC2, 0x0F0337A9,
++ 0x3FF0BFFF, 0xFFFFFFFD, 0x4006CA35, 0x859290F5,
++ 0xBF8FFFFF, 0xFFFFFFE4, 0x3FEF80FE, 0xABFEEFA5,
++ 0xBF9FFFFF, 0xFFFFFB0B, 0x3FEF03F5, 0x6A88B5FE,
++ 0xBFA7FFFF, 0xFFFFFFA7, 0x3FEE88DC, 0x6AFECFC5,
++ 0xBFAFFFFF, 0xFFFFFEA8, 0x3FEE0FAB, 0xFBC702B8,
++ 0xBFB3FFFF, 0xFFFFFFB3, 0x3FED985C, 0x89D041AC,
++ 0xBFB7FFFF, 0xFFFFFFE3, 0x3FED22E6, 0xA0197C06,
++ 0xBFBBFFFF, 0xFFFFFF9A, 0x3FECAF42, 0xE73A4C89,
++ 0xBFBFFFFF, 0xFFFFFF98, 0x3FEC3D6A, 0x24ED822D,
++ 0xBFC1FFFF, 0xFFFFFFE9, 0x3FEBCD55, 0x3B9D7B67,
++ 0xBFC3FFFF, 0xFFFFFFE0, 0x3FEB5EFD, 0x29F24C2D,
++ 0xBFC5FFFF, 0xFFFFF553, 0x3FEAF25B, 0x0A61A9F4,
++ 0xBFC7FFFF, 0xFFFFFF8B, 0x3FEA8768, 0x12C08794,
++ 0xBFC9FFFF, 0xFFFFFE51, 0x3FEA1E1D, 0x93D68828,
++ 0xBFCBFFFF, 0xFFFFFF6E, 0x3FE9B674, 0xF8F2F3F5,
++ 0xBFCDFFFF, 0xFFFFFF7F, 0x3FE95067, 0xC7837A0C,
++ 0xBFCFFFFF, 0xFFFFFF7A, 0x3FE8EBEF, 0x9EAC8225,
++ 0xBFD0FFFF, 0xFFFFFFFE, 0x3FE88906, 0x36E31F55,
++ 0xBFD1FFFF, 0xFFFFFF41, 0x3FE827A5, 0x6188975E,
++ 0xBFD2FFFF, 0xFFFFFFBA, 0x3FE7C7C7, 0x08877656,
++ 0xBFD3FFFF, 0xFFFFFFF8, 0x3FE76965, 0x2DF22F81,
++ 0xBFD4FFFF, 0xFFFFFF90, 0x3FE70C79, 0xEBA33C2F,
++ 0xBFD5FFFF, 0xFFFFFFDB, 0x3FE6B0FF, 0x72DEB8AA,
++ 0xBFD6FFFF, 0xFFFFFF9A, 0x3FE656F0, 0x0BF5798E,
++ 0xBFD7FFFF, 0xFFFFFF9F, 0x3FE5FE46, 0x15E98EB0,
++ 0xBFD8FFFF, 0xFFFFFFEE, 0x3FE5A6FC, 0x061433CE,
++ 0xBFD9FFFF, 0xFFFFFC4A, 0x3FE5510C, 0x67CD26CD,
++ 0xBFDAFFFF, 0xFFFFFF30, 0x3FE4FC71, 0xDC13566B,
++ 0xBFDBFFFF, 0xFFFFFFF0, 0x3FE4A927, 0x1936FD0E,
++ 0xBFDCFFFF, 0xFFFFFFF3, 0x3FE45726, 0xEA84FB8C,
++ 0xBFDDFFFF, 0xFFFFFFF3, 0x3FE4066C, 0x2FF3912B,
++ 0xBFDEFFFF, 0xFFFFFF80, 0x3FE3B6F1, 0xDDD05AB9,
++ 0xBFDFFFFF, 0xFFFFFFDF, 0x3FE368B2, 0xFC6F9614,
++ 0xBFE08000, 0x00000000, 0x3FE31BAA, 0xA7DCA843,
++ 0xBFE0FFFF, 0xFFFFFFA4, 0x3FE2CFD4, 0x0F8BDCE4,
++ 0xBFE17FFF, 0xFFFFFF0A, 0x3FE2852A, 0x760D5CE7,
++ 0xBFE20000, 0x00000000, 0x3FE23BA9, 0x30C1568B,
++ 0xBFE27FFF, 0xFFFFFFBB, 0x3FE1F34B, 0xA78D568D,
++ 0xBFE2FFFF, 0xFFFFFE32, 0x3FE1AC0D, 0x5492C1DB,
++ 0xBFE37FFF, 0xFFFFF042, 0x3FE165E9, 0xC3E67EF2,
++ 0xBFE3FFFF, 0xFFFFFF77, 0x3FE120DC, 0x93499431,
++ 0xBFE47FFF, 0xFFFFFF6B, 0x3FE0DCE1, 0x71E34ECE,
++ 0xBFE4FFFF, 0xFFFFFFF1, 0x3FE099F4, 0x1FFBE588,
++ 0xBFE57FFF, 0xFFFFFE02, 0x3FE05810, 0x6EB8A7AE,
++ 0xBFE5FFFF, 0xFFFFFFE5, 0x3FE01732, 0x3FD9002E,
++ 0xBFE67FFF, 0xFFFFFFB0, 0x3FDFAEAB, 0x0AE9386C,
++ 0xBFE6FFFF, 0xFFFFFFB2, 0x3FDF30EC, 0x837503D7,
++ 0xBFE77FFF, 0xFFFFFF7F, 0x3FDEB521, 0x0D627133,
++ 0xBFE7FFFF, 0xFFFFFFE8, 0x3FDE3B40, 0xEBEFCD95,
++ 0xBFE87FFF, 0xFFFFFFC8, 0x3FDDC344, 0x8110DAE2,
++ 0xBFE8FFFF, 0xFFFFFB30, 0x3FDD4D24, 0x4CF4EF06,
++ 0xBFE97FFF, 0xFFFFFFEF, 0x3FDCD8D8, 0xED8EE395,
++ 0xBFE9FFFF, 0xFFFFFFA7, 0x3FDC665B, 0x1E1F1E5C,
++ 0xBFEA7FFF, 0xFFFFFFDC, 0x3FDBF5A3, 0xB6BF18D6,
++ 0xBFEAFFFF, 0xFFFFFF95, 0x3FDB86AB, 0xABEEF93B,
++ 0xBFEB7FFF, 0xFFFFFFCB, 0x3FDB196C, 0x0E24D256,
++ 0xBFEBFFFF, 0xFFFFFF32, 0x3FDAADDE, 0x095DADF7,
++ 0xBFEC7FFF, 0xFFFFFF6A, 0x3FDA43FA, 0xE4B047C9,
++ 0xBFECFFFF, 0xFFFFFFB6, 0x3FD9DBBC, 0x01E182A4,
++ 0xBFED7FFF, 0xFFFFFFCA, 0x3FD9751A, 0xDCFA81EC,
++ 0xBFEDFFFF, 0xFFFFFFCD, 0x3FD91011, 0x0BE0699E,
++ 0xBFEE7FFF, 0xFFFFFFFB, 0x3FD8AC98, 0x3DEDBC69,
++ 0xBFEEFFFF, 0xFFFFFF88, 0x3FD84AAA, 0x3B8D51A9,
++ 0xBFEF7FFF, 0xFFFFFFBB, 0x3FD7EA40, 0xE5D6D92E,
++ 0xBFEFFFFF, 0xFFFFFFDB, 0x3FD78B56, 0x362CEF53,
++ 0xBFF03FFF, 0xFFFFFF00, 0x3FD72DE4, 0x3DDCB1F2,
++ 0xBFF07FFF, 0xFFFFFE6F, 0x3FD6D1E5, 0x25BED085,
++ 0xBFF0BFFF, 0xFFFFFFD6, 0x3FD67753, 0x2DDA1C57 } };
++
++#else
++#ifdef LITTLE_ENDI
++
++static const union {
++ int i[128];
++ double x[64];
++} TBL = { .i = {
++ 0x00000000, 0x3FF00000, 0x00000000, 0x00000000,
++ 0xD3158574, 0x3FF059B0, 0xA475B465, 0x3C8D73E2,
++ 0x6CF9890F, 0x3FF0B558, 0x4ADC610A, 0x3C98A62E,
++ 0xD0125B51, 0x3FF11301, 0x39449B3A, 0xBC96C510,
++ 0x3C7D517B, 0x3FF172B8, 0xB9D78A76, 0xBC819041,
++ 0x3168B9AA, 0x3FF1D487, 0x00A2643C, 0x3C9E016E,
++ 0x6E756238, 0x3FF2387A, 0xB6C70573, 0x3C99B07E,
++ 0xF51FDEE1, 0x3FF29E9D, 0xAFAD1255, 0x3C8612E8,
++ 0x0A31B715, 0x3FF306FE, 0xD23182E4, 0x3C86F46A,
++ 0x373AA9CB, 0x3FF371A7, 0xBF42EAE2, 0xBC963AEA,
++ 0x4C123422, 0x3FF3DEA6, 0x11F09EBC, 0x3C8ADA09,
++ 0x6061892D, 0x3FF44E08, 0x04EF80D0, 0x3C489B7A,
++ 0xD5362A27, 0x3FF4BFDA, 0xAFEC42E2, 0x3C7D4397,
++ 0x569D4F82, 0x3FF5342B, 0x1DB13CAC, 0xBC807ABE,
++ 0xDD485429, 0x3FF5AB07, 0x054647AD, 0x3C96324C,
++ 0xB03A5585, 0x3FF6247E, 0x7E40B497, 0xBC9383C1,
++ 0x667F3BCD, 0x3FF6A09E, 0x13B26456, 0xBC9BDD34,
++ 0xE8EC5F74, 0x3FF71F75, 0x86887A99, 0xBC816E47,
++ 0x73EB0187, 0x3FF7A114, 0xEE04992F, 0xBC841577,
++ 0x994CCE13, 0x3FF82589, 0xD41532D8, 0xBC9D4C1D,
++ 0x422AA0DB, 0x3FF8ACE5, 0x56864B27, 0x3C96E9F1,
++ 0xB0CDC5E5, 0x3FF93737, 0x81B57EBC, 0xBC675FC7,
++ 0x82A3F090, 0x3FF9C491, 0xB071F2BE, 0x3C7C7C46,
++ 0xB23E255D, 0x3FFA5503, 0xDB8D41E1, 0xBC9D2F6E,
++ 0x995AD3AD, 0x3FFAE89F, 0x345DCC81, 0x3C97A1CD,
++ 0xF2FB5E47, 0x3FFB7F76, 0x7E54AC3B, 0xBC75584F,
++ 0xDD85529C, 0x3FFC199B, 0x895048DD, 0x3C811065,
++ 0xDCEF9069, 0x3FFCB720, 0xD1E949DB, 0x3C7503CB,
++ 0xDCFBA487, 0x3FFD5818, 0xD75B3706, 0x3C82ED02,
++ 0x337B9B5F, 0x3FFDFC97, 0x4F184B5C, 0xBC91A5CD,
++ 0xA2A490DA, 0x3FFEA4AF, 0x179C2893, 0xBC9E9C23,
++ 0x5B6E4540, 0x3FFF5076, 0x2DD8A18B, 0x3C99D3E1 } };
++/*
++ For i = 0, ..., 66,
++ TBL2[2*i] is a double precision number near (i+1)*2^-6, and
++ TBL2[2*i+1] = exp(TBL2[2*i]) to within a relative error less
++ than 2^-60.
++
++ For i = 67, ..., 133,
++ TBL2[2*i] is a double precision number near -(i+1)*2^-6, and
++ TBL2[2*i+1] = exp(TBL2[2*i]) to within a relative error less
++ than 2^-60.
++*/
++static const union {
++ int i[536];
++ double x[268];
++} TBL2 = { .i = {
++ 0xFFFFFC82, 0x3F8FFFFF, 0xAB55DE32, 0x3FF04080,
++ 0xFFFFFFDB, 0x3F9FFFFF, 0x601127EC, 0x3FF08205,
++ 0x000000A0, 0x3FA80000, 0x36829E91, 0x3FF0C492,
++ 0xFFFFFF79, 0x3FAFFFFF, 0x577D34E9, 0x3FF1082B,
++ 0xFFFFFFFC, 0x3FB3FFFF, 0xFC989CD6, 0x3FF14CD4,
++ 0x00000060, 0x3FB80000, 0x7074E0D4, 0x3FF19293,
++ 0x00000061, 0x3FBC0000, 0x0EFF0E80, 0x3FF1D96B,
++ 0xFFFFFFD6, 0x3FBFFFFF, 0x45B6F5CA, 0x3FF22160,
++ 0xFFFFFF58, 0x3FC1FFFF, 0x93F6014C, 0x3FF26A77,
++ 0xFFFFFF75, 0x3FC3FFFF, 0x8B372C65, 0x3FF2B4B5,
++ 0xFFFFFF00, 0x3FC5FFFF, 0xCF601AD1, 0x3FF3001E,
++ 0x00000020, 0x3FC80000, 0x170B583A, 0x3FF34CB8,
++ 0xFFFFA629, 0x3FC9FFFF, 0x2BD3B344, 0x3FF39A86,
++ 0x0000000F, 0x3FCC0000, 0xEAA11DCE, 0x3FF3E98D,
++ 0x0000007F, 0x3FCE0000, 0x43F5F16D, 0x3FF439D4,
++ 0x00000072, 0x3FD00000, 0x3C3E81AB, 0x3FF48B5E,
++ 0xFFFFFECA, 0x3FD0FFFF, 0xEC211DFB, 0x3FF4DE30,
++ 0xFFFFFF8F, 0x3FD1FFFF, 0x80CFACD2, 0x3FF53251,
++ 0x0000003B, 0x3FD30000, 0x3C5A7B04, 0x3FF587C5,
++ 0x00000034, 0x3FD40000, 0x76046007, 0x3FF5DE91,
++ 0xFFFFFF89, 0x3FD4FFFF, 0x9A98322F, 0x3FF636BB,
++ 0xFFFFFFE7, 0x3FD5FFFF, 0x2CBF942A, 0x3FF69049,
++ 0xFFFFFF78, 0x3FD6FFFF, 0xC55B1E45, 0x3FF6EB3F,
++ 0xFFFFFF65, 0x3FD7FFFF, 0x13DBEF32, 0x3FF747A5,
++ 0xFFFFFFD5, 0x3FD8FFFF, 0xDE9EA22E, 0x3FF7A57E,
++ 0xFFFFFF6E, 0x3FD9FFFF, 0x0347B50F, 0x3FF804D3,
++ 0xFFFFFFC3, 0x3FDAFFFF, 0x772164AE, 0x3FF865A7,
++ 0x00000053, 0x3FDC0000, 0x477B0030, 0x3FF8C802,
++ 0x0000004D, 0x3FDD0000, 0x9A09BF1E, 0x3FF92BE9,
++ 0x00000096, 0x3FDE0000, 0xAD4B1E08, 0x3FF99163,
++ 0xFFFFFEFA, 0x3FDEFFFF, 0xD8E8C4FC, 0x3FF9F876,
++ 0xFFFFFFD0, 0x3FDFFFFF, 0x8E1E0688, 0x3FFA6129,
++ 0x00000002, 0x3FE08000, 0x581EEE56, 0x3FFACB82,
++ 0x0000001F, 0x3FE10000, 0xDC80F979, 0x3FFB3787,
++ 0xFFFFFFF8, 0x3FE17FFF, 0xDBA56E4F, 0x3FFBA540,
++ 0xFFFFFFFA, 0x3FE1FFFF, 0x31256441, 0x3FFC14B4,
++ 0xFFFFFFC4, 0x3FE27FFF, 0xD43F7C9B, 0x3FFC85E8,
++ 0xFFFFFFFD, 0x3FE2FFFF, 0xD84758A6, 0x3FFCF8E5,
++ 0x0000001F, 0x3FE38000, 0x6D16CD84, 0x3FFD6DB2,
++ 0xFFFFFFD8, 0x3FE3FFFF, 0xDF80E39B, 0x3FFDE455,
++ 0x00000052, 0x3FE48000, 0x99C6A59C, 0x3FFE5CD7,
++ 0xFFFFFFC8, 0x3FE4FFFF, 0x240DC10C, 0x3FFED73F,
++ 0x00000013, 0x3FE58000, 0x24D90F71, 0x3FFF5394,
++ 0xFFFFFFBC, 0x3FE5FFFF, 0x6182F885, 0x3FFFD1DE,
++ 0x0000002D, 0x3FE68000, 0xDF5CE741, 0x40002912,
++ 0x00000040, 0x3FE70000, 0x207F0A2A, 0x40006A39,
++ 0x0000004F, 0x3FE78000, 0x0691652A, 0x4000AC66,
++ 0xFFFFFF6F, 0x3FE7FFFF, 0xB467DCAB, 0x4000EF9D,
++ 0xFFFFFFE5, 0x3FE87FFF, 0x5D82E943, 0x400133E4,
++ 0x00000035, 0x3FE90000, 0x4652CC6D, 0x4001793E,
++ 0xFFFFFFB3, 0x3FE97FFF, 0xC47BDA48, 0x4001BFAF,
++ 0x00000000, 0x3FEA0000, 0x3F1BD518, 0x4002073D,
++ 0x0000004A, 0x3FEA8000, 0x2F105CE2, 0x40024FEB,
++ 0xFFFFFFED, 0x3FEAFFFF, 0x1F3E7F11, 0x400299BE,
++ 0xFFFFFFFB, 0x3FEB7FFF, 0xACDB6611, 0x4002E4BA,
++ 0x0000001D, 0x3FEC0000, 0x87B62B39, 0x400330E5,
++ 0x00000079, 0x3FEC8000, 0x7282D538, 0x40037E43,
++ 0xFFFFFF51, 0x3FECFFFF, 0x43268248, 0x4003CCD9,
++ 0xFFFFFF74, 0x3FED7FFF, 0xE304CADC, 0x40041CAB,
++ 0x00000011, 0x3FEE0000, 0x4F4E5343, 0x40046DC0,
++ 0x0000001E, 0x3FEE8000, 0x9950A124, 0x4004C01B,
++ 0xFFFFFF9E, 0x3FEEFFFF, 0xE6C73196, 0x400513C2,
++ 0xFFFFFFED, 0x3FEF7FFF, 0x722DD586, 0x400568BB,
++ 0x00000034, 0x3FF00000, 0x8B1457B0, 0x4005BF0A,
++ 0xFFFFFFE2, 0x3FF03FFF, 0x967376DF, 0x400616B5,
++ 0xFFFFFF4B, 0x3FF07FFF, 0x0F0337A9, 0x40066FC2,
++ 0xFFFFFFFD, 0x3FF0BFFF, 0x859290F5, 0x4006CA35,
++ 0xFFFFFFE4, 0xBF8FFFFF, 0xABFEEFA5, 0x3FEF80FE,
++ 0xFFFFFB0B, 0xBF9FFFFF, 0x6A88B5FE, 0x3FEF03F5,
++ 0xFFFFFFA7, 0xBFA7FFFF, 0x6AFECFC5, 0x3FEE88DC,
++ 0xFFFFFEA8, 0xBFAFFFFF, 0xFBC702B8, 0x3FEE0FAB,
++ 0xFFFFFFB3, 0xBFB3FFFF, 0x89D041AC, 0x3FED985C,
++ 0xFFFFFFE3, 0xBFB7FFFF, 0xA0197C06, 0x3FED22E6,
++ 0xFFFFFF9A, 0xBFBBFFFF, 0xE73A4C89, 0x3FECAF42,
++ 0xFFFFFF98, 0xBFBFFFFF, 0x24ED822D, 0x3FEC3D6A,
++ 0xFFFFFFE9, 0xBFC1FFFF, 0x3B9D7B67, 0x3FEBCD55,
++ 0xFFFFFFE0, 0xBFC3FFFF, 0x29F24C2D, 0x3FEB5EFD,
++ 0xFFFFF553, 0xBFC5FFFF, 0x0A61A9F4, 0x3FEAF25B,
++ 0xFFFFFF8B, 0xBFC7FFFF, 0x12C08794, 0x3FEA8768,
++ 0xFFFFFE51, 0xBFC9FFFF, 0x93D68828, 0x3FEA1E1D,
++ 0xFFFFFF6E, 0xBFCBFFFF, 0xF8F2F3F5, 0x3FE9B674,
++ 0xFFFFFF7F, 0xBFCDFFFF, 0xC7837A0C, 0x3FE95067,
++ 0xFFFFFF7A, 0xBFCFFFFF, 0x9EAC8225, 0x3FE8EBEF,
++ 0xFFFFFFFE, 0xBFD0FFFF, 0x36E31F55, 0x3FE88906,
++ 0xFFFFFF41, 0xBFD1FFFF, 0x6188975E, 0x3FE827A5,
++ 0xFFFFFFBA, 0xBFD2FFFF, 0x08877656, 0x3FE7C7C7,
++ 0xFFFFFFF8, 0xBFD3FFFF, 0x2DF22F81, 0x3FE76965,
++ 0xFFFFFF90, 0xBFD4FFFF, 0xEBA33C2F, 0x3FE70C79,
++ 0xFFFFFFDB, 0xBFD5FFFF, 0x72DEB8AA, 0x3FE6B0FF,
++ 0xFFFFFF9A, 0xBFD6FFFF, 0x0BF5798E, 0x3FE656F0,
++ 0xFFFFFF9F, 0xBFD7FFFF, 0x15E98EB0, 0x3FE5FE46,
++ 0xFFFFFFEE, 0xBFD8FFFF, 0x061433CE, 0x3FE5A6FC,
++ 0xFFFFFC4A, 0xBFD9FFFF, 0x67CD26CD, 0x3FE5510C,
++ 0xFFFFFF30, 0xBFDAFFFF, 0xDC13566B, 0x3FE4FC71,
++ 0xFFFFFFF0, 0xBFDBFFFF, 0x1936FD0E, 0x3FE4A927,
++ 0xFFFFFFF3, 0xBFDCFFFF, 0xEA84FB8C, 0x3FE45726,
++ 0xFFFFFFF3, 0xBFDDFFFF, 0x2FF3912B, 0x3FE4066C,
++ 0xFFFFFF80, 0xBFDEFFFF, 0xDDD05AB9, 0x3FE3B6F1,
++ 0xFFFFFFDF, 0xBFDFFFFF, 0xFC6F9614, 0x3FE368B2,
++ 0x00000000, 0xBFE08000, 0xA7DCA843, 0x3FE31BAA,
++ 0xFFFFFFA4, 0xBFE0FFFF, 0x0F8BDCE4, 0x3FE2CFD4,
++ 0xFFFFFF0A, 0xBFE17FFF, 0x760D5CE7, 0x3FE2852A,
++ 0x00000000, 0xBFE20000, 0x30C1568B, 0x3FE23BA9,
++ 0xFFFFFFBB, 0xBFE27FFF, 0xA78D568D, 0x3FE1F34B,
++ 0xFFFFFE32, 0xBFE2FFFF, 0x5492C1DB, 0x3FE1AC0D,
++ 0xFFFFF042, 0xBFE37FFF, 0xC3E67EF2, 0x3FE165E9,
++ 0xFFFFFF77, 0xBFE3FFFF, 0x93499431, 0x3FE120DC,
++ 0xFFFFFF6B, 0xBFE47FFF, 0x71E34ECE, 0x3FE0DCE1,
++ 0xFFFFFFF1, 0xBFE4FFFF, 0x1FFBE588, 0x3FE099F4,
++ 0xFFFFFE02, 0xBFE57FFF, 0x6EB8A7AE, 0x3FE05810,
++ 0xFFFFFFE5, 0xBFE5FFFF, 0x3FD9002E, 0x3FE01732,
++ 0xFFFFFFB0, 0xBFE67FFF, 0x0AE9386C, 0x3FDFAEAB,
++ 0xFFFFFFB2, 0xBFE6FFFF, 0x837503D7, 0x3FDF30EC,
++ 0xFFFFFF7F, 0xBFE77FFF, 0x0D627133, 0x3FDEB521,
++ 0xFFFFFFE8, 0xBFE7FFFF, 0xEBEFCD95, 0x3FDE3B40,
++ 0xFFFFFFC8, 0xBFE87FFF, 0x8110DAE2, 0x3FDDC344,
++ 0xFFFFFB30, 0xBFE8FFFF, 0x4CF4EF06, 0x3FDD4D24,
++ 0xFFFFFFEF, 0xBFE97FFF, 0xED8EE395, 0x3FDCD8D8,
++ 0xFFFFFFA7, 0xBFE9FFFF, 0x1E1F1E5C, 0x3FDC665B,
++ 0xFFFFFFDC, 0xBFEA7FFF, 0xB6BF18D6, 0x3FDBF5A3,
++ 0xFFFFFF95, 0xBFEAFFFF, 0xABEEF93B, 0x3FDB86AB,
++ 0xFFFFFFCB, 0xBFEB7FFF, 0x0E24D256, 0x3FDB196C,
++ 0xFFFFFF32, 0xBFEBFFFF, 0x095DADF7, 0x3FDAADDE,
++ 0xFFFFFF6A, 0xBFEC7FFF, 0xE4B047C9, 0x3FDA43FA,
++ 0xFFFFFFB6, 0xBFECFFFF, 0x01E182A4, 0x3FD9DBBC,
++ 0xFFFFFFCA, 0xBFED7FFF, 0xDCFA81EC, 0x3FD9751A,
++ 0xFFFFFFCD, 0xBFEDFFFF, 0x0BE0699E, 0x3FD91011,
++ 0xFFFFFFFB, 0xBFEE7FFF, 0x3DEDBC69, 0x3FD8AC98,
++ 0xFFFFFF88, 0xBFEEFFFF, 0x3B8D51A9, 0x3FD84AAA,
++ 0xFFFFFFBB, 0xBFEF7FFF, 0xE5D6D92E, 0x3FD7EA40,
++ 0xFFFFFFDB, 0xBFEFFFFF, 0x362CEF53, 0x3FD78B56,
++ 0xFFFFFF00, 0xBFF03FFF, 0x3DDCB1F2, 0x3FD72DE4,
++ 0xFFFFFE6F, 0xBFF07FFF, 0x25BED085, 0x3FD6D1E5,
++ 0xFFFFFFD6, 0xBFF0BFFF, 0x2DDA1C57, 0x3FD67753 } };
++
++#endif
++#endif
++
++
++#ifdef BIG_ENDI
++
++static const mynumber
++/* Following three values used to scale x to primary range */
++ invln2_32 = {{0x40471547, 0x652b82fe}}, /* 4.61662413084468283841e+01 */
++ ln2_32hi = {{0x3f962e42, 0xfee00000}}, /* 2.16608493865351192653e-02 */
++ ln2_32lo = {{0x3d9a39ef, 0x35793c76}}, /* 5.96317165397058656257e-12 */
++/* t2-t5 terms used for polynomial computation */
++ t2 = {{0x3fc55555, 0x55548f7c}}, /* 1.6666666666526086527e-1 */
++ t3 = {{0x3fa55555, 0x55545d4e}}, /* 4.1666666666226079285e-2 */
++ t4 = {{0x3f811115, 0xb7aa905e}}, /* 8.3333679843421958056e-3 */
++ t5 = {{0x3f56c172, 0x8d739765}}, /* 1.3888949086377719040e-3 */
++/* maximum value for x to not overflow */
++ threshold1 = {{0x40862E42, 0xFEFA39EF}}, /* 7.09782712893383973096e+02 */
++/* maximum value for -x to not underflow */
++ threshold2 = {{0x40874910, 0xD52D3051}}, /* 7.45133219101941108420e+02 */
++/* scaling factor used when result near zero*/
++ twom54 = {{0x3c900000, 0x00000000}}; /* 5.55111512312578270212e-17 */
++
++#else
++#ifdef LITTLE_ENDI
++
++static const mynumber
++/* Following three values used to scale x to primary range */
++ invln2_32 = {{0x652b82fe, 0x40471547}}, /* 4.61662413084468283841e+01 */
++ ln2_32hi = {{0xfee00000, 0x3f962e42}}, /* 2.16608493865351192653e-02 */
++ ln2_32lo = {{0x35793c76, 0x3d9a39ef}}, /* 5.96317165397058656257e-12 */
++/* t2-t5 terms used for polynomial computation */
++ t2 = {{0x55548f7c, 0x3fc55555}}, /* 1.6666666666526086527e-1 */
++ t3 = {{0x55545d4e, 0x3fa55555}}, /* 4.1666666666226079285e-2 */
++ t4 = {{0xb7aa905e, 0x3f811115}}, /* 8.3333679843421958056e-3 */
++ t5 = {{0x8d739765, 0x3f56c172}}, /* 1.3888949086377719040e-3 */
++/* maximum value for x to not overflow */
++ threshold1 = {{0xFEFA39EF, 0x40862E42}}, /* 7.09782712893383973096e+02 */
++/* maximum value for -x to not underflow */
++ threshold2 = {{0xD52D3051, 0x40874910}}, /* 7.45133219101941108420e+02 */
++/* scaling factor used when result near zero*/
++ twom54 = {{0x00000000, 0x3c900000}}; /* 5.55111512312578270212e-17 */
++
++#endif
++#endif
+diff --git a/sysdeps/ieee754/dbl-64/slowexp.c b/sysdeps/ieee754/dbl-64/slowexp.c
+deleted file mode 100644
+index e8fa2e2..0000000
+--- a/sysdeps/ieee754/dbl-64/slowexp.c
++++ /dev/null
+@@ -1,86 +0,0 @@
+-/*
+- * IBM Accurate Mathematical Library
+- * written by International Business Machines Corp.
+- * Copyright (C) 2001-2017 Free Software Foundation, Inc.
+- *
+- * This program 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.
+- *
+- * This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+- */
+-/**************************************************************************/
+-/* MODULE_NAME:slowexp.c */
+-/* */
+-/* FUNCTION:slowexp */
+-/* */
+-/* FILES NEEDED:mpa.h */
+-/* mpa.c mpexp.c */
+-/* */
+-/*Converting from double precision to Multi-precision and calculating */
+-/* e^x */
+-/**************************************************************************/
+-#include <math_private.h>
+-
+-#include <stap-probe.h>
+-
+-#ifndef USE_LONG_DOUBLE_FOR_MP
+-# include "mpa.h"
+-void __mpexp (mp_no *x, mp_no *y, int p);
+-#endif
+-
+-#ifndef SECTION
+-# define SECTION
+-#endif
+-
+-/*Converting from double precision to Multi-precision and calculating e^x */
+-double
+-SECTION
+-__slowexp (double x)
+-{
+-#ifndef USE_LONG_DOUBLE_FOR_MP
+- double w, z, res, eps = 3.0e-26;
+- int p;
+- mp_no mpx, mpy, mpz, mpw, mpeps, mpcor;
+-
+- /* Use the multiple precision __MPEXP function to compute the exponential
+- First at 144 bits and if it is not accurate enough, at 768 bits. */
+- p = 6;
+- __dbl_mp (x, &mpx, p);
+- __mpexp (&mpx, &mpy, p);
+- __dbl_mp (eps, &mpeps, p);
+- __mul (&mpeps, &mpy, &mpcor, p);
+- __add (&mpy, &mpcor, &mpw, p);
+- __sub (&mpy, &mpcor, &mpz, p);
+- __mp_dbl (&mpw, &w, p);
+- __mp_dbl (&mpz, &z, p);
+- if (w == z)
+- {
+- /* Track how often we get to the slow exp code plus
+- its input/output values. */
+- LIBC_PROBE (slowexp_p6, 2, &x, &w);
+- return w;
+- }
+- else
+- {
+- p = 32;
+- __dbl_mp (x, &mpx, p);
+- __mpexp (&mpx, &mpy, p);
+- __mp_dbl (&mpy, &res, p);
+-
+- /* Track how often we get to the uber-slow exp code plus
+- its input/output values. */
+- LIBC_PROBE (slowexp_p32, 2, &x, &res);
+- return res;
+- }
+-#else
+- return (double) __ieee754_expl((long double)x);
+-#endif
+-}
+diff --git a/sysdeps/powerpc/power4/fpu/Makefile b/sysdeps/powerpc/power4/fpu/Makefile
+index e17d32f..ded9976 100644
+--- a/sysdeps/powerpc/power4/fpu/Makefile
++++ b/sysdeps/powerpc/power4/fpu/Makefile
+@@ -3,5 +3,4 @@
+ ifeq ($(subdir),math)
+ CFLAGS-mpa.c += --param max-unroll-times=4 -funroll-loops -fpeel-loops
+ CPPFLAGS-slowpow.c += -DUSE_LONG_DOUBLE_FOR_MP=1
+-CPPFLAGS-slowexp.c += -DUSE_LONG_DOUBLE_FOR_MP=1
+ endif
+diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
+index d660552..4051232 100644
+--- a/sysdeps/x86_64/fpu/multiarch/Makefile
++++ b/sysdeps/x86_64/fpu/multiarch/Makefile
+@@ -10,7 +10,7 @@ libm-sysdep_routines += s_ceil-sse4_1 s_ceilf-sse4_1 s_floor-sse4_1 \
+
+ libm-sysdep_routines += e_exp-fma e_log-fma e_pow-fma s_atan-fma \
+ e_asin-fma e_atan2-fma s_sin-fma s_tan-fma \
+- mplog-fma mpa-fma slowexp-fma slowpow-fma \
++ mplog-fma mpa-fma slowpow-fma \
+ sincos32-fma doasin-fma dosincos-fma \
+ halfulp-fma mpexp-fma \
+ mpatan2-fma mpatan-fma mpsqrt-fma mptan-fma
+@@ -32,7 +32,6 @@ CFLAGS-mpsqrt-fma.c = -mfma -mavx2
+ CFLAGS-mptan-fma.c = -mfma -mavx2
+ CFLAGS-s_atan-fma.c = -mfma -mavx2
+ CFLAGS-sincos32-fma.c = -mfma -mavx2
+-CFLAGS-slowexp-fma.c = -mfma -mavx2
+ CFLAGS-slowpow-fma.c = -mfma -mavx2
+ CFLAGS-s_sin-fma.c = -mfma -mavx2
+ CFLAGS-s_tan-fma.c = -mfma -mavx2
+@@ -42,7 +41,7 @@ libm-sysdep_routines += e_expf-fma
+
+ libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
+ e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
+- mplog-fma4 mpa-fma4 slowexp-fma4 slowpow-fma4 \
++ mplog-fma4 mpa-fma4 slowpow-fma4 \
+ sincos32-fma4 doasin-fma4 dosincos-fma4 \
+ halfulp-fma4 mpexp-fma4 \
+ mpatan2-fma4 mpatan-fma4 mpsqrt-fma4 mptan-fma4
+@@ -64,14 +63,13 @@ CFLAGS-mpsqrt-fma4.c = -mfma4
+ CFLAGS-mptan-fma4.c = -mfma4
+ CFLAGS-s_atan-fma4.c = -mfma4
+ CFLAGS-sincos32-fma4.c = -mfma4
+-CFLAGS-slowexp-fma4.c = -mfma4
+ CFLAGS-slowpow-fma4.c = -mfma4
+ CFLAGS-s_sin-fma4.c = -mfma4
+ CFLAGS-s_tan-fma4.c = -mfma4
+
+ libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
+ e_atan2-avx s_sin-avx s_tan-avx \
+- mplog-avx mpa-avx slowexp-avx \
++ mplog-avx mpa-avx \
+ mpexp-avx
+
+ CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
+@@ -82,7 +80,6 @@ CFLAGS-mpexp-avx.c = -msse2avx -DSSE2AVX
+ CFLAGS-mplog-avx.c = -msse2avx -DSSE2AVX
+ CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
+ CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
+-CFLAGS-slowexp-avx.c = -msse2avx -DSSE2AVX
+ CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+ endif
+
+diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp-avx.c b/sysdeps/x86_64/fpu/multiarch/e_exp-avx.c
+index ee5dd6d..afd9174 100644
+--- a/sysdeps/x86_64/fpu/multiarch/e_exp-avx.c
++++ b/sysdeps/x86_64/fpu/multiarch/e_exp-avx.c
+@@ -1,6 +1,5 @@
+ #define __ieee754_exp __ieee754_exp_avx
+ #define __exp1 __exp1_avx
+-#define __slowexp __slowexp_avx
+ #define SECTION __attribute__ ((section (".text.avx")))
+
+ #include <sysdeps/ieee754/dbl-64/e_exp.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c b/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c
+index 6e0fdb7..765b1b9 100644
+--- a/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c
++++ b/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c
+@@ -1,6 +1,5 @@
+ #define __ieee754_exp __ieee754_exp_fma
+ #define __exp1 __exp1_fma
+-#define __slowexp __slowexp_fma
+ #define SECTION __attribute__ ((section (".text.fma")))
+
+ #include <sysdeps/ieee754/dbl-64/e_exp.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c
+index ae6eb67..9ac7aca 100644
+--- a/sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c
++++ b/sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c
+@@ -1,6 +1,5 @@
+ #define __ieee754_exp __ieee754_exp_fma4
+ #define __exp1 __exp1_fma4
+-#define __slowexp __slowexp_fma4
+ #define SECTION __attribute__ ((section (".text.fma4")))
+
+ #include <sysdeps/ieee754/dbl-64/e_exp.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/slowexp-avx.c b/sysdeps/x86_64/fpu/multiarch/slowexp-avx.c
+deleted file mode 100644
+index d01c6d7..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/slowexp-avx.c
++++ /dev/null
+@@ -1,9 +0,0 @@
+-#define __slowexp __slowexp_avx
+-#define __add __add_avx
+-#define __dbl_mp __dbl_mp_avx
+-#define __mpexp __mpexp_avx
+-#define __mul __mul_avx
+-#define __sub __sub_avx
+-#define SECTION __attribute__ ((section (".text.avx")))
+-
+-#include <sysdeps/ieee754/dbl-64/slowexp.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c b/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c
+deleted file mode 100644
+index 6fffca1..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c
++++ /dev/null
+@@ -1,9 +0,0 @@
+-#define __slowexp __slowexp_fma
+-#define __add __add_fma
+-#define __dbl_mp __dbl_mp_fma
+-#define __mpexp __mpexp_fma
+-#define __mul __mul_fma
+-#define __sub __sub_fma
+-#define SECTION __attribute__ ((section (".text.fma")))
+-
+-#include <sysdeps/ieee754/dbl-64/slowexp.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c b/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c
+deleted file mode 100644
+index 3bcde84..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c
++++ /dev/null
+@@ -1,9 +0,0 @@
+-#define __slowexp __slowexp_fma4
+-#define __add __add_fma4
+-#define __dbl_mp __dbl_mp_fma4
+-#define __mpexp __mpexp_fma4
+-#define __mul __mul_fma4
+-#define __sub __sub_fma4
+-#define SECTION __attribute__ ((section (".text.fma4")))
+-
+-#include <sysdeps/ieee754/dbl-64/slowexp.c>
+--
+1.7.1
+
diff --git a/fma-expf-fix.patch b/fma-expf-fix.patch
deleted file mode 100644
index 297db30..0000000
--- a/fma-expf-fix.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From ce3e7f4136a9f5943328c74511542834ca05811b Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Tue, 15 Aug 2017 14:04:59 -0700
-Subject: [PATCH] x86-64: Align L(SP_RANGE)/L(SP_INF_0) to 8 bytes [BZ #21955]
-
-sysdeps/x86_64/fpu/e_expf.S has
-
- lea L(SP_RANGE)(%rip), %rdx /* load over/underflow bound */
- cmpl (%rdx,%rax,4), %ecx /* |x|<under/overflow bound ? */
-...
- /* Here if |x| is Inf */
- lea L(SP_INF_0)(%rip), %rdx /* depending on sign of x: */
- movss (%rdx,%rax,4), %xmm0 /* return zero or Inf */
- ret
-...
- .section .rodata.cst8,"aM",@progbits,8
-...
- .p2align 2
-L(SP_RANGE): /* single precision overflow/underflow bounds */
- .long 0x42b17217 /* if x>this bound, then result overflows */
- .long 0x42cff1b4 /* if x<this bound, then result underflows */
- .type L(SP_RANGE), @object
- ASM_SIZE_DIRECTIVE(L(SP_RANGE))
-
- .p2align 2
-L(SP_INF_0):
- .long 0x7f800000 /* single precision Inf */
- .long 0 /* single precision zero */
- .type L(SP_INF_0), @object
- ASM_SIZE_DIRECTIVE(L(SP_INF_0))
-
-Since L(SP_RANGE) and L(SP_INF_0) are in .rodata.cst8 section, they must
-be aligned to 8 bytes.
-
- [BZ #21955]
- * sysdeps/x86_64/fpu/e_expf.S (L(SP_RANGE)): Aligned to 8 bytes.
- (L(SP_INF_0)): Likewise.
-
-(cherry picked from commit f59f7adb4a00b7784cab1becdf257366104587b7)
----
- sysdeps/x86_64/fpu/e_expf.S | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/sysdeps/x86_64/fpu/e_expf.S b/sysdeps/x86_64/fpu/e_expf.S
-index 4fd2bb1fb5..c3bf312c44 100644
---- a/sysdeps/x86_64/fpu/e_expf.S
-+++ b/sysdeps/x86_64/fpu/e_expf.S
-@@ -297,14 +297,14 @@ L(DP_P0): /* double precision polynomial coefficient P0 */
- .type L(DP_P0), @object
- ASM_SIZE_DIRECTIVE(L(DP_P0))
-
-- .p2align 2
-+ .p2align 3
- L(SP_RANGE): /* single precision overflow/underflow bounds */
- .long 0x42b17217 /* if x>this bound, then result overflows */
- .long 0x42cff1b4 /* if x<this bound, then result underflows */
- .type L(SP_RANGE), @object
- ASM_SIZE_DIRECTIVE(L(SP_RANGE))
-
-- .p2align 2
-+ .p2align 3
- L(SP_INF_0):
- .long 0x7f800000 /* single precision Inf */
- .long 0 /* single precision zero */
---
-2.13.4
-
diff --git a/fma-expf.patch b/fma-expf.patch
deleted file mode 100644
index d6d8968..0000000
--- a/fma-expf.patch
+++ /dev/null
@@ -1,473 +0,0 @@
-From 02e4202afc6f9d7a2e68e916b231ae7295c75263 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Tue, 15 Aug 2017 08:45:34 -0700
-Subject: [PATCH] x86-64: Optimize e_expf with FMA [BZ #21912]
-
- [BZ #21912]
- * sysdeps/x86_64/fpu/multiarch/e_expf-fma.S: New file.
- * sysdeps/x86_64/fpu/multiarch/e_expf-sse2.S: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_expf.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/ifunc-fma.h: Likewise.
----
- sysdeps/x86_64/fpu/multiarch/Makefile | 4 +
- sysdeps/x86_64/fpu/multiarch/e_expf-fma.S | 325 +++++++++++++++++++++++++++++
- sysdeps/x86_64/fpu/multiarch/e_expf-sse2.S | 24 +++
- sysdeps/x86_64/fpu/multiarch/e_expf.c | 26 +++
- sysdeps/x86_64/fpu/multiarch/ifunc-fma.h | 34 +++
- 5 files changed, 413 insertions(+)
- create mode 100644 sysdeps/x86_64/fpu/multiarch/e_expf-fma.S
- create mode 100644 sysdeps/x86_64/fpu/multiarch/e_expf-sse2.S
- create mode 100644 sysdeps/x86_64/fpu/multiarch/e_expf.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/ifunc-fma.h
-
-diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
-index e9e4f7c745..379215efa1 100644
---- a/sysdeps/x86_64/fpu/multiarch/Makefile
-+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
-@@ -31,6 +31,10 @@ CFLAGS-slowpow-fma.c = -mfma -mavx2
- CFLAGS-s_sin-fma.c = -mfma -mavx2
- CFLAGS-s_tan-fma.c = -mfma -mavx2
-
-+libm-sysdep_routines += e_expf-sse2 e_expf-fma
-+
-+CFLAGS-e_expf-fma.c = -mfma -mavx2
-+
- libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
- e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
- mplog-fma4 mpa-fma4 slowexp-fma4 slowpow-fma4 \
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_expf-fma.S b/sysdeps/x86_64/fpu/multiarch/e_expf-fma.S
-new file mode 100644
-index 0000000000..b27287c419
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/e_expf-fma.S
-@@ -0,0 +1,325 @@
-+/* FMA/AVX2 version of IEEE 754 expf.
-+ Copyright (C) 2017 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 <sysdep.h>
-+
-+/* Short algorithm description:
-+ *
-+ * Let K = 64 (table size).
-+ * e^x = 2^(x/log(2)) = 2^n * T[j] * (1 + P(y))
-+ * where
-+ * x = m*log(2)/K + y, y in [0.0..log(2)/K]
-+ * m = n*K + j, m,n,j - signed integer, j in [0..K-1]
-+ * values of 2^(j/K) are tabulated as T[j].
-+ *
-+ * P(y) is a minimax polynomial approximation of expf(x)-1
-+ * on small interval [0.0..log(2)/K].
-+ *
-+ * P(y) = P3*y*y*y*y + P2*y*y*y + P1*y*y + P0*y, calculated as
-+ * z = y*y; P(y) = (P3*z + P1)*z + (P2*z + P0)*y
-+ *
-+ * Special cases:
-+ * expf(NaN) = NaN
-+ * expf(+INF) = +INF
-+ * expf(-INF) = 0
-+ * expf(x) = 1 for subnormals
-+ * for finite argument, only expf(0)=1 is exact
-+ * expf(x) overflows if x>88.7228317260742190
-+ * expf(x) underflows if x<-103.972076416015620
-+ */
-+
-+ .section .text.fma,"ax",@progbits
-+ENTRY(__ieee754_expf_fma)
-+ /* Input: single precision x in %xmm0 */
-+ vcvtss2sd %xmm0, %xmm0, %xmm1 /* Convert x to double precision */
-+ vmovd %xmm0, %ecx /* Copy x */
-+ vmovsd L(DP_KLN2)(%rip), %xmm2 /* DP K/log(2) */
-+ vfmadd213sd L(DP_RD)(%rip), %xmm1, %xmm2 /* DP x*K/log(2)+RD */
-+ vmovsd L(DP_P2)(%rip), %xmm3 /* DP P2 */
-+ movl %ecx, %eax /* x */
-+ andl $0x7fffffff, %ecx /* |x| */
-+ lea L(DP_T)(%rip), %rsi /* address of table T[j] */
-+ vmovsd L(DP_P3)(%rip), %xmm4 /* DP P3 */
-+
-+ cmpl $0x42ad496b, %ecx /* |x|<125*log(2) ? */
-+ jae L(special_paths)
-+
-+ /* Here if |x|<125*log(2) */
-+ cmpl $0x31800000, %ecx /* |x|<2^(-28) ? */
-+ jb L(small_arg)
-+
-+ /* Main path: here if 2^(-28)<=|x|<125*log(2) */
-+ /* %xmm2 = SP x*K/log(2)+RS */
-+ vmovd %xmm2, %eax
-+ vsubsd L(DP_RD)(%rip), %xmm2, %xmm2 /* DP t=round(x*K/log(2)) */
-+ movl %eax, %edx /* n*K+j with trash */
-+ andl $0x3f, %eax /* bits of j */
-+ vmovsd (%rsi,%rax,8), %xmm5 /* T[j] */
-+ andl $0xffffffc0, %edx /* bits of n */
-+
-+ vfmadd132sd L(DP_NLN2K)(%rip), %xmm1, %xmm2 /* DP y=x-t*log(2)/K */
-+ vmulsd %xmm2, %xmm2, %xmm6 /* DP z=y*y */
-+
-+
-+ vfmadd213sd L(DP_P1)(%rip), %xmm6, %xmm4 /* DP P3*z + P1 */
-+ vfmadd213sd L(DP_P0)(%rip), %xmm6, %xmm3 /* DP P2*z+P0 */
-+
-+ addl $0x1fc0, %edx /* bits of n + SP exponent bias */
-+ shll $17, %edx /* SP 2^n */
-+ vmovd %edx, %xmm1 /* SP 2^n */
-+
-+ vmulsd %xmm6, %xmm4, %xmm4 /* DP (P3*z+P1)*z */
-+
-+ vfmadd213sd %xmm4, %xmm3, %xmm2 /* DP P(Y) (P2*z+P0)*y */
-+ vfmadd213sd %xmm5, %xmm5, %xmm2 /* DP T[j]*(P(y)+1) */
-+ vcvtsd2ss %xmm2, %xmm2, %xmm0 /* SP T[j]*(P(y)+1) */
-+ vmulss %xmm1, %xmm0, %xmm0 /* SP result=2^n*(T[j]*(P(y)+1)) */
-+ ret
-+
-+ .p2align 4
-+L(small_arg):
-+ /* Here if 0<=|x|<2^(-28) */
-+ vaddss L(SP_ONE)(%rip), %xmm0, %xmm0 /* 1.0 + x */
-+ /* Return 1.0 with inexact raised, except for x==0 */
-+ ret
-+
-+ .p2align 4
-+L(special_paths):
-+ /* Here if 125*log(2)<=|x| */
-+ shrl $31, %eax /* Get sign bit of x, and depending on it: */
-+ lea L(SP_RANGE)(%rip), %rdx /* load over/underflow bound */
-+ cmpl (%rdx,%rax,4), %ecx /* |x|<under/overflow bound ? */
-+ jbe L(near_under_or_overflow)
-+
-+ /* Here if |x|>under/overflow bound */
-+ cmpl $0x7f800000, %ecx /* |x| is finite ? */
-+ jae L(arg_inf_or_nan)
-+
-+ /* Here if |x|>under/overflow bound, and x is finite */
-+ testl %eax, %eax /* sign of x nonzero ? */
-+ je L(res_overflow)
-+
-+ /* Here if -inf<x<underflow bound (x<0) */
-+ vmovss L(SP_SMALL)(%rip), %xmm0/* load small value 2^(-100) */
-+ vmulss %xmm0, %xmm0, %xmm0 /* Return underflowed result (zero or subnormal) */
-+ ret
-+
-+ .p2align 4
-+L(res_overflow):
-+ /* Here if overflow bound<x<inf (x>0) */
-+ vmovss L(SP_LARGE)(%rip), %xmm0/* load large value 2^100 */
-+ vmulss %xmm0, %xmm0, %xmm0 /* Return overflowed result (Inf or max normal) */
-+ ret
-+
-+ .p2align 4
-+L(arg_inf_or_nan):
-+ /* Here if |x| is Inf or NAN */
-+ jne L(arg_nan) /* |x| is Inf ? */
-+
-+ /* Here if |x| is Inf */
-+ lea L(SP_INF_0)(%rip), %rdx /* depending on sign of x: */
-+ vmovss (%rdx,%rax,4), %xmm0 /* return zero or Inf */
-+ ret
-+
-+ .p2align 4
-+L(arg_nan):
-+ /* Here if |x| is NaN */
-+ vaddss %xmm0, %xmm0, %xmm0 /* Return x+x (raise invalid) */
-+ ret
-+
-+ .p2align 4
-+L(near_under_or_overflow):
-+ /* Here if 125*log(2)<=|x|<under/overflow bound */
-+ vmovd %xmm2, %eax /* bits of n*K+j with trash */
-+ vsubsd L(DP_RD)(%rip), %xmm2, %xmm2 /* DP t=round(x*K/log(2)) */
-+ movl %eax, %edx /* n*K+j with trash */
-+ andl $0x3f, %eax /* bits of j */
-+ vmulsd L(DP_NLN2K)(%rip),%xmm2, %xmm2/* DP -t*log(2)/K */
-+ andl $0xffffffc0, %edx /* bits of n */
-+ vaddsd %xmm1, %xmm2, %xmm0 /* DP y=x-t*log(2)/K */
-+ vmulsd %xmm0, %xmm0, %xmm2 /* DP z=y*y */
-+ addl $0xffc0, %edx /* bits of n + DP exponent bias */
-+ vfmadd213sd L(DP_P0)(%rip), %xmm2, %xmm3/* DP P2*z+P0 */
-+ shlq $46, %rdx /* DP 2^n */
-+ vfmadd213sd L(DP_P1)(%rip), %xmm2, %xmm4/* DP P3*z+P1 */
-+ vmovq %rdx, %xmm1 /* DP 2^n */
-+ vmulsd %xmm2, %xmm4, %xmm4 /* DP (P3*z+P1)*z */
-+ vfmadd213sd %xmm4, %xmm3, %xmm0 /* DP (P2*z+P0)*y */
-+ vmovsd (%rsi,%rax,8), %xmm2
-+ vfmadd213sd %xmm2, %xmm2, %xmm0 /* DP T[j]*(P(y)+1) */
-+ vmulsd %xmm1, %xmm0, %xmm0 /* DP result=2^n*(T[j]*(P(y)+1)) */
-+ vcvtsd2ss %xmm0, %xmm0, %xmm0 /* convert result to single precision */
-+ ret
-+END(__ieee754_expf_fma)
-+
-+ .section .rodata, "a"
-+ .p2align 3
-+L(DP_T): /* table of double precision values 2^(j/K) for j=[0..K-1] */
-+ .long 0x00000000, 0x3ff00000
-+ .long 0x3e778061, 0x3ff02c9a
-+ .long 0xd3158574, 0x3ff059b0
-+ .long 0x18759bc8, 0x3ff08745
-+ .long 0x6cf9890f, 0x3ff0b558
-+ .long 0x32d3d1a2, 0x3ff0e3ec
-+ .long 0xd0125b51, 0x3ff11301
-+ .long 0xaea92de0, 0x3ff1429a
-+ .long 0x3c7d517b, 0x3ff172b8
-+ .long 0xeb6fcb75, 0x3ff1a35b
-+ .long 0x3168b9aa, 0x3ff1d487
-+ .long 0x88628cd6, 0x3ff2063b
-+ .long 0x6e756238, 0x3ff2387a
-+ .long 0x65e27cdd, 0x3ff26b45
-+ .long 0xf51fdee1, 0x3ff29e9d
-+ .long 0xa6e4030b, 0x3ff2d285
-+ .long 0x0a31b715, 0x3ff306fe
-+ .long 0xb26416ff, 0x3ff33c08
-+ .long 0x373aa9cb, 0x3ff371a7
-+ .long 0x34e59ff7, 0x3ff3a7db
-+ .long 0x4c123422, 0x3ff3dea6
-+ .long 0x21f72e2a, 0x3ff4160a
-+ .long 0x6061892d, 0x3ff44e08
-+ .long 0xb5c13cd0, 0x3ff486a2
-+ .long 0xd5362a27, 0x3ff4bfda
-+ .long 0x769d2ca7, 0x3ff4f9b2
-+ .long 0x569d4f82, 0x3ff5342b
-+ .long 0x36b527da, 0x3ff56f47
-+ .long 0xdd485429, 0x3ff5ab07
-+ .long 0x15ad2148, 0x3ff5e76f
-+ .long 0xb03a5585, 0x3ff6247e
-+ .long 0x82552225, 0x3ff66238
-+ .long 0x667f3bcd, 0x3ff6a09e
-+ .long 0x3c651a2f, 0x3ff6dfb2
-+ .long 0xe8ec5f74, 0x3ff71f75
-+ .long 0x564267c9, 0x3ff75feb
-+ .long 0x73eb0187, 0x3ff7a114
-+ .long 0x36cf4e62, 0x3ff7e2f3
-+ .long 0x994cce13, 0x3ff82589
-+ .long 0x9b4492ed, 0x3ff868d9
-+ .long 0x422aa0db, 0x3ff8ace5
-+ .long 0x99157736, 0x3ff8f1ae
-+ .long 0xb0cdc5e5, 0x3ff93737
-+ .long 0x9fde4e50, 0x3ff97d82
-+ .long 0x82a3f090, 0x3ff9c491
-+ .long 0x7b5de565, 0x3ffa0c66
-+ .long 0xb23e255d, 0x3ffa5503
-+ .long 0x5579fdbf, 0x3ffa9e6b
-+ .long 0x995ad3ad, 0x3ffae89f
-+ .long 0xb84f15fb, 0x3ffb33a2
-+ .long 0xf2fb5e47, 0x3ffb7f76
-+ .long 0x904bc1d2, 0x3ffbcc1e
-+ .long 0xdd85529c, 0x3ffc199b
-+ .long 0x2e57d14b, 0x3ffc67f1
-+ .long 0xdcef9069, 0x3ffcb720
-+ .long 0x4a07897c, 0x3ffd072d
-+ .long 0xdcfba487, 0x3ffd5818
-+ .long 0x03db3285, 0x3ffda9e6
-+ .long 0x337b9b5f, 0x3ffdfc97
-+ .long 0xe78b3ff6, 0x3ffe502e
-+ .long 0xa2a490da, 0x3ffea4af
-+ .long 0xee615a27, 0x3ffefa1b
-+ .long 0x5b6e4540, 0x3fff5076
-+ .long 0x819e90d8, 0x3fffa7c1
-+ .type L(DP_T), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_T))
-+
-+ .section .rodata.cst8,"aM",@progbits,8
-+ .p2align 3
-+L(DP_KLN2): /* double precision K/log(2) */
-+ .long 0x652b82fe, 0x40571547
-+ .type L(DP_KLN2), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_KLN2))
-+
-+ .p2align 3
-+L(DP_NLN2K): /* double precision -log(2)/K */
-+ .long 0xfefa39ef, 0xbf862e42
-+ .type L(DP_NLN2K), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_NLN2K))
-+
-+ .p2align 3
-+L(DP_RS): /* double precision 2^23+2^22 */
-+ .long 0x00000000, 0x41680000
-+ .type L(DP_RS), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_RS))
-+ .p2align 3
-+L(DP_RD): /* double precision 2^52+2^51 */
-+ .long 0x00000000, 0x43380000
-+ .type L(DP_RD), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_RD))
-+
-+ .p2align 3
-+L(DP_P3): /* double precision polynomial coefficient P3 */
-+ .long 0xeb78fa85, 0x3fa56420
-+ .type L(DP_P3), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_P3))
-+
-+ .p2align 3
-+L(DP_P1): /* double precision polynomial coefficient P1 */
-+ .long 0x008d6118, 0x3fe00000
-+ .type L(DP_P1), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_P1))
-+
-+ .p2align 3
-+L(DP_P2): /* double precision polynomial coefficient P2 */
-+ .long 0xda752d4f, 0x3fc55550
-+ .type L(DP_P2), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_P2))
-+
-+ .p2align 3
-+L(DP_P0): /* double precision polynomial coefficient P0 */
-+ .long 0xffffe7c6, 0x3fefffff
-+ .type L(DP_P0), @object
-+ ASM_SIZE_DIRECTIVE(L(DP_P0))
-+
-+ .p2align 3
-+L(SP_RANGE): /* single precision overflow/underflow bounds */
-+ .long 0x42b17217 /* if x>this bound, then result overflows */
-+ .long 0x42cff1b4 /* if x<this bound, then result underflows */
-+ .type L(SP_RANGE), @object
-+ ASM_SIZE_DIRECTIVE(L(SP_RANGE))
-+
-+ .p2align 3
-+L(SP_INF_0):
-+ .long 0x7f800000 /* single precision Inf */
-+ .long 0 /* single precision zero */
-+ .type L(SP_INF_0), @object
-+ ASM_SIZE_DIRECTIVE(L(SP_INF_0))
-+
-+ .section .rodata.cst4,"aM",@progbits,4
-+ .p2align 2
-+L(SP_RS): /* single precision 2^23+2^22 */
-+ .long 0x4b400000
-+ .type L(SP_RS), @object
-+ ASM_SIZE_DIRECTIVE(L(SP_RS))
-+
-+ .p2align 2
-+L(SP_SMALL): /* single precision small value 2^(-100) */
-+ .long 0x0d800000
-+ .type L(SP_SMALL), @object
-+ ASM_SIZE_DIRECTIVE(L(SP_SMALL))
-+
-+ .p2align 2
-+L(SP_LARGE): /* single precision large value 2^100 */
-+ .long 0x71800000
-+ .type L(SP_LARGE), @object
-+ ASM_SIZE_DIRECTIVE(L(SP_LARGE))
-+
-+ .p2align 2
-+L(SP_ONE): /* single precision 1.0 */
-+ .long 0x3f800000
-+ .type L(SP_ONE), @object
-+ ASM_SIZE_DIRECTIVE(L(SP_ONE))
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_expf-sse2.S b/sysdeps/x86_64/fpu/multiarch/e_expf-sse2.S
-new file mode 100644
-index 0000000000..8af10e3eb4
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/e_expf-sse2.S
-@@ -0,0 +1,24 @@
-+/* SSE2 version of IEEE 754 expf.
-+ Copyright (C) 2017 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/>. */
-+
-+#define __ieee754_expf __ieee754_expf_sse2
-+
-+#undef strong_alias
-+#define strong_alias(ignored1, ignored2)
-+
-+#include <sysdeps/x86_64/fpu/e_expf.S>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_expf.c b/sysdeps/x86_64/fpu/multiarch/e_expf.c
-new file mode 100644
-index 0000000000..864d5f9b21
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/e_expf.c
-@@ -0,0 +1,26 @@
-+/* Multiple versions of IEEE 754 expf.
-+ Copyright (C) 2017 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/>. */
-+
-+extern double __redirect_ieee754_expf (double);
-+
-+#define SYMBOL_NAME ieee754_expf
-+#include "ifunc-fma.h"
-+
-+libc_ifunc_redirected (__redirect_ieee754_expf, __ieee754_expf,
-+ IFUNC_SELECTOR ());
-+strong_alias (__ieee754_expf, __expf_finite)
-diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma.h
-new file mode 100644
-index 0000000000..383c41ffb1
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma.h
-@@ -0,0 +1,34 @@
-+/* Common definition for ifunc selections optimized with AVX2/FMA.
-+ Copyright (C) 2017 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 <init-arch.h>
-+
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (fma) attribute_hidden;
-+
-+static inline void *
-+IFUNC_SELECTOR (void)
-+{
-+ const struct cpu_features* cpu_features = __get_cpu_features ();
-+
-+ if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
-+ && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
-+ return OPTIMIZE (fma);
-+
-+ return OPTIMIZE (sse2);
-+}
---
-2.13.4
-
diff --git a/fma.patch b/fma.patch
deleted file mode 100644
index af60643..0000000
--- a/fma.patch
+++ /dev/null
@@ -1,964 +0,0 @@
-From 7e7b5de8ffc9ac8fda45b988cde5650004bdbca7 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 7 Aug 2017 08:19:59 -0700
-Subject: [PATCH] x86-64: Add FMA multiarch functions to libm
-
-This patch adds multiarch functions optimized with -mfma -mavx2 to libm.
-e_pow-fma.c is compiled with $(config-cflags-nofma) due to PR 19003.
-
- * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
- Add e_exp-fma, e_log-fma, e_pow-fma, s_atan-fma, e_asin-fma,
- e_atan2-fma, s_sin-fma, s_tan-fma, mplog-fma, mpa-fma,
- slowexp-fma, slowpow-fma, sincos32-fma, doasin-fma, dosincos-fma,
- halfulp-fma, mpexp-fma, mpatan2-fma, mpatan-fma, mpsqrt-fma,
- and mptan-fma.
- (CFLAGS-doasin-fma.c): New.
- (CFLAGS-dosincos-fma.c): Likewise.
- (CFLAGS-e_asin-fma.c): Likewise.
- (CFLAGS-e_atan2-fma.c): Likewise.
- (CFLAGS-e_exp-fma.c): Likewise.
- (CFLAGS-e_log-fma.c): Likewise.
- (CFLAGS-e_pow-fma.c): Likewise.
- (CFLAGS-halfulp-fma.c): Likewise.
- (CFLAGS-mpa-fma.c): Likewise.
- (CFLAGS-mpatan-fma.c): Likewise.
- (CFLAGS-mpatan2-fma.c): Likewise.
- (CFLAGS-mpexp-fma.c): Likewise.
- (CFLAGS-mplog-fma.c): Likewise.
- (CFLAGS-mpsqrt-fma.c): Likewise.
- (CFLAGS-mptan-fma.c): Likewise.
- (CFLAGS-s_atan-fma.c): Likewise.
- (CFLAGS-sincos32-fma.c): Likewise.
- (CFLAGS-slowexp-fma.c): Likewise.
- (CFLAGS-slowpow-fma.c): Likewise.
- (CFLAGS-s_sin-fma.c): Likewise.
- (CFLAGS-s_tan-fma.c): Likewise.
- * sysdeps/x86_64/fpu/multiarch/doasin-fma.c: New file.
- * sysdeps/x86_64/fpu/multiarch/dosincos-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_asin-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_exp-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_log-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_pow-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/halfulp-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h: Likewise.
- * sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h: Likewise.
- * sysdeps/x86_64/fpu/multiarch/mpa-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/mpatan-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/mpexp-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/mplog-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/mptan-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/s_atan-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/s_sin-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/s_tan-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/sincos32-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/slowexp-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/slowpow-fma.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_asin.c: Rewrite.
- * sysdeps/x86_64/fpu/multiarch/e_atan2.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_exp.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_log.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/e_pow.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/s_atan.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/s_sin.c: Likewise.
- * sysdeps/x86_64/fpu/multiarch/s_tan.c: Likewise.
-
-(cherry picked from commit 57a72fa3502673754d14707da02c7c44e83b8d20)
----
- sysdeps/x86_64/fpu/multiarch/Makefile | 29 ++++++++++++++
- sysdeps/x86_64/fpu/multiarch/doasin-fma.c | 4 ++
- sysdeps/x86_64/fpu/multiarch/dosincos-fma.c | 6 +++
- sysdeps/x86_64/fpu/multiarch/e_asin-fma.c | 11 ++++++
- sysdeps/x86_64/fpu/multiarch/e_asin.c | 54 +++++++++++++++++----------
- sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c | 10 +++++
- sysdeps/x86_64/fpu/multiarch/e_atan2.c | 35 +++++++++++------
- sysdeps/x86_64/fpu/multiarch/e_exp-fma.c | 6 +++
- sysdeps/x86_64/fpu/multiarch/e_exp.c | 35 +++++++++++------
- sysdeps/x86_64/fpu/multiarch/e_log-fma.c | 8 ++++
- sysdeps/x86_64/fpu/multiarch/e_log.c | 35 +++++++++++------
- sysdeps/x86_64/fpu/multiarch/e_pow-fma.c | 6 +++
- sysdeps/x86_64/fpu/multiarch/e_pow.c | 34 +++++++++++------
- sysdeps/x86_64/fpu/multiarch/halfulp-fma.c | 4 ++
- sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h | 43 +++++++++++++++++++++
- sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h | 39 +++++++++++++++++++
- sysdeps/x86_64/fpu/multiarch/mpa-fma.c | 14 +++++++
- sysdeps/x86_64/fpu/multiarch/mpatan-fma.c | 10 +++++
- sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c | 9 +++++
- sysdeps/x86_64/fpu/multiarch/mpexp-fma.c | 9 +++++
- sysdeps/x86_64/fpu/multiarch/mplog-fma.c | 8 ++++
- sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c | 8 ++++
- sysdeps/x86_64/fpu/multiarch/mptan-fma.c | 7 ++++
- sysdeps/x86_64/fpu/multiarch/s_atan-fma.c | 9 +++++
- sysdeps/x86_64/fpu/multiarch/s_atan.c | 30 ++++++++++-----
- sysdeps/x86_64/fpu/multiarch/s_sin-fma.c | 11 ++++++
- sysdeps/x86_64/fpu/multiarch/s_sin.c | 51 +++++++++++++++----------
- sysdeps/x86_64/fpu/multiarch/s_tan-fma.c | 8 ++++
- sysdeps/x86_64/fpu/multiarch/s_tan.c | 30 ++++++++++-----
- sysdeps/x86_64/fpu/multiarch/sincos32-fma.c | 15 ++++++++
- sysdeps/x86_64/fpu/multiarch/slowexp-fma.c | 9 +++++
- sysdeps/x86_64/fpu/multiarch/slowpow-fma.c | 11 ++++++
- 32 files changed, 493 insertions(+), 105 deletions(-)
- create mode 100644 sysdeps/x86_64/fpu/multiarch/doasin-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/dosincos-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/e_asin-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/e_exp-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/e_log-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/e_pow-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/halfulp-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h
- create mode 100644 sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h
- create mode 100644 sysdeps/x86_64/fpu/multiarch/mpa-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/mpatan-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/mpexp-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/mplog-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/mptan-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/s_atan-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/s_sin-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/s_tan-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/sincos32-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/slowexp-fma.c
- create mode 100644 sysdeps/x86_64/fpu/multiarch/slowpow-fma.c
-
-diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
-index 34542155aa..e9e4f7c745 100644
---- a/sysdeps/x86_64/fpu/multiarch/Makefile
-+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
-@@ -2,6 +2,35 @@ ifeq ($(subdir),math)
- libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
- s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c
-
-+libm-sysdep_routines += e_exp-fma e_log-fma e_pow-fma s_atan-fma \
-+ e_asin-fma e_atan2-fma s_sin-fma s_tan-fma \
-+ mplog-fma mpa-fma slowexp-fma slowpow-fma \
-+ sincos32-fma doasin-fma dosincos-fma \
-+ halfulp-fma mpexp-fma \
-+ mpatan2-fma mpatan-fma mpsqrt-fma mptan-fma
-+
-+CFLAGS-doasin-fma.c = -mfma -mavx2
-+CFLAGS-dosincos-fma.c = -mfma -mavx2
-+CFLAGS-e_asin-fma.c = -mfma -mavx2
-+CFLAGS-e_atan2-fma.c = -mfma -mavx2
-+CFLAGS-e_exp-fma.c = -mfma -mavx2
-+CFLAGS-e_log-fma.c = -mfma -mavx2
-+CFLAGS-e_pow-fma.c = -mfma -mavx2
-+CFLAGS-halfulp-fma.c = -mfma -mavx2
-+CFLAGS-mpa-fma.c = -mfma -mavx2
-+CFLAGS-mpatan-fma.c = -mfma -mavx2
-+CFLAGS-mpatan2-fma.c = -mfma -mavx2
-+CFLAGS-mpexp-fma.c = -mfma -mavx2
-+CFLAGS-mplog-fma.c = -mfma -mavx2
-+CFLAGS-mpsqrt-fma.c = -mfma -mavx2
-+CFLAGS-mptan-fma.c = -mfma -mavx2
-+CFLAGS-s_atan-fma.c = -mfma -mavx2
-+CFLAGS-sincos32-fma.c = -mfma -mavx2
-+CFLAGS-slowexp-fma.c = -mfma -mavx2
-+CFLAGS-slowpow-fma.c = -mfma -mavx2
-+CFLAGS-s_sin-fma.c = -mfma -mavx2
-+CFLAGS-s_tan-fma.c = -mfma -mavx2
-+
- libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
- e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
- mplog-fma4 mpa-fma4 slowexp-fma4 slowpow-fma4 \
-diff --git a/sysdeps/x86_64/fpu/multiarch/doasin-fma.c b/sysdeps/x86_64/fpu/multiarch/doasin-fma.c
-new file mode 100644
-index 0000000000..7a09865fca
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/doasin-fma.c
-@@ -0,0 +1,4 @@
-+#define __doasin __doasin_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/doasin.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/dosincos-fma.c b/sysdeps/x86_64/fpu/multiarch/dosincos-fma.c
-new file mode 100644
-index 0000000000..5744586bdb
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/dosincos-fma.c
-@@ -0,0 +1,6 @@
-+#define __docos __docos_fma
-+#define __dubcos __dubcos_fma
-+#define __dubsin __dubsin_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/dosincos.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_asin-fma.c b/sysdeps/x86_64/fpu/multiarch/e_asin-fma.c
-new file mode 100644
-index 0000000000..50e9c64247
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/e_asin-fma.c
-@@ -0,0 +1,11 @@
-+#define __ieee754_acos __ieee754_acos_fma
-+#define __ieee754_asin __ieee754_asin_fma
-+#define __cos32 __cos32_fma
-+#define __doasin __doasin_fma
-+#define __docos __docos_fma
-+#define __dubcos __dubcos_fma
-+#define __dubsin __dubsin_fma
-+#define __sin32 __sin32_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/e_asin.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_asin.c b/sysdeps/x86_64/fpu/multiarch/e_asin.c
-index 111a5b99bd..37a44b2388 100644
---- a/sysdeps/x86_64/fpu/multiarch/e_asin.c
-+++ b/sysdeps/x86_64/fpu/multiarch/e_asin.c
-@@ -1,26 +1,40 @@
--#include <init-arch.h>
--#include <math.h>
--#include <math_private.h>
--
--extern double __ieee754_acos_sse2 (double);
--extern double __ieee754_asin_sse2 (double);
--extern double __ieee754_acos_fma4 (double);
--extern double __ieee754_asin_fma4 (double);
--
--libm_ifunc (__ieee754_acos,
-- HAS_ARCH_FEATURE (FMA4_Usable)
-- ? __ieee754_acos_fma4
-- : __ieee754_acos_sse2);
--strong_alias (__ieee754_acos, __acos_finite)
-+/* Multiple versions of IEEE 754 asin and acos.
-+ Copyright (C) 2017 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/>. */
-+
-+extern double __redirect_ieee754_asin (double);
-+extern double __redirect_ieee754_acos (double);
-+
-+#define SYMBOL_NAME ieee754_asin
-+#include "ifunc-fma4.h"
-
--libm_ifunc (__ieee754_asin,
-- HAS_ARCH_FEATURE (FMA4_Usable)
-- ? __ieee754_asin_fma4
-- : __ieee754_asin_sse2);
-+libc_ifunc_redirected (__redirect_ieee754_asin, __ieee754_asin,
-+ IFUNC_SELECTOR ());
- strong_alias (__ieee754_asin, __asin_finite)
-
--#define __ieee754_acos __ieee754_acos_sse2
--#define __ieee754_asin __ieee754_asin_sse2
-+#undef SYMBOL_NAME
-+#define SYMBOL_NAME ieee754_acos
-+#include "ifunc-fma4.h"
-+
-+libc_ifunc_redirected (__redirect_ieee754_acos, __ieee754_acos,
-+ IFUNC_SELECTOR ());
-+strong_alias (__ieee754_acos, __acos_finite)
-
-
-+#define __ieee754_acos __ieee754_acos_sse2
-+#define __ieee754_asin __ieee754_asin_sse2
- #include <sysdeps/ieee754/dbl-64/e_asin.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c b/sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c
-new file mode 100644
-index 0000000000..caba686496
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c
-@@ -0,0 +1,10 @@
-+#define __ieee754_atan2 __ieee754_atan2_fma
-+#define __add __add_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __dvd __dvd_fma
-+#define __mpatan2 __mpatan2_fma
-+#define __mul __mul_fma
-+#define __sub __sub_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/e_atan2.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
-index 9ca3c02a44..a2c8cfc159 100644
---- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
-+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
-@@ -1,18 +1,29 @@
--#include <init-arch.h>
--#include <math.h>
--#include <math_private.h>
-+/* Multiple versions of IEEE 754 atan.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-
--extern double __ieee754_atan2_sse2 (double, double);
--extern double __ieee754_atan2_avx (double, double);
--extern double __ieee754_atan2_fma4 (double, double);
-+ 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.
-
--libm_ifunc (__ieee754_atan2,
-- HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_atan2_fma4
-- : (HAS_ARCH_FEATURE (AVX_Usable)
-- ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
--strong_alias (__ieee754_atan2, __atan2_finite)
-+ 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.
-
--#define __ieee754_atan2 __ieee754_atan2_sse2
-+ 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/>. */
-+
-+extern double __redirect_ieee754_atan2 (double, double);
-
-+#define SYMBOL_NAME ieee754_atan2
-+#include "ifunc-avx-fma4.h"
-
-+libc_ifunc_redirected (__redirect_ieee754_atan2,
-+ __ieee754_atan2, IFUNC_SELECTOR ());
-+strong_alias (__ieee754_atan2, __atan2_finite)
-+
-+#define __ieee754_atan2 __ieee754_atan2_sse2
- #include <sysdeps/ieee754/dbl-64/e_atan2.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c b/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c
-new file mode 100644
-index 0000000000..6e0fdb7941
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c
-@@ -0,0 +1,6 @@
-+#define __ieee754_exp __ieee754_exp_fma
-+#define __exp1 __exp1_fma
-+#define __slowexp __slowexp_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/e_exp.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp.c b/sysdeps/x86_64/fpu/multiarch/e_exp.c
-index b7d7b5ff27..81211f4ace 100644
---- a/sysdeps/x86_64/fpu/multiarch/e_exp.c
-+++ b/sysdeps/x86_64/fpu/multiarch/e_exp.c
-@@ -1,18 +1,29 @@
--#include <init-arch.h>
--#include <math.h>
--#include <math_private.h>
-+/* Multiple versions of IEEE 754 exp.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-
--extern double __ieee754_exp_sse2 (double);
--extern double __ieee754_exp_avx (double);
--extern double __ieee754_exp_fma4 (double);
-+ 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.
-
--libm_ifunc (__ieee754_exp,
-- HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_exp_fma4
-- : (HAS_ARCH_FEATURE (AVX_Usable)
-- ? __ieee754_exp_avx : __ieee754_exp_sse2));
--strong_alias (__ieee754_exp, __exp_finite)
-+ 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.
-
--#define __ieee754_exp __ieee754_exp_sse2
-+ 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/>. */
-+
-+extern double __redirect_ieee754_exp (double);
-
-+#define SYMBOL_NAME ieee754_exp
-+#include "ifunc-avx-fma4.h"
-
-+libc_ifunc_redirected (__redirect_ieee754_exp, __ieee754_exp,
-+ IFUNC_SELECTOR ());
-+strong_alias (__ieee754_exp, __exp_finite)
-+
-+#define __ieee754_exp __ieee754_exp_sse2
- #include <sysdeps/ieee754/dbl-64/e_exp.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_log-fma.c b/sysdeps/x86_64/fpu/multiarch/e_log-fma.c
-new file mode 100644
-index 0000000000..a7123b1a06
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/e_log-fma.c
-@@ -0,0 +1,8 @@
-+#define __ieee754_log __ieee754_log_fma
-+#define __mplog __mplog_fma
-+#define __add __add_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __sub __sub_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/e_log.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_log.c b/sysdeps/x86_64/fpu/multiarch/e_log.c
-index cf9533d6c0..de1fbf1696 100644
---- a/sysdeps/x86_64/fpu/multiarch/e_log.c
-+++ b/sysdeps/x86_64/fpu/multiarch/e_log.c
-@@ -1,18 +1,29 @@
--#include <init-arch.h>
--#include <math.h>
--#include <math_private.h>
-+/* Multiple versions of IEEE 754 log.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-
--extern double __ieee754_log_sse2 (double);
--extern double __ieee754_log_avx (double);
--extern double __ieee754_log_fma4 (double);
-+ 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.
-
--libm_ifunc (__ieee754_log,
-- HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_log_fma4
-- : (HAS_ARCH_FEATURE (AVX_Usable)
-- ? __ieee754_log_avx : __ieee754_log_sse2));
--strong_alias (__ieee754_log, __log_finite)
-+ 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.
-
--#define __ieee754_log __ieee754_log_sse2
-+ 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/>. */
-+
-+extern double __redirect_ieee754_log (double);
-
-+#define SYMBOL_NAME ieee754_log
-+#include "ifunc-avx-fma4.h"
-
-+libc_ifunc_redirected (__redirect_ieee754_log, __ieee754_log,
-+ IFUNC_SELECTOR ());
-+strong_alias (__ieee754_log, __log_finite)
-+
-+#define __ieee754_log __ieee754_log_sse2
- #include <sysdeps/ieee754/dbl-64/e_log.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_pow-fma.c b/sysdeps/x86_64/fpu/multiarch/e_pow-fma.c
-new file mode 100644
-index 0000000000..6fd408342e
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/e_pow-fma.c
-@@ -0,0 +1,6 @@
-+#define __ieee754_pow __ieee754_pow_fma
-+#define __exp1 __exp1_fma
-+#define __slowpow __slowpow_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/e_pow.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/e_pow.c b/sysdeps/x86_64/fpu/multiarch/e_pow.c
-index a5c5d89c3e..07a7929d32 100644
---- a/sysdeps/x86_64/fpu/multiarch/e_pow.c
-+++ b/sysdeps/x86_64/fpu/multiarch/e_pow.c
-@@ -1,17 +1,29 @@
--#include <init-arch.h>
--#include <math.h>
--#include <math_private.h>
-+/* Multiple versions of IEEE 754 pow.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-
--extern double __ieee754_pow_sse2 (double, double);
--extern double __ieee754_pow_fma4 (double, double);
-+ 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.
-
--libm_ifunc (__ieee754_pow,
-- HAS_ARCH_FEATURE (FMA4_Usable)
-- ? __ieee754_pow_fma4
-- : __ieee754_pow_sse2);
--strong_alias (__ieee754_pow, __pow_finite)
-+ 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.
-
--#define __ieee754_pow __ieee754_pow_sse2
-+ 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/>. */
-+
-+extern double __redirect_ieee754_pow (double, double);
-
-+#define SYMBOL_NAME ieee754_pow
-+#include "ifunc-fma4.h"
-
-+libc_ifunc_redirected (__redirect_ieee754_pow,
-+ __ieee754_pow, IFUNC_SELECTOR ());
-+strong_alias (__ieee754_pow, __pow_finite)
-+
-+#define __ieee754_pow __ieee754_pow_sse2
- #include <sysdeps/ieee754/dbl-64/e_pow.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/halfulp-fma.c b/sysdeps/x86_64/fpu/multiarch/halfulp-fma.c
-new file mode 100644
-index 0000000000..6ca70462ca
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/halfulp-fma.c
-@@ -0,0 +1,4 @@
-+#define __halfulp __halfulp_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/halfulp.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h
-new file mode 100644
-index 0000000000..2277c0a725
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h
-@@ -0,0 +1,43 @@
-+/* Common definition for ifunc selections optimized with AVX, AVX2/FMA
-+ and FMA4.
-+ Copyright (C) 2017 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 <init-arch.h>
-+
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (avx) attribute_hidden;
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (fma) attribute_hidden;
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (fma4) attribute_hidden;
-+
-+static inline void *
-+IFUNC_SELECTOR (void)
-+{
-+ const struct cpu_features* cpu_features = __get_cpu_features ();
-+
-+ if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
-+ && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
-+ return OPTIMIZE (fma);
-+
-+ if (CPU_FEATURES_ARCH_P (cpu_features, FMA4_Usable))
-+ return OPTIMIZE (fma4);
-+
-+ if (CPU_FEATURES_ARCH_P (cpu_features, AVX_Usable))
-+ return OPTIMIZE (avx);
-+
-+ return OPTIMIZE (sse2);
-+}
-diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h
-new file mode 100644
-index 0000000000..5928984e54
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h
-@@ -0,0 +1,39 @@
-+/* Common definition for ifunc selections optimized with AVX2/FMA and
-+ FMA4.
-+ Copyright (C) 2017 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 <init-arch.h>
-+
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (fma) attribute_hidden;
-+extern __typeof (REDIRECT_NAME) OPTIMIZE (fma4) attribute_hidden;
-+
-+static inline void *
-+IFUNC_SELECTOR (void)
-+{
-+ const struct cpu_features* cpu_features = __get_cpu_features ();
-+
-+ if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
-+ && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
-+ return OPTIMIZE (fma);
-+
-+ if (CPU_FEATURES_ARCH_P (cpu_features, FMA4_Usable))
-+ return OPTIMIZE (fma4);
-+
-+ return OPTIMIZE (sse2);
-+}
-diff --git a/sysdeps/x86_64/fpu/multiarch/mpa-fma.c b/sysdeps/x86_64/fpu/multiarch/mpa-fma.c
-new file mode 100644
-index 0000000000..177cc2517f
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/mpa-fma.c
-@@ -0,0 +1,14 @@
-+#define __add __add_fma
-+#define __mul __mul_fma
-+#define __sqr __sqr_fma
-+#define __sub __sub_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __dvd __dvd_fma
-+
-+#define NO___CPY 1
-+#define NO___MP_DBL 1
-+#define NO___ACR 1
-+#define NO__CONST 1
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/mpa.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/mpatan-fma.c b/sysdeps/x86_64/fpu/multiarch/mpatan-fma.c
-new file mode 100644
-index 0000000000..d216f9142d
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/mpatan-fma.c
-@@ -0,0 +1,10 @@
-+#define __mpatan __mpatan_fma
-+#define __add __add_fma
-+#define __dvd __dvd_fma
-+#define __mpsqrt __mpsqrt_fma
-+#define __mul __mul_fma
-+#define __sub __sub_fma
-+#define AVOID_MPATAN_H 1
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/mpatan.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c b/sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c
-new file mode 100644
-index 0000000000..98df336f79
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c
-@@ -0,0 +1,9 @@
-+#define __mpatan2 __mpatan2_fma
-+#define __add __add_fma
-+#define __dvd __dvd_fma
-+#define __mpatan __mpatan_fma
-+#define __mpsqrt __mpsqrt_fma
-+#define __mul __mul_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/mpatan2.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/mpexp-fma.c b/sysdeps/x86_64/fpu/multiarch/mpexp-fma.c
-new file mode 100644
-index 0000000000..637631ba06
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/mpexp-fma.c
-@@ -0,0 +1,9 @@
-+#define __mpexp __mpexp_fma
-+#define __add __add_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __dvd __dvd_fma
-+#define __mul __mul_fma
-+#define AVOID_MPEXP_H 1
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/mpexp.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/mplog-fma.c b/sysdeps/x86_64/fpu/multiarch/mplog-fma.c
-new file mode 100644
-index 0000000000..645b6b7c57
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/mplog-fma.c
-@@ -0,0 +1,8 @@
-+#define __mplog __mplog_fma
-+#define __add __add_fma
-+#define __mpexp __mpexp_fma
-+#define __mul __mul_fma
-+#define __sub __sub_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/mplog.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c b/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c
-new file mode 100644
-index 0000000000..44d7a23ae3
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c
-@@ -0,0 +1,8 @@
-+#define __mpsqrt __mpsqrt_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __mul __mul_fma
-+#define __sub __sub_fma
-+#define AVOID_MPSQRT_H 1
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/mpsqrt.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/mptan-fma.c b/sysdeps/x86_64/fpu/multiarch/mptan-fma.c
-new file mode 100644
-index 0000000000..d1a691413c
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/mptan-fma.c
-@@ -0,0 +1,7 @@
-+#define __mptan __mptan_fma
-+#define __c32 __c32_fma
-+#define __dvd __dvd_fma
-+#define __mpranred __mpranred_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/mptan.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c b/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c
-new file mode 100644
-index 0000000000..bedb3f2053
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c
-@@ -0,0 +1,9 @@
-+#define atan __atan_fma
-+#define __add __add_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __mpatan __mpatan_fma
-+#define __mul __mul_fma
-+#define __sub __sub_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/s_atan.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
-index 742e95cb96..f81919cbbe 100644
---- a/sysdeps/x86_64/fpu/multiarch/s_atan.c
-+++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
-@@ -1,15 +1,27 @@
--#include <init-arch.h>
--#include <math.h>
-+/* Multiple versions of atan.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-
--extern double __atan_sse2 (double);
--extern double __atan_avx (double);
--extern double __atan_fma4 (double);
-+ 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.
-
--libm_ifunc (atan, (HAS_ARCH_FEATURE (FMA4_Usable) ? __atan_fma4 :
-- HAS_ARCH_FEATURE (AVX_Usable)
-- ? __atan_avx : __atan_sse2));
-+ 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.
-
--#define atan __atan_sse2
-+ 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/>. */
-+
-+extern double __redirect_atan (double);
-
-+#define SYMBOL_NAME atan
-+#include "ifunc-avx-fma4.h"
-
-+libc_ifunc_redirected (__redirect_atan, atan, IFUNC_SELECTOR ());
-+
-+#define atan __atan_sse2
- #include <sysdeps/ieee754/dbl-64/s_atan.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c b/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c
-new file mode 100644
-index 0000000000..15f3c394d5
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c
-@@ -0,0 +1,11 @@
-+#define __cos __cos_fma
-+#define __sin __sin_fma
-+#define __docos __docos_fma
-+#define __dubsin __dubsin_fma
-+#define __mpcos __mpcos_fma
-+#define __mpcos1 __mpcos1_fma
-+#define __mpsin __mpsin_fma
-+#define __mpsin1 __mpsin1_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/s_sin.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
-index 8ffd3e7125..eafc06374f 100644
---- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
-+++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c
-@@ -1,26 +1,37 @@
--#include <init-arch.h>
--#include <math.h>
--#undef NAN
--
--extern double __cos_sse2 (double);
--extern double __sin_sse2 (double);
--extern double __cos_avx (double);
--extern double __sin_avx (double);
--extern double __cos_fma4 (double);
--extern double __sin_fma4 (double);
--
--libm_ifunc (__cos, (HAS_ARCH_FEATURE (FMA4_Usable) ? __cos_fma4 :
-- HAS_ARCH_FEATURE (AVX_Usable)
-- ? __cos_avx : __cos_sse2));
--weak_alias (__cos, cos)
-+/* Multiple versions of sin and cos.
-+ Copyright (C) 2017 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/>. */
-+
-+extern double __redirect_sin (double);
-+extern double __redirect_cos (double);
-+
-+#define SYMBOL_NAME sin
-+#include "ifunc-avx-fma4.h"
-
--libm_ifunc (__sin, (HAS_ARCH_FEATURE (FMA4_Usable) ? __sin_fma4 :
-- HAS_ARCH_FEATURE (AVX_Usable)
-- ? __sin_avx : __sin_sse2));
-+libc_ifunc_redirected (__redirect_sin, __sin, IFUNC_SELECTOR ());
- weak_alias (__sin, sin)
-
--#define __cos __cos_sse2
--#define __sin __sin_sse2
-+#undef SYMBOL_NAME
-+#define SYMBOL_NAME cos
-+#include "ifunc-avx-fma4.h"
-
-+libc_ifunc_redirected (__redirect_cos, __cos, IFUNC_SELECTOR ());
-+weak_alias (__cos, cos)
-
-+#define __cos __cos_sse2
-+#define __sin __sin_sse2
- #include <sysdeps/ieee754/dbl-64/s_sin.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan-fma.c b/sysdeps/x86_64/fpu/multiarch/s_tan-fma.c
-new file mode 100644
-index 0000000000..c85f8bceed
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/s_tan-fma.c
-@@ -0,0 +1,8 @@
-+#define tan __tan_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __mpranred __mpranred_fma
-+#define __mptan __mptan_fma
-+#define __sub __sub_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/s_tan.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
-index 25f3bca07e..96a73811f3 100644
---- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
-+++ b/sysdeps/x86_64/fpu/multiarch/s_tan.c
-@@ -1,15 +1,27 @@
--#include <init-arch.h>
--#include <math.h>
-+/* Multiple versions of tan.
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-
--extern double __tan_sse2 (double);
--extern double __tan_avx (double);
--extern double __tan_fma4 (double);
-+ 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.
-
--libm_ifunc (tan, (HAS_ARCH_FEATURE (FMA4_Usable) ? __tan_fma4 :
-- HAS_ARCH_FEATURE (AVX_Usable)
-- ? __tan_avx : __tan_sse2));
-+ 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.
-
--#define tan __tan_sse2
-+ 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/>. */
-+
-+extern double __redirect_tan (double);
-
-+#define SYMBOL_NAME tan
-+#include "ifunc-avx-fma4.h"
-
-+libc_ifunc_redirected (__redirect_tan, tan, IFUNC_SELECTOR ());
-+
-+#define tan __tan_sse2
- #include <sysdeps/ieee754/dbl-64/s_tan.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/sincos32-fma.c b/sysdeps/x86_64/fpu/multiarch/sincos32-fma.c
-new file mode 100644
-index 0000000000..dcd44bc5e8
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/sincos32-fma.c
-@@ -0,0 +1,15 @@
-+#define __cos32 __cos32_fma
-+#define __sin32 __sin32_fma
-+#define __c32 __c32_fma
-+#define __mpsin __mpsin_fma
-+#define __mpsin1 __mpsin1_fma
-+#define __mpcos __mpcos_fma
-+#define __mpcos1 __mpcos1_fma
-+#define __mpranred __mpranred_fma
-+#define __add __add_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __mul __mul_fma
-+#define __sub __sub_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/sincos32.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c b/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c
-new file mode 100644
-index 0000000000..6fffca1a93
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c
-@@ -0,0 +1,9 @@
-+#define __slowexp __slowexp_fma
-+#define __add __add_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __mpexp __mpexp_fma
-+#define __mul __mul_fma
-+#define __sub __sub_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/slowexp.c>
-diff --git a/sysdeps/x86_64/fpu/multiarch/slowpow-fma.c b/sysdeps/x86_64/fpu/multiarch/slowpow-fma.c
-new file mode 100644
-index 0000000000..160ed683ab
---- /dev/null
-+++ b/sysdeps/x86_64/fpu/multiarch/slowpow-fma.c
-@@ -0,0 +1,11 @@
-+#define __slowpow __slowpow_fma
-+#define __add __add_fma
-+#define __dbl_mp __dbl_mp_fma
-+#define __mpexp __mpexp_fma
-+#define __mplog __mplog_fma
-+#define __mul __mul_fma
-+#define __sub __sub_fma
-+#define __halfulp __halfulp_fma
-+#define SECTION __attribute__ ((section (".text.fma")))
-+
-+#include <sysdeps/ieee754/dbl-64/slowpow.c>
---
-2.13.4
-
diff --git a/glibc-2.25.90-Float128-clang.patch b/glibc-2.25.90-Float128-clang.patch
deleted file mode 100644
index 7e63b41..0000000
--- a/glibc-2.25.90-Float128-clang.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- glibc-2.25.90/sysdeps/ia64/bits/floatn.h.omv~ 2017-07-12 03:23:25.189332383 +0200
-+++ glibc-2.25.90/sysdeps/ia64/bits/floatn.h 2017-07-12 03:23:32.764147836 +0200
-@@ -67,7 +67,7 @@ typedef _Complex float __cfloat128 __att
- #if __HAVE_FLOAT128
-
- /* The type _Float128 exists only since GCC 7.0. */
--# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
- typedef __float128 _Float128;
- # endif
-
---- glibc-2.25.90/sysdeps/powerpc/bits/floatn.h.omv~ 2017-07-12 03:23:39.631980500 +0200
-+++ glibc-2.25.90/sysdeps/powerpc/bits/floatn.h 2017-07-12 03:23:45.159845805 +0200
-@@ -66,7 +66,7 @@ typedef _Complex float __cfloat128 __att
- #if __HAVE_FLOAT128
-
- /* The type _Float128 exist for powerpc only since GCC 7.0. */
--# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
- typedef __float128 _Float128;
- # endif
-
---- glibc-2.25.90/sysdeps/x86/bits/floatn.h.omv~ 2017-07-12 03:22:51.983141224 +0200
-+++ glibc-2.25.90/sysdeps/x86/bits/floatn.h 2017-07-12 03:23:20.802439256 +0200
-@@ -69,7 +69,7 @@ typedef _Complex float __cfloat128 __att
- #if __HAVE_FLOAT128
-
- /* The type _Float128 exists only since GCC 7.0. */
--# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
- typedef __float128 _Float128;
- # endif
-
---- glibc-2.25.90/math/complex.h.omv~ 2017-07-31 11:26:36.430324514 +0200
-+++ glibc-2.25.90/math/complex.h 2017-07-31 11:27:22.665978242 +0200
-@@ -59,7 +59,7 @@ __BEGIN_DECLS
- # define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y))
- #endif
-
--#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
-+#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) && !defined(__clang__)
- # define CMPLXF128(x, y) __builtin_complex ((_Float128) (x), (_Float128) (y))
- #endif
-
-@@ -93,7 +93,7 @@ __BEGIN_DECLS
- #undef __MATH_PRECNAME
-
- #if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \
-- && __GLIBC_USE (IEC_60559_TYPES_EXT)
-+ && __GLIBC_USE (IEC_60559_TYPES_EXT) && !defined(__clang__)
- # ifndef _Mfloat128_
- # define _Mfloat128_ _Float128
- # endif
diff --git a/glibc-2.26-float128-clang-6.0.patch b/glibc-2.26-float128-clang-6.0.patch
new file mode 100644
index 0000000..644ca57
--- /dev/null
+++ b/glibc-2.26-float128-clang-6.0.patch
@@ -0,0 +1,88 @@
+diff -Naur glibc-2.26/math/complex.h glibc-2.26.tpg/math/complex.h
+--- glibc-2.26/math/complex.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26.tpg/math/complex.h 2018-01-03 22:41:02.787271824 +0000
+@@ -59,7 +59,7 @@
+ # define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y))
+ #endif
+
+-#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
++#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) && !defined(__clang__)
+ # define CMPLXF128(x, y) __builtin_complex ((_Float128) (x), (_Float128) (y))
+ #endif
+
+@@ -93,7 +93,7 @@
+ #undef __MATH_PRECNAME
+
+ #if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \
+- && __GLIBC_USE (IEC_60559_TYPES_EXT)
++ && __GLIBC_USE (IEC_60559_TYPES_EXT) && !defined(__clang__)
+ # ifndef _Mfloat128_
+ # define _Mfloat128_ _Float128
+ # endif
+diff -Naur glibc-2.26/math/math.h glibc-2.26.tpg/math/math.h
+--- glibc-2.26/math/math.h 2018-01-03 22:31:04.069489000 +0000
++++ glibc-2.26.tpg/math/math.h 2018-01-03 22:39:33.073154522 +0000
+@@ -131,8 +131,8 @@
+ typedef _Float64x float_t;
+ typedef _Float64x double_t;
+ # elif __GLIBC_FLT_EVAL_METHOD == 128
+-typedef _Float128 float_t;
+-typedef _Float128 double_t;
++typedef __float128 float_t;
++typedef __float128 double_t;
+ # elif __GLIBC_FLT_EVAL_METHOD == 129
+ typedef _Float128x float_t;
+ typedef _Float128x double_t;
+@@ -327,12 +327,12 @@
+
+ #endif /* Use ISO C99. */
+
+-/* Include the file of declarations again, this time using `_Float128'
++/* Include the file of declarations again, this time using `__float128'
+ instead of `double' and appending f128 to each function name. */
+
+ #if __HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)
+ # ifndef _Mfloat128_
+-# define _Mfloat128_ _Float128
++# define _Mfloat128_ __float128
+ # endif
+ # define _Mdouble_ _Mfloat128_
+ # define __MATH_PRECNAME(name,r) name##f128##r
+@@ -380,7 +380,7 @@
+ float: FUNC ## f ARGS, \
+ default: FUNC ARGS, \
+ long double: FUNC ## l ARGS, \
+- _Float128: FUNC ## f128 ARGS)
++ __float128: FUNC ## f128 ARGS)
+ # else
+ # define __MATH_TG(TG_ARG, FUNC, ARGS) \
+ __builtin_choose_expr \
+@@ -431,8 +431,8 @@
+ the __SUPPORT_SNAN__ check may be skipped for those versions. */
+
+ /* Return number of classification appropriate for X. */
+-# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ \
+- && (!defined __OPTIMIZE_SIZE__ || defined __cplusplus)
++# if 1 || (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ \
++ && !defined __OPTIMIZE_SIZE__ || defined __cplusplus)
+ /* The check for __cplusplus allows the use of the builtin, even
+ when optimization for size is on. This is provided for
+ libstdc++, only to let its configure test work when it is built
+@@ -494,7 +494,7 @@
+ for __builtin_types_compatible_p (and when in C++ mode, this macro is
+ not used anyway, because libstdc++ headers undefine it). */
+ # define isinf(x) \
+- (__builtin_types_compatible_p (__typeof (x), _Float128) \
++ (__builtin_types_compatible_p (__typeof (x), __float128) \
+ ? __isinff128 (x) : __builtin_isinf_sign (x))
+ # elif __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
+ # define isinf(x) __builtin_isinf_sign (x)
+@@ -768,7 +768,7 @@
+ /* Include bits/math-finite.h for float128. */
+ # if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT)
+-# define _Mdouble_ _Float128
++# define _Mdouble_ __float128
+ # define __MATH_DECLARING_DOUBLE 0
+ # define __MATH_DECLARING_FLOATN 1
+ # define __REDIRFROM_X(function, reentrant) \
diff --git a/glibc.spec b/glibc.spec
index 19a2f6b..02b9d9e 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -94,7 +94,8 @@
%bcond_without nscd
%bcond_without i18ndata
%bcond_with timezone
-%bcond_without nsscrypt
+# (tpg) this is not needed
+%bcond_with nsscrypt
%bcond_without locales
@@ -138,7 +139,7 @@ Source0: http://ftp.gnu.org/gnu/glibc/%{oname}-%{ver}.tar.xz
Source1: http://ftp.gnu.org/gnu/glibc/%{oname}-%{ver}.tar.xz.sig
%endif
%endif
-Release: 12
+Release: 15
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Group: System/Libraries
Url: http://www.gnu.org/software/libc/
@@ -213,19 +214,19 @@ Patch67: http://pkgs.fedoraproject.org/cgit/rpms/glibc.git/plain/glibc-rh1315476
#-----------------------------------------------------------------------
# Clear Linux patches
-Patch80: fma.patch
-Patch81: fma-expf.patch
-Patch82: fma-expf-fix.patch
Patch83: alternate_trim.patch
Patch84: large-page-huge-page.patch
Patch85: ldconfig-format-new.patch
Patch86: madvise-bss.patch
Patch87: malloc-assert-3.patch
-Patch88: mathlto.patch
-Patch89: use_madv_free.patch
-Patch90: exp.patch
-Patch91: malloc-relaxed.patch
+#Patch89: use_madv_free.patch
Patch92: ldconfig-Os.patch
+Patch93: math-2.27.patch
+Patch94: exp2.patch
+#Patch95: mathlto.patch
+Patch96: malloc-relaxed.patch
+#Patch97: 0001-x86-64-Remove-sysdeps-x86_64-fpu-s_sinf.S.patch
+Patch98: 0002-x86-64-Add-sinf-with-FMA.patch
#
# Patches from upstream
@@ -241,7 +242,7 @@ Patch104: eglibc-mandriva-nsswitch.conf.patch
Patch105: eglibc-mandriva-xterm-xvt.patch
Patch106: eglibc-mandriva-nscd-enable.patch
Patch107: eglibc-mandriva-nscd-no-host-cache.patch
-Patch108: glibc-2.25.90-Float128-clang.patch
+Patch108: glibc-2.26-float128-clang-6.0.patch
Patch109: eglibc-mandriva-nscd-init-should-start.patch
Patch110: eglibc-mandriva-timezone.patch
Patch111: eglibc-mandriva-biarch-cpp-defines.patch
@@ -668,6 +669,7 @@ Group: System/Libraries
Conflicts: glibc < 6:2.14.90-13
Requires(post): %{name}
Requires(post): bash
+Requires(post): readline
%post -n %{multilibc}
%{_sbindir}/iconvconfig %{_libdir32}/gconv -o %{_libdir32}/gconv/gconv-modules.cache
@@ -765,7 +767,6 @@ The glibc-docs package contains docs for %{name}.
# Exists for some, but not all arches
%optional %{_libdir}/libmvec_nonshared.a
%{_libdir}/libg.a
-%{_libdir}/libieee.a
%{_libdir}/libmcheck.a
%optional %{_libdir}/libmvec.a
%{_libdir}/libpthread_nonshared.a
@@ -774,7 +775,6 @@ The glibc-docs package contains docs for %{name}.
%{_libdir32}/*.so
%{_libdir32}/libc_nonshared.a
%{_libdir32}/libg.a
-%{_libdir32}/libieee.a
%{_libdir32}/libmcheck.a
%{_libdir32}/libpthread_nonshared.a
%if %isarch mips mipsel
@@ -788,7 +788,6 @@ The glibc-docs package contains docs for %{name}.
%{_libdirn32}/*.so
%{_libdirn32}/libc_nonshared.a
%{_libdirn32}/libg.a
-%{_libdirn32}/libieee.a
%{_libdirn32}/libmcheck.a
%{_libdirn32}/libpthread_nonshared.a
%exclude %{_slibdir}/ld*-[.0-9]*.so
@@ -982,6 +981,10 @@ cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/
%apply_patches
+# (tpg) not needed with new FMA patches
+rm sysdeps/x86_64/fpu/s_sinf.S
+rm sysdeps/x86_64/fpu/s_cosf.S
+
%if %{with selinux}
# XXX kludge to build nscd with selinux support as it added -nostdinc
# so /usr/include/selinux is not found
diff --git a/math-2.27.patch b/math-2.27.patch
new file mode 100644
index 0000000..25071c4
--- /dev/null
+++ b/math-2.27.patch
@@ -0,0 +1,29404 @@
+diff -purN glibc-org/bits/floatn-common.h glibc-2.26/bits/floatn-common.h
+--- glibc-org/bits/floatn-common.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/bits/floatn-common.h 2017-10-22 23:45:40.925932774 +0000
+@@ -0,0 +1,292 @@
++/* Macros to control TS 18661-3 glibc features where the same
++ definitions are appropriate for all platforms.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _BITS_FLOATN_COMMON_H
++#define _BITS_FLOATN_COMMON_H
++
++#include <features.h>
++
++/* This header should be included at the bottom of each bits/floatn.h.
++ It defines the following macros for each _FloatN and _FloatNx type,
++ where the same definitions, or definitions based only on the macros
++ in bits/floatn.h, are appropriate for all glibc configurations. */
++
++/* Defined to 1 if the current compiler invocation provides a
++ floating-point type with the right format for this type, and this
++ glibc includes corresponding *fN or *fNx interfaces for it. */
++#define __HAVE_FLOAT16 0
++#define __HAVE_FLOAT32 0
++#define __HAVE_FLOAT64 0
++#define __HAVE_FLOAT32X 0
++#define __HAVE_FLOAT64X 0
++#define __HAVE_FLOAT128X 0
++
++/* Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the
++ type is the first with its format in the sequence of (the default
++ choices for) float, double, long double, _Float16, _Float32,
++ _Float64, _Float128, _Float32x, _Float64x, _Float128x for this
++ glibc; that is, if functions present once per floating-point format
++ rather than once per type are present for this type.
++
++ All configurations supported by glibc have _Float32 the same format
++ as float, _Float64 and _Float32x the same format as double, the
++ _Float64x the same format as either long double or _Float128. No
++ configurations support _Float128x or, as of GCC 7, have compiler
++ support for a type meeting the requirements for _Float128x. */
++#define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16
++#define __HAVE_DISTINCT_FLOAT32 0
++#define __HAVE_DISTINCT_FLOAT64 0
++#define __HAVE_DISTINCT_FLOAT32X 0
++#define __HAVE_DISTINCT_FLOAT64X 0
++#define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X
++
++/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
++ of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
++ the format of _Float128, which must be different from that of long
++ double. */
++#define __HAVE_FLOAT64X_LONG_DOUBLE 0
++
++/* Defined to 1 if any _FloatN or _FloatNx types that are not
++ ABI-distinct are however distinct types at the C language level (so
++ for the purposes of __builtin_types_compatible_p and _Generic). */
++#if __GNUC_PREREQ (7, 0) && !defined __cplusplus
++# define __HAVE_FLOATN_NOT_TYPEDEF 1
++#else
++# define __HAVE_FLOATN_NOT_TYPEDEF 0
++#endif
++
++/* Defined to concatenate the literal suffix to be used with _FloatN
++ or _FloatNx types, if __HAVE_<type> is 1. The corresponding
++ literal suffixes exist since GCC 7, for C only. */
++#if __HAVE_FLOAT16
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++/* No corresponding suffix available for this type. */
++# define __f16(x) ((_Float16) x##f)
++# else
++# define __f16(x) x##f16
++# endif
++#endif
++
++#if __HAVE_FLOAT32
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# define __f32(x) x##f
++# else
++# define __f32(x) x##f32
++# endif
++#endif
++
++#if __HAVE_FLOAT64
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# define __f64(x) x
++# else
++# define __f64(x) x##f64
++# endif
++#endif
++
++#if __HAVE_FLOAT32X
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# define __f32x(x) x
++# else
++# define __f32x(x) x##f32x
++# endif
++#endif
++
++#if __HAVE_FLOAT64X
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# if __HAVE_FLOAT64X_LONG_DOUBLE
++# define __f64x(x) x##l
++# else
++# define __f64x(x) __f128 (x)
++# endif
++# else
++# define __f64x(x) x##f64x
++# endif
++#endif
++
++#if __HAVE_FLOAT128X
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# error "_Float128X supported but no constant suffix"
++# else
++# define __f128x(x) x##f128x
++# endif
++#endif
++
++/* Defined to a complex type if __HAVE_<type> is 1. */
++#if __HAVE_FLOAT16
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
++# define __CFLOAT16 __cfloat16
++# else
++# define __CFLOAT16 _Complex _Float16
++# endif
++#endif
++
++#if __HAVE_FLOAT32
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# define __CFLOAT32 _Complex float
++# else
++# define __CFLOAT32 _Complex _Float32
++# endif
++#endif
++
++#if __HAVE_FLOAT64
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# define __CFLOAT64 _Complex double
++# else
++# define __CFLOAT64 _Complex _Float64
++# endif
++#endif
++
++#if __HAVE_FLOAT32X
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# define __CFLOAT32X _Complex double
++# else
++# define __CFLOAT32X _Complex _Float32x
++# endif
++#endif
++
++#if __HAVE_FLOAT64X
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# if __HAVE_FLOAT64X_LONG_DOUBLE
++# define __CFLOAT64X _Complex long double
++# else
++# define __CFLOAT64X __CFLOAT128
++# endif
++# else
++# define __CFLOAT64X _Complex _Float64x
++# endif
++#endif
++
++#if __HAVE_FLOAT128X
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# error "_Float128X supported but no complex type"
++# else
++# define __CFLOAT128X _Complex _Float128x
++# endif
++#endif
++
++/* The remaining of this file provides support for older compilers. */
++#if __HAVE_FLOAT16
++
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++typedef float _Float16 __attribute__ ((__mode__ (__HF__)));
++# endif
++
++# if !__GNUC_PREREQ (7, 0)
++# define __builtin_huge_valf16() ((_Float16) __builtin_huge_val ())
++# define __builtin_inff16() ((_Float16) __builtin_inf ())
++# define __builtin_nanf16(x) ((_Float16) __builtin_nan (x))
++# define __builtin_nansf16(x) ((_Float16) __builtin_nans (x))
++# endif
++
++#endif
++
++#if __HAVE_FLOAT32
++
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++typedef float _Float32;
++# endif
++
++# if !__GNUC_PREREQ (7, 0)
++# define __builtin_huge_valf32() (__builtin_huge_valf ())
++# define __builtin_inff32() (__builtin_inff ())
++# define __builtin_nanf32(x) (__builtin_nanf (x))
++# define __builtin_nansf32(x) (__builtin_nansf (x))
++# endif
++
++#endif
++
++#if __HAVE_FLOAT64
++
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++typedef double _Float64;
++# endif
++
++# if !__GNUC_PREREQ (7, 0)
++# define __builtin_huge_valf64() (__builtin_huge_val ())
++# define __builtin_inff64() (__builtin_inf ())
++# define __builtin_nanf64(x) (__builtin_nan (x))
++# define __builtin_nansf64(x) (__builtin_nans (x))
++# endif
++
++#endif
++
++#if __HAVE_FLOAT32X
++
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++typedef double _Float32x;
++# endif
++
++# if !__GNUC_PREREQ (7, 0)
++# define __builtin_huge_valf32x() (__builtin_huge_val ())
++# define __builtin_inff32x() (__builtin_inf ())
++# define __builtin_nanf32x(x) (__builtin_nan (x))
++# define __builtin_nansf32x(x) (__builtin_nans (x))
++# endif
++
++#endif
++
++#if __HAVE_FLOAT64X
++
++# if __HAVE_FLOAT64X_LONG_DOUBLE
++
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++typedef long double _Float64x;
++# endif
++
++# if !__GNUC_PREREQ (7, 0)
++# define __builtin_huge_valf64x() (__builtin_huge_vall ())
++# define __builtin_inff64x() (__builtin_infl ())
++# define __builtin_nanf64x(x) (__builtin_nanl (x))
++# define __builtin_nansf64x(x) (__builtin_nansl (x))
++# endif
++
++# else
++
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++typedef _Float128 _Float64x;
++# endif
++
++# if !__GNUC_PREREQ (7, 0)
++# define __builtin_huge_valf64x() (__builtin_huge_valf128 ())
++# define __builtin_inff64x() (__builtin_inff128 ())
++# define __builtin_nanf64x(x) (__builtin_nanf128 (x))
++# define __builtin_nansf64x(x) (__builtin_nansf128 (x))
++# endif
++
++# endif
++
++#endif
++
++#if __HAVE_FLOAT128X
++
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# error "_Float128x supported but no type"
++# endif
++
++# if !__GNUC_PREREQ (7, 0)
++# define __builtin_huge_valf128x() ((_Float128x) __builtin_huge_val ())
++# define __builtin_inff128x() ((_Float128x) __builtin_inf ())
++# define __builtin_nanf128x(x) ((_Float128x) __builtin_nan (x))
++# define __builtin_nansf128x(x) ((_Float128x) __builtin_nans (x))
++# endif
++
++#endif
++
++#endif /* _BITS_FLOATN_COMMON_H */
+diff -purN glibc-org/bits/floatn.h glibc-2.26/bits/floatn.h
+--- glibc-org/bits/floatn.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/bits/floatn.h 2017-10-22 23:45:40.925932774 +0000
+@@ -33,3 +33,5 @@
+ /* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+ #undef __CFLOAT128
++
++#include <bits/floatn-common.h>
+diff -purN glibc-org/include/math.h glibc-2.26/include/math.h
+--- glibc-org/include/math.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/include/math.h 2017-10-22 22:58:12.417128083 +0000
+@@ -9,8 +9,6 @@
+
+ #ifndef _ISOMAC
+ /* Now define the internal interfaces. */
+-extern int __matherr (struct exception *__exc);
+-
+ extern int __signgam;
+
+ # if IS_IN (libc) || IS_IN (libm)
+@@ -41,7 +39,7 @@ libm_hidden_proto (__issignaling)
+ libm_hidden_proto (__issignalingf)
+ libm_hidden_proto (__exp)
+ libm_hidden_proto (__expf)
+-libm_hidden_proto (roundeven)
++libm_hidden_proto (__roundeven)
+
+ # ifndef __NO_LONG_DOUBLE_MATH
+ libm_hidden_proto (__fpclassifyl)
+diff -purN glibc-org/include/wchar.h glibc-2.26/include/wchar.h
+--- glibc-org/include/wchar.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/include/wchar.h 2017-10-22 23:01:39.322475542 +0000
+@@ -70,6 +70,26 @@ libc_hidden_proto (wcstoll)
+ libc_hidden_proto (wcstoul)
+ libc_hidden_proto (wcstoull)
+
++extern float ____wcstof_l_internal (const wchar_t *, wchar_t **, int,
++ locale_t) attribute_hidden;
++extern double ____wcstod_l_internal (const wchar_t *, wchar_t **, int,
++ locale_t) attribute_hidden;
++extern long double ____wcstold_l_internal (const wchar_t *, wchar_t **,
++ int, locale_t) attribute_hidden;
++extern long int ____wcstol_l_internal (const wchar_t *, wchar_t **, int,
++ int, locale_t) attribute_hidden;
++extern unsigned long int ____wcstoul_l_internal (const wchar_t *,
++ wchar_t **,
++ int, int, locale_t)
++ attribute_hidden;
++extern long long int ____wcstoll_l_internal (const wchar_t *, wchar_t **,
++ int, int, locale_t)
++ attribute_hidden;
++extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
++ wchar_t **, int, int,
++ locale_t)
++ attribute_hidden;
++
+ #if __HAVE_DISTINCT_FLOAT128
+ extern __typeof (wcstof128_l) __wcstof128_l;
+ libc_hidden_proto (__wcstof128_l)
+@@ -77,6 +97,9 @@ extern _Float128 __wcstof128_internal (c
+ wchar_t **__restrict __endptr,
+ int __group) __THROW;
+
++extern _Float128 ____wcstof128_l_internal (const wchar_t *, wchar_t **, int,
++ locale_t) attribute_hidden;
++
+ libc_hidden_proto (__wcstof128_internal)
+ libc_hidden_proto (wcstof128)
+ #endif
+@@ -129,9 +152,10 @@ extern int __wcsncasecmp (const wchar_t
+ __attribute_pure__;
+ extern size_t __wcslen (const wchar_t *__s) __attribute_pure__;
+ extern size_t __wcsnlen (const wchar_t *__s, size_t __maxlen)
+- __attribute_pure__;
+-extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src);
+-extern wint_t __btowc (int __c);
++ attribute_hidden __attribute_pure__;
++extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src)
++ attribute_hidden;
++extern wint_t __btowc (int __c) attribute_hidden;
+ extern int __mbsinit (const __mbstate_t *__ps);
+ extern size_t __mbrtowc (wchar_t *__restrict __pwc,
+ const char *__restrict __s, size_t __n,
+@@ -139,34 +163,39 @@ extern size_t __mbrtowc (wchar_t *__rest
+ libc_hidden_proto (__mbrtowc)
+ libc_hidden_proto (__mbrlen)
+ extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
+- __mbstate_t *__restrict __ps);
++ __mbstate_t *__restrict __ps) attribute_hidden;
+ extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
+ const char **__restrict __src,
+- size_t __len, __mbstate_t *__restrict __ps);
++ size_t __len, __mbstate_t *__restrict __ps)
++ attribute_hidden;
+ extern size_t __wcsrtombs (char *__restrict __dst,
+ const wchar_t **__restrict __src,
+- size_t __len, __mbstate_t *__restrict __ps);
++ size_t __len, __mbstate_t *__restrict __ps)
++ attribute_hidden;
+ extern size_t __mbsnrtowcs (wchar_t *__restrict __dst,
+ const char **__restrict __src, size_t __nmc,
+- size_t __len, __mbstate_t *__restrict __ps);
++ size_t __len, __mbstate_t *__restrict __ps)
++ attribute_hidden;
+ extern size_t __wcsnrtombs (char *__restrict __dst,
+ const wchar_t **__restrict __src,
+ size_t __nwc, size_t __len,
+- __mbstate_t *__restrict __ps);
++ __mbstate_t *__restrict __ps)
++ attribute_hidden;
+ extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
+- const wchar_t *__restrict __src, size_t __n);
++ const wchar_t *__restrict __src, size_t __n)
++ attribute_hidden;
+ extern wchar_t *__wcpcpy (wchar_t *__dest, const wchar_t *__src);
+ extern wchar_t *__wcpncpy (wchar_t *__dest, const wchar_t *__src,
+- size_t __n);
++ size_t __n) attribute_hidden;
+ extern wchar_t *__wmemcpy (wchar_t *__s1, const wchar_t *s2,
+- size_t __n);
++ size_t __n) attribute_hidden;
+ extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
+ const wchar_t *__restrict __s2,
+- size_t __n);
++ size_t __n) attribute_hidden;
+ extern wchar_t *__wmemmove (wchar_t *__s1, const wchar_t *__s2,
+- size_t __n);
++ size_t __n) attribute_hidden;
+ extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc)
+- __attribute_pure__;
++ attribute_hidden __attribute_pure__;
+
+ extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
+ size_t __ns) __THROW;
+@@ -174,17 +203,21 @@ extern wchar_t *__wmemset_chk (wchar_t *
+ extern int __vfwscanf (__FILE *__restrict __s,
+ const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
++ attribute_hidden
+ /* __attribute__ ((__format__ (__wscanf__, 2, 0)) */;
+ extern int __vswprintf (wchar_t *__restrict __s, size_t __n,
+ const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
++ attribute_hidden
+ /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
+ extern int __fwprintf (__FILE *__restrict __s,
+ const wchar_t *__restrict __format, ...)
++ attribute_hidden
+ /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
+ extern int __vfwprintf (__FILE *__restrict __s,
+ const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
++ attribute_hidden
+ /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
+ extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
+ const wchar_t *__restrict __format,
+diff -purN glibc-org/math/bits/cmathcalls.h glibc-2.26/math/bits/cmathcalls.h
+--- glibc-org/math/bits/cmathcalls.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/bits/cmathcalls.h 2017-10-22 17:02:23.568967254 +0000
+@@ -128,33 +128,3 @@ __MATHDECL (_Mdouble_,cimag, (_Mdouble_c
+
+ /* Real part of Z. */
+ __MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z));
+-
+-
+-/* Now some optimized versions. GCC has handy notations for these
+- functions. Recent GCC handles these as builtin functions so does
+- not need inlines. */
+-#if defined __GNUC__ && !__GNUC_PREREQ (2, 97) && defined __OPTIMIZE__ \
+- && defined __extern_inline
+-
+-/* Imaginary part of Z. */
+-__extern_inline _Mdouble_
+-__MATH_PRECNAME(cimag) (_Mdouble_complex_ __z) __THROW
+-{
+- return __imag__ __z;
+-}
+-
+-/* Real part of Z. */
+-__extern_inline _Mdouble_
+-__MATH_PRECNAME(creal) (_Mdouble_complex_ __z) __THROW
+-{
+- return __real__ __z;
+-}
+-
+-/* Complex conjugate of Z. */
+-__extern_inline _Mdouble_complex_
+-__MATH_PRECNAME(conj) (_Mdouble_complex_ __z) __THROW
+-{
+- return __extension__ ~__z;
+-}
+-
+-#endif
+diff -purN glibc-org/math/bits/mathcalls.h glibc-2.26/math/bits/mathcalls.h
+--- glibc-org/math/bits/mathcalls.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/bits/mathcalls.h 2017-10-22 17:02:23.568967254 +0000
+@@ -113,12 +113,6 @@ __MATHCALL (modf,, (_Mdouble_ __x, _Mdou
+ /* Compute exponent to base ten. */
+ __MATHCALL (exp10,, (_Mdouble_ __x));
+ #endif
+-#ifdef __USE_GNU
+-/* Another name occasionally used. */
+-# if !__MATH_DECLARING_FLOATN
+-__MATHCALL (pow10,, (_Mdouble_ __x));
+-# endif
+-#endif
+
+ #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
+ /* Return exp(X) - 1. */
+diff -purN glibc-org/math/bits/math-finite.h glibc-2.26/math/bits/math-finite.h
+--- glibc-org/math/bits/math-finite.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/bits/math-finite.h 2017-10-22 17:02:23.568967254 +0000
+@@ -20,37 +20,26 @@
+ # error "Never use <bits/math-finite.h> directly; include <math.h> instead."
+ #endif
+
+-#define __REDIRFROM_X(function, reentrant, suffix) \
+- function ## suffix ## reentrant
+ #define __REDIRFROM(...) __REDIRFROM_X(__VA_ARGS__)
+
+-/* Redirect long double versions of the functions to the corresponding
+- double version if __NO_LONG_DOUBLE_MATH is defined. */
+-#if __MATH_DECLARING_LDOUBLE && defined __NO_LONG_DOUBLE_MATH
+-# define __REDIRTO_X(function, reentrant, suffix) \
+- __ ## function ## reentrant ## _finite
+-#else
+-# define __REDIRTO_X(function, reentrant, suffix) \
+- __ ## function ## suffix ## reentrant ## _finite
+-#endif
+ #define __REDIRTO(...) __REDIRTO_X(__VA_ARGS__)
+
+ #define __MATH_REDIRCALL_X(from, args, to) \
+ extern _Mdouble_ __REDIRECT_NTH (from, args, to)
+ #define __MATH_REDIRCALL(function, reentrant, args) \
+ __MATH_REDIRCALL_X \
+- (__REDIRFROM (function, reentrant, _MSUF_), args, \
+- __REDIRTO (function, reentrant, _MSUF_))
++ (__REDIRFROM (function, reentrant), args, \
++ __REDIRTO (function, reentrant))
+ #define __MATH_REDIRCALL_2(from, reentrant, args, to) \
+ __MATH_REDIRCALL_X \
+- (__REDIRFROM (from, reentrant, _MSUF_), args, \
+- __REDIRTO (to, reentrant, _MSUF_))
++ (__REDIRFROM (from, reentrant), args, \
++ __REDIRTO (to, reentrant))
+
+ #define __MATH_REDIRCALL_INTERNAL(function, reentrant, args) \
+ __MATH_REDIRCALL_X \
+ (__REDIRFROM (__CONCAT (__, function), \
+- __CONCAT (reentrant, _finite), _MSUF_), \
+- args, __REDIRTO (function, _r, _MSUF_))
++ __CONCAT (reentrant, _finite)), \
++ args, __REDIRTO (function, _r))
+
+
+ /* acos. */
+@@ -78,14 +67,9 @@ __MATH_REDIRCALL (cosh, , (_Mdouble_));
+ /* exp. */
+ __MATH_REDIRCALL (exp, , (_Mdouble_));
+
+-#ifdef __USE_GNU
++#if __GLIBC_USE (IEC_60559_FUNCS_EXT)
+ /* exp10. */
+ __MATH_REDIRCALL (exp10, , (_Mdouble_));
+-
+-/* pow10. */
+-# if !__MATH_DECLARING_FLOATN
+-__MATH_REDIRCALL_2 (pow10, , (_Mdouble_), exp10);
+-# endif
+ #endif
+
+ #ifdef __USE_ISOC99
+@@ -136,13 +120,13 @@ __MATH_REDIRCALL_INTERNAL (lgamma, _r, (
+ && defined __extern_always_inline)
+ /* lgamma. */
+ __extern_always_inline _Mdouble_
+-__NTH (__REDIRFROM (lgamma, , _MSUF_) (_Mdouble_ __d))
++__NTH (__REDIRFROM (lgamma, ) (_Mdouble_ __d))
+ {
+ # if defined __USE_MISC || defined __USE_XOPEN
+- return __REDIRTO (lgamma, _r, _MSUF_) (__d, &signgam);
++ return __REDIRTO (lgamma, _r) (__d, &signgam);
+ # else
+ int __local_signgam = 0;
+- return __REDIRTO (lgamma, _r, _MSUF_) (__d, &__local_signgam);
++ return __REDIRTO (lgamma, _r) (__d, &__local_signgam);
+ # endif
+ }
+ #endif
+@@ -151,9 +135,9 @@ __NTH (__REDIRFROM (lgamma, , _MSUF_) (_
+ && defined __extern_always_inline) && !__MATH_DECLARING_FLOATN
+ /* gamma. */
+ __extern_always_inline _Mdouble_
+-__NTH (__REDIRFROM (gamma, , _MSUF_) (_Mdouble_ __d))
++__NTH (__REDIRFROM (gamma, ) (_Mdouble_ __d))
+ {
+- return __REDIRTO (lgamma, _r, _MSUF_) (__d, &signgam);
++ return __REDIRTO (lgamma, _r) (__d, &signgam);
+ }
+ #endif
+
+@@ -194,21 +178,19 @@ __MATH_REDIRCALL (sqrt, , (_Mdouble_));
+ #if defined __USE_ISOC99 && defined __extern_always_inline
+ /* tgamma. */
+ extern _Mdouble_
+-__REDIRFROM (__gamma, _r_finite, _MSUF_) (_Mdouble_, int *);
++__REDIRFROM (__gamma, _r_finite) (_Mdouble_, int *);
+
+ __extern_always_inline _Mdouble_
+-__NTH (__REDIRFROM (tgamma, , _MSUF_) (_Mdouble_ __d))
++__NTH (__REDIRFROM (tgamma, ) (_Mdouble_ __d))
+ {
+ int __local_signgam = 0;
+- _Mdouble_ __res = __REDIRTO (gamma, _r, _MSUF_) (__d, &__local_signgam);
++ _Mdouble_ __res = __REDIRTO (gamma, _r) (__d, &__local_signgam);
+ return __local_signgam < 0 ? -__res : __res;
+ }
+ #endif
+
+ #undef __REDIRFROM
+-#undef __REDIRFROM_X
+ #undef __REDIRTO
+-#undef __REDIRTO_X
+ #undef __MATH_REDIRCALL
+ #undef __MATH_REDIRCALL_2
+ #undef __MATH_REDIRCALL_INTERNAL
+diff -purN glibc-org/math/cabs_template.c glibc-2.26/math/cabs_template.c
+--- glibc-org/math/cabs_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/cabs_template.c 2017-10-22 17:02:23.568967254 +0000
+@@ -27,7 +27,3 @@ M_DECL_FUNC (__cabs) (CFLOAT z)
+ }
+
+ declare_mgen_alias (__cabs, cabs)
+-
+-#if M_LIBM_NEED_COMPAT (cabs)
+-declare_mgen_libm_compat (__cabs, cabs)
+-#endif
+diff -purN glibc-org/math/carg_template.c glibc-2.26/math/carg_template.c
+--- glibc-org/math/carg_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/carg_template.c 2017-10-22 17:02:23.568967254 +0000
+@@ -27,7 +27,3 @@ M_DECL_FUNC (__carg) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__carg, carg)
+-
+-#if M_LIBM_NEED_COMPAT (carg)
+-declare_mgen_libm_compat (__carg, carg)
+-#endif
+diff -purN glibc-org/math/cimag_template.c glibc-2.26/math/cimag_template.c
+--- glibc-org/math/cimag_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/cimag_template.c 2017-10-22 17:02:23.568967254 +0000
+@@ -26,7 +26,3 @@ M_DECL_FUNC (__cimag) (CFLOAT z)
+ }
+
+ declare_mgen_alias (__cimag, cimag)
+-
+-#if M_LIBM_NEED_COMPAT (cimag)
+-declare_mgen_libm_compat (__cimag, cimag)
+-#endif
+diff -purN glibc-org/math/conj_template.c glibc-2.26/math/conj_template.c
+--- glibc-org/math/conj_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/conj_template.c 2017-10-22 17:02:23.568967254 +0000
+@@ -26,7 +26,3 @@ M_DECL_FUNC (__conj) (CFLOAT z)
+ }
+
+ declare_mgen_alias (__conj, conj)
+-
+-#if M_LIBM_NEED_COMPAT (conj)
+-declare_mgen_libm_compat (__conj, conj)
+-#endif
+diff -purN glibc-org/math/creal_template.c glibc-2.26/math/creal_template.c
+--- glibc-org/math/creal_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/creal_template.c 2017-10-22 17:02:23.568967254 +0000
+@@ -26,7 +26,3 @@ M_DECL_FUNC (__creal) (CFLOAT z)
+ }
+
+ declare_mgen_alias (__creal, creal)
+-
+-#if M_LIBM_NEED_COMPAT (creal)
+-declare_mgen_libm_compat (__creal, creal)
+-#endif
+diff -purN glibc-org/math/e_acoshl.c glibc-2.26/math/e_acoshl.c
+--- glibc-org/math/e_acoshl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_acoshl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_acoshl (long double x)
+-{
+- fputs ("__ieee754_acoshl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_acoshl, __acoshl_finite)
+-
+-stub_warning (acoshl)
+diff -purN glibc-org/math/e_acosl.c glibc-2.26/math/e_acosl.c
+--- glibc-org/math/e_acosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_acosl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_acosl (long double x)
+-{
+- fputs ("__ieee754_acosl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_acosl, __acosl_finite)
+-
+-stub_warning (acosl)
+diff -purN glibc-org/math/e_asinl.c glibc-2.26/math/e_asinl.c
+--- glibc-org/math/e_asinl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_asinl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_asinl (long double x)
+-{
+- fputs ("__ieee754_asinl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_asinl, __asinl_finite)
+-
+-stub_warning (asinl)
+diff -purN glibc-org/math/e_atan2l.c glibc-2.26/math/e_atan2l.c
+--- glibc-org/math/e_atan2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_atan2l.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_atan2l (long double x, long double y)
+-{
+- fputs ("__ieee754_atan2l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_atan2l, __atan2l_finite)
+-
+-stub_warning (atan2l)
+diff -purN glibc-org/math/e_atanhl.c glibc-2.26/math/e_atanhl.c
+--- glibc-org/math/e_atanhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_atanhl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_atanhl (long double x)
+-{
+- fputs ("__ieee754_atanhl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_atanhl, __atanhl_finite)
+-
+-stub_warning (__ieee754_atanhl)
+diff -purN glibc-org/math/e_coshl.c glibc-2.26/math/e_coshl.c
+--- glibc-org/math/e_coshl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_coshl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_coshl (long double x)
+-{
+- fputs ("__ieee754_coshl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_coshl, __coshl_finite)
+-
+-stub_warning (__ieee754_coshl)
+diff -purN glibc-org/math/e_expl.c glibc-2.26/math/e_expl.c
+--- glibc-org/math/e_expl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_expl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_expl (long double x)
+-{
+- fputs ("__ieee754_expl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_expl, __expl_finite)
+-
+-stub_warning (expl)
+diff -purN glibc-org/math/e_fmodl.c glibc-2.26/math/e_fmodl.c
+--- glibc-org/math/e_fmodl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_fmodl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_fmodl (long double x, long double y)
+-{
+- fputs ("__ieee754_fmodl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_fmodl, __fmodl_finite)
+-
+-stub_warning (fmodl)
+diff -purN glibc-org/math/e_gammal_r.c glibc-2.26/math/e_gammal_r.c
+--- glibc-org/math/e_gammal_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_gammal_r.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,15 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_gammal_r (long double x, int *signgamp)
+-{
+- *signgamp = 0;
+- fputs ("__ieee754_gammal_r not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_gammal_r, __gammal_r_finite)
+-
+-stub_warning (__ieee754_gammal_r)
+diff -purN glibc-org/math/e_hypotl.c glibc-2.26/math/e_hypotl.c
+--- glibc-org/math/e_hypotl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_hypotl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_hypotl (long double x, long double y)
+-{
+- fputs ("__ieee754_hypotl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_hypotl, __hypotl_finite)
+-
+-stub_warning (__ieee754_hypotl)
+diff -purN glibc-org/math/e_j0l.c glibc-2.26/math/e_j0l.c
+--- glibc-org/math/e_j0l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_j0l.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,26 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <math_private.h>
+-
+-long double
+-__ieee754_j0l (long double x)
+-{
+- fputs ("__ieee754_j0l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_j0l, __j0l_finite)
+-
+-stub_warning (j0l)
+-
+-long double
+-__ieee754_y0l (long double x)
+-{
+- fputs ("__ieee754_y0l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_y0l, __y0l_finite)
+-
+-stub_warning (y0l)
+diff -purN glibc-org/math/e_j1l.c glibc-2.26/math/e_j1l.c
+--- glibc-org/math/e_j1l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_j1l.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,26 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <math_private.h>
+-
+-long double
+-__ieee754_j1l (long double x)
+-{
+- fputs ("__ieee754_j1l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_j1l, __j1l_finite)
+-
+-stub_warning (j1l)
+-
+-long double
+-__ieee754_y1l (long double x)
+-{
+- fputs ("__ieee754_y1l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_y1l, __y1l_finite)
+-
+-stub_warning (y1l)
+diff -purN glibc-org/math/e_jnl.c glibc-2.26/math/e_jnl.c
+--- glibc-org/math/e_jnl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_jnl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,26 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <math_private.h>
+-
+-long double
+-__ieee754_jnl (int n, long double x)
+-{
+- fputs ("__ieee754_jnl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_jnl, __jnl_finite)
+-
+-stub_warning (jnl)
+-
+-long double
+-__ieee754_ynl (int n, long double x)
+-{
+- fputs ("__ieee754_ynl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_ynl, __ynl_finite)
+-
+-stub_warning (ynl)
+diff -purN glibc-org/math/e_lgammal_r.c glibc-2.26/math/e_lgammal_r.c
+--- glibc-org/math/e_lgammal_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_lgammal_r.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,17 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <math_private.h>
+-
+-long double
+-__ieee754_lgammal_r (long double x, int *signgamp)
+-{
+- *signgamp = 0;
+- fputs ("__ieee754_lgammal_r not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_lgammal_r, __lgammal_r_finite)
+-
+-stub_warning (lgammal)
+-stub_warning (lgammal_r)
+diff -purN glibc-org/math/e_log10l.c glibc-2.26/math/e_log10l.c
+--- glibc-org/math/e_log10l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_log10l.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_log10l (long double x)
+-{
+- fputs ("__ieee754_log10l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_log10l, __log10l_finite)
+-
+-stub_warning (log10l)
+diff -purN glibc-org/math/e_log2l.c glibc-2.26/math/e_log2l.c
+--- glibc-org/math/e_log2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_log2l.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_log2l (long double x)
+-{
+- fputs ("__ieee754_log2l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_log2l, __log2l_finite)
+-
+-stub_warning (log2l)
+diff -purN glibc-org/math/e_logl.c glibc-2.26/math/e_logl.c
+--- glibc-org/math/e_logl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_logl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_logl (long double x)
+-{
+- fputs ("__ieee754_logl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_logl, __logl_finite)
+-
+-stub_warning (logl)
+diff -purN glibc-org/math/e_powl.c glibc-2.26/math/e_powl.c
+--- glibc-org/math/e_powl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_powl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_powl (long double x, long double y)
+-{
+- fputs ("__ieee754_powl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_powl, __powl_finite)
+-
+-stub_warning (powl)
+diff -purN glibc-org/math/e_rem_pio2l.c glibc-2.26/math/e_rem_pio2l.c
+--- glibc-org/math/e_rem_pio2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_rem_pio2l.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <math_private.h>
+-
+-int32_t
+-__ieee754_rem_pio2l (long double x, long double *y)
+-{
+- fputs ("__ieee754_rem_pio2l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0;
+-}
+-
+-stub_warning (__ieee754_rem_pio2l)
+diff -purN glibc-org/math/e_sinhl.c glibc-2.26/math/e_sinhl.c
+--- glibc-org/math/e_sinhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_sinhl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_sinhl (long double x)
+-{
+- fputs ("__ieee754_sinhl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_sinhl, __sinhl_finite)
+-
+-stub_warning (__ieee754_sinhl)
+diff -purN glibc-org/math/e_sqrtf128.c glibc-2.26/math/e_sqrtf128.c
+--- glibc-org/math/e_sqrtf128.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_sqrtf128.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-_Float128
+-__ieee754_sqrtf128 (_Float128 x)
+-{
+- fputs ("__ieee754_sqrtf128 not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_sqrtf128, __sqrtf128_finite)
+-
+-stub_warning (sqrtf128)
+diff -purN glibc-org/math/e_sqrtl.c glibc-2.26/math/e_sqrtl.c
+--- glibc-org/math/e_sqrtl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/e_sqrtl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__ieee754_sqrtl (long double x)
+-{
+- fputs ("__ieee754_sqrtl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-strong_alias (__ieee754_sqrtl, __sqrtl_finite)
+-
+-stub_warning (sqrtl)
+diff -purN glibc-org/math/gen-tgmath-tests.py glibc-2.26/math/gen-tgmath-tests.py
+--- glibc-org/math/gen-tgmath-tests.py 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/gen-tgmath-tests.py 2017-10-22 17:02:23.568967254 +0000
+@@ -128,9 +128,7 @@ class Type(object):
+ real_type = Type(name, suffix=suffix, mant_dig=mant_dig,
+ condition=condition, order=order, integer=integer,
+ complex=False)
+- # Complex integer types currently disabled because of problems
+- # in tgmath.h.
+- if complex_ok and not integer:
++ if complex_ok:
+ if complex_name is None:
+ complex_name = '_Complex %s' % name
+ complex_type = Type(complex_name, condition=condition,
+@@ -195,8 +193,13 @@ class Type(object):
+ Type.create_type('unsigned long int', integer=True)
+ Type.create_type('long long int', integer=True)
+ Type.create_type('unsigned long long int', integer=True)
++ Type.create_type('__int128', integer=True,
++ condition='defined __SIZEOF_INT128__')
++ Type.create_type('unsigned __int128', integer=True,
++ condition='defined __SIZEOF_INT128__')
+ Type.create_type('enum e', integer=True, complex_ok=False)
+ Type.create_type('_Bool', integer=True, complex_ok=False)
++ Type.create_type('bit_field', integer=True, complex_ok=False)
+ # Internal types represent the combination of long double with
+ # _Float64 or _Float64x, for which the ordering depends on
+ # whether long double has the same format as double.
+@@ -273,6 +276,11 @@ def vol_var_for_type(name):
+
+ def define_vars_for_type(name):
+ """Return the definitions of variables with a given type (name)."""
++ if name == 'bit_field':
++ struct_vars = define_vars_for_type('struct s');
++ return '%s#define %s %s.bf\n' % (struct_vars,
++ vol_var_for_type(name),
++ vol_var_for_type('struct s'))
+ return ('%s %s __attribute__ ((unused));\n'
+ '%s volatile %s __attribute__ ((unused));\n'
+ % (name, var_for_type(name), name, vol_var_for_type(name)))
+@@ -311,7 +319,11 @@ class Tests(object):
+ 'int num_pass, num_fail;\n'
+ 'volatile int called_mant_dig;\n'
+ 'const char *volatile called_func_name;\n'
+- 'enum e { E, F };\n']
++ 'enum e { E, F };\n'
++ 'struct s\n'
++ ' {\n'
++ ' int bf:2;\n'
++ ' };\n']
+ float64_text = ('# if LDBL_MANT_DIG == DBL_MANT_DIG\n'
+ 'typedef _Float64 long_double_Float64;\n'
+ 'typedef __CFLOAT64 complex_long_double_Float64;\n'
+diff -purN glibc-org/math/ieee-math.c glibc-2.26/math/ieee-math.c
+--- glibc-org/math/ieee-math.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/ieee-math.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-/* Linking in this module forces IEEE error handling rules for math functions.
+- The default is POSIX.1 error handling. */
+-
+-#include <math.h>
+-
+-_LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
+diff -purN glibc-org/math/k_cosl.c glibc-2.26/math/k_cosl.c
+--- glibc-org/math/k_cosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/k_cosl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <math_private.h>
+-
+-long double
+-__kernel_cosl (long double x, long double y)
+-{
+- fputs ("__kernel_cosl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-
+-stub_warning (__kernel_cosl)
+diff -purN glibc-org/math/k_sinl.c glibc-2.26/math/k_sinl.c
+--- glibc-org/math/k_sinl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/k_sinl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <math_private.h>
+-
+-long double
+-__kernel_sinl (long double x, long double y, int iy)
+-{
+- fputs ("__kernel_sinl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-
+-stub_warning (__kernel_sinl)
+diff -purN glibc-org/math/k_tanl.c glibc-2.26/math/k_tanl.c
+--- glibc-org/math/k_tanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/k_tanl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-#include <math_private.h>
+-
+-long double
+-__kernel_tanl (long double x, long double y, int iy)
+-{
+- fputs ("__kernel_tanl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-
+-stub_warning (__kernel_tanl)
+diff -purN glibc-org/math/lgamma-compat.h glibc-2.26/math/lgamma-compat.h
+--- glibc-org/math/lgamma-compat.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/lgamma-compat.h 2017-10-22 17:02:23.568967254 +0000
+@@ -19,6 +19,7 @@
+ #ifndef LGAMMA_COMPAT_H
+ #define LGAMMA_COMPAT_H 1
+
++#include <math-svid-compat.h>
+ #include <shlib-compat.h>
+
+ /* XSI POSIX requires lgamma to set signgam, but ISO C does not permit
+@@ -40,7 +41,8 @@
+ #define HAVE_LGAMMA_COMPAT SHLIB_COMPAT (libm, LGAMMA_OLD_VER, LGAMMA_NEW_VER)
+
+ /* Whether to build this version at all. */
+-#define BUILD_LGAMMA (HAVE_LGAMMA_COMPAT || !USE_AS_COMPAT)
++#define BUILD_LGAMMA \
++ (LIBM_SVID_COMPAT && (HAVE_LGAMMA_COMPAT || !USE_AS_COMPAT))
+
+ /* The name to use for this version. */
+ #if USE_AS_COMPAT
+diff -purN glibc-org/math/libm-test-exp10.inc glibc-2.26/math/libm-test-exp10.inc
+--- glibc-org/math/libm-test-exp10.inc 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/libm-test-exp10.inc 2017-10-22 17:02:23.568967254 +0000
+@@ -37,19 +37,9 @@ exp10_test (void)
+ }
+
+ static void
+-pow10_test (void)
+-{
+-#if !TEST_FLOATN
+- /* pow10 uses the same test data as exp10. */
+- ALL_RM_TEST (pow10, 0, exp10_test_data, RUN_TEST_LOOP_f_f, END);
+-#endif
+-}
+-
+-static void
+ do_test (void)
+ {
+ exp10_test ();
+- pow10_test ();
+ }
+
+ /*
+diff -purN glibc-org/math/libm-test-support.c glibc-2.26/math/libm-test-support.c
+--- glibc-org/math/libm-test-support.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/libm-test-support.c 2017-10-22 17:02:23.568967254 +0000
+@@ -45,6 +45,9 @@
+
+ TYPE_STR: The name of the type as used in ulps files, as a string.
+
++ ULP_IDX, ULP_I_IDX: The array indexes for ulps values for this
++ function.
++
+ LIT: Append the correct suffix to a literal.
+
+ LITM: Append the correct suffix to an M_* macro name.
+@@ -191,8 +194,8 @@ compare_ulp_data (const void *key, const
+ return strcmp (keystr, ulpdat->name);
+ }
+
+-static const int ulp_i_idx = __CONCATX (ULP_I_, PREFIX);
+-static const int ulp_idx = __CONCATX (ULP_, PREFIX);
++static const int ulp_i_idx = ULP_I_IDX;
++static const int ulp_idx = ULP_IDX;
+
+ /* Return the ulps for NAME in array DATA with NMEMB elements, or 0 if
+ no ulps listed. */
+@@ -989,13 +992,6 @@ enable_test (int exceptions)
+ return 1;
+ }
+
+-/* This is to prevent messages from the SVID libm emulation. */
+-int
+-matherr (struct exception *x __attribute__ ((unused)))
+-{
+- return 1;
+-}
+-
+ static void
+ initialize (void)
+ {
+diff -purN glibc-org/math/Makefile glibc-2.26/math/Makefile
+--- glibc-org/math/Makefile 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/Makefile 2017-10-22 17:02:23.568967254 +0000
+@@ -22,15 +22,14 @@ subdir := math
+ include ../Makeconfig
+
+ # Installed header files.
+-headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
+- bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \
++headers := math.h bits/mathcalls.h bits/mathinline.h \
+ fpu_control.h complex.h bits/cmathcalls.h fenv.h \
+ bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \
+ bits/math-finite.h bits/math-vector.h \
+ bits/libm-simd-decl-stubs.h bits/iscanonical.h \
+ bits/flt-eval-method.h bits/fp-fast.h bits/fp-logb.h \
+ bits/long-double.h bits/mathcalls-helper-functions.h \
+- bits/floatn.h bits/huge_val_flt128.h
++ bits/floatn.h bits/floatn-common.h
+
+ # FPU support code.
+ aux := setfpucw fpu_control
+@@ -103,6 +102,10 @@ libm-compat-calls = \
+ # after the Rules makefile has been parsed.
+ types-basic = $(type-ldouble-$(long-double-fcts)) double float
+
++# Like types, but includes types whose functions alias those for
++# another type.
++test-types-basic = ldouble double float
++
+ # long double support
+ type-ldouble-suffix := l
+ type-ldouble-routines := t_sincosl k_sincosl s_iscanonicall
+@@ -116,13 +119,16 @@ type-double-routines := branred doasin d
+
+ # float support
+ type-float-suffix := f
+-type-float-routines := k_rem_pio2f
++type-float-routines := k_rem_pio2f math_errf e_exp2f_data e_logf_data \
++ e_log2f_data e_powf_log2_data
+
+ # _Float128 support
+ type-float128-suffix := f128
+ type-float128-routines := t_sincosf128 k_sincosf128
+ type-float128-yes := float128
+ types = $(types-basic) $(type-float128-$(float128-fcts))
++test-types = $(test-types-basic) $(type-float128-$(float128-fcts)) \
++ $(type-float128-$(float128-alias-fcts))
+
+ # For each of the basic types (float, double, long double), replace the
+ # occurrences of 'F' in arg 1 with the appropriate suffix for the type.
+@@ -181,7 +187,7 @@ $(inst_libdir)/libm.a: $(common-objpfx)f
+ endif
+
+ # Rules for the test suite.
+-tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test \
++tests = test-matherr-3 test-fenv basic-test \
+ test-misc test-fpucw test-fpucw-ieee tst-definitions test-tgmath \
+ test-tgmath-ret bug-nextafter bug-nexttoward bug-tgmath1 \
+ test-tgmath-int test-tgmath2 test-powl tst-CMPLX tst-CMPLX2 test-snan \
+@@ -196,19 +202,25 @@ tests = test-matherr test-fenv atest-exp
+ test-femode-traps test-iszero-excess-precision \
+ test-iseqsig-excess-precision test-flt-eval-method \
+ test-fp-ilogb-constants test-fp-llogb-constants \
+- test-fe-snans-always-signal $(tests-static)
++ test-fe-snans-always-signal test-finite-macros $(tests-static)
+ tests-static = test-fpucw-static test-fpucw-ieee-static \
+ test-signgam-uchar-static test-signgam-uchar-init-static \
+ test-signgam-uint-static test-signgam-uint-init-static \
+ test-signgam-ullong-static test-signgam-ullong-init-static
++tests-internal = test-matherr test-matherr-2
++
++# These tests use internal (unexported) GMP functions and are linked
++# statically to obtain access to these functions.
++tests-static += atest-exp atest-sincos atest-exp2
+
+ ifneq (,$(CXX))
+-tests += test-math-isinff test-math-iszero
++tests += test-math-isinff test-math-iszero test-math-issignaling \
++ test-math-iscanonical test-math-cxx11
+ endif
+
+ ifneq (no,$(PERL))
+ libm-vec-tests = $(addprefix test-,$(libmvec-tests))
+-libm-test-support = $(foreach t,$(types),libm-test-support-$(t))
++libm-test-support = $(foreach t,$(test-types),libm-test-support-$(t))
+ test-extras += $(libm-test-support)
+ extra-test-objs += $(addsuffix .o, $(libm-test-support))
+ libm-vec-test-wrappers = $(addsuffix -wrappers, $(libm-vec-tests))
+@@ -244,9 +256,9 @@ libm-test-c-auto = $(foreach f,$(libm-te
+ libm-test-c-noauto = $(foreach f,$(libm-test-funcs-noauto),libm-test-$(f).c)
+ generated += libm-test-ulps.h $(libm-test-c-auto) $(libm-test-c-noauto)
+
+-libm-tests-base-normal = $(foreach t,$(types),test-$(t))
+-libm-tests-base-finite = $(foreach t,$(types),test-$(t)-finite)
+-libm-tests-base-inline = $(foreach t,$(types),test-i$(t))
++libm-tests-base-normal = $(foreach t,$(test-types),test-$(t))
++libm-tests-base-finite = $(foreach t,$(test-types),test-$(t)-finite)
++libm-tests-base-inline = $(foreach t,$(test-types),test-i$(t))
+ libm-tests-base = $(libm-tests-base-normal) $(libm-tests-base-finite) \
+ $(libm-tests-base-inline) $(libm-vec-tests)
+ libm-tests-normal = $(foreach t,$(libm-tests-base-normal),\
+@@ -271,7 +283,7 @@ libm-tests.o = $(addsuffix .o,$(libm-tes
+
+ tests += $(libm-tests)
+ generated += $(addsuffix .c,$(libm-tests)) \
+- $(foreach t,$(types),libm-test-support-$(t).c)
++ $(foreach t,$(test-types),libm-test-support-$(t).c)
+
+ libm-test-c-auto-obj = $(addprefix $(objpfx),$(libm-test-c-auto))
+ libm-test-c-noauto-obj = $(addprefix $(objpfx),$(libm-test-c-noauto))
+@@ -348,8 +360,12 @@ CFLAGS-test-signgam-ullong-init.c = -std
+ CFLAGS-test-signgam-ullong-static.c = -std=c99
+ CFLAGS-test-signgam-ullong-init-static.c = -std=c99
+
++CFLAGS-test-math-cxx11.cc = -std=c++11
++
+ CFLAGS-test-math-isinff.cc = -std=gnu++11
+ CFLAGS-test-math-iszero.cc = -std=gnu++11
++CFLAGS-test-math-issignaling.cc = -std=gnu++11
++CFLAGS-test-math-iscanonical.cc = -std=gnu++11
+
+ CFLAGS-test-iszero-excess-precision.c = -fexcess-precision=standard
+ CFLAGS-test-iseqsig-excess-precision.c = -fexcess-precision=standard
+@@ -357,11 +373,7 @@ CFLAGS-test-flt-eval-method.c = -fexcess
+
+ CFLAGS-test-fe-snans-always-signal.c = -fsignaling-nans
+
+-# The -lieee module sets the _LIB_VERSION_ switch to IEEE mode
+-# for error handling in the -lm functions.
+-install-lib += libieee.a
+-non-lib.a += libieee.a
+-extra-objs += libieee.a ieee-math.o
++CFLAGS-test-finite-macros.c = -ffinite-math-only
+
+ include ../Rules
+
+@@ -442,7 +454,7 @@ $(foreach t,$(libm-tests-vector),$(objpf
+ echo "#include <libm-test-$$func.c>"; \
+ ) > $@
+
+-$(foreach t,$(types),\
++$(foreach t,$(test-types),\
+ $(objpfx)libm-test-support-$(t).c): $(objpfx)libm-test-support-%.c:
+ ( \
+ echo "#include <test-$*.h>"; \
+@@ -490,13 +502,13 @@ define o-iterator-doit
+ $(addprefix $(objpfx),\
+ $(call libm-tests-for-type,$(o))): $(objpfx)libm-test-support-$(o).o
+ endef
+-object-suffixes-left := $(types)
++object-suffixes-left := $(test-types)
+ include $(o-iterator)
+
+ define o-iterator-doit
+ $(objpfx)libm-test-support-$(o).o: CFLAGS += $(libm-test-no-inline-cflags)
+ endef
+-object-suffixes-left := $(types)
++object-suffixes-left := $(test-types)
+ include $(o-iterator)
+
+ # Run the math programs to automatically generate ULPs files.
+@@ -542,10 +554,6 @@ endef
+ object-suffixes-left := $(all-object-suffixes)
+ include $(o-iterator)
+
+-# This file defines the default _LIB_VERSION variable that controls
+-# the error return conventions for the math functions.
+-CPPFLAGS-s_lib_version.c := -D_POSIX_MODE
+-
+ # We don't want the fdlibm code to use the inline math functions,
+ # only the fdlibm code.
+ math-CPPFLAGS += -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES
+@@ -566,17 +574,9 @@ CFLAGS-s_modff.c += -fsignaling-nans
+ CFLAGS-s_modfl.c += -fsignaling-nans
+ CFLAGS-s_modff128.c += -fsignaling-nans
+
+-# The -lieee library is actually an object file.
+-# The module just defines the _LIB_VERSION_ variable.
+-# It's not a library to make sure it is linked in instead of s_lib_version.o.
+-$(objpfx)libieee.a: $(objpfx)ieee-math.o
+- rm -f $@
+- $(patsubst %/,cd % &&,$(objpfx)) \
+- $(LN_S) $(<F) $(@F)
+-
+ $(addprefix $(objpfx),\
+ $(filter-out $(tests-static) $(libm-tests-vector),\
+- $(tests))): $(libm)
++ $(tests) $(tests-internal))): $(libm)
+ $(addprefix $(objpfx),$(tests-static)): $(objpfx)libm.a
+ define o-iterator-doit
+ $(foreach f,$($(o)-funcs),\
+@@ -586,11 +586,4 @@ endef
+ object-suffixes-left := $(libmvec-tests)
+ include $(o-iterator)
+
+-gmp-objs = $(patsubst %,$(common-objpfx)stdlib/%.o,\
+- add_n sub_n cmp addmul_1 mul_1 mul_n divmod_1 \
+- lshift rshift mp_clz_tab udiv_qrnnd inlines \
+- $(gmp-sysdep_routines))
+-$(objpfx)atest-exp: $(gmp-objs)
+-$(objpfx)atest-sincos: $(gmp-objs)
+-$(objpfx)atest-exp2: $(gmp-objs)
+ $(objpfx)test-fenv-tls: $(shared-thread-library)
+diff -purN glibc-org/math/math.h glibc-2.26/math/math.h
+--- glibc-org/math/math.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/math.h 2017-10-22 17:02:23.569967254 +0000
+@@ -26,6 +26,11 @@
+ #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+ #include <bits/libc-header-start.h>
+
++#if defined log && defined __GNUC__
++# warning A macro called log was already defined when <math.h> was included.
++# warning This will cause compilation problems.
++#endif
++
+ __BEGIN_DECLS
+
+ /* Get definitions of __intmax_t and __uintmax_t. */
+@@ -37,23 +42,48 @@ __BEGIN_DECLS
+ /* Gather machine dependent type support. */
+ #include <bits/floatn.h>
+
+-/* Get machine-dependent HUGE_VAL value (returned on overflow).
+- On all IEEE754 machines, this is +Infinity. */
+-#include <bits/huge_val.h>
+-
++/* Value returned on overflow. With IEEE 754 floating point, this is
++ +Infinity, otherwise the largest representable positive value. */
++#if __GNUC_PREREQ (3, 3)
++# define HUGE_VAL (__builtin_huge_val ())
++#else
++/* This may provoke compiler warnings, and may not be rounded to
++ +Infinity in all IEEE 754 rounding modes, but is the best that can
++ be done in ISO C while remaining a constant expression. 10,000 is
++ greater than the maximum (decimal) exponent for all supported
++ floating-point formats and widths. */
++# define HUGE_VAL 1e10000
++#endif
++#ifdef __USE_ISOC99
++# if __GNUC_PREREQ (3, 3)
++# define HUGE_VALF (__builtin_huge_valf ())
++# define HUGE_VALL (__builtin_huge_vall ())
++# else
++# define HUGE_VALF 1e10000f
++# define HUGE_VALL 1e10000L
++# endif
++#endif
+ #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+-# include <bits/huge_val_flt128.h>
++# define HUGE_VAL_F128 (__builtin_huge_valf128 ())
+ #endif
+
+ #ifdef __USE_ISOC99
+-# include <bits/huge_valf.h>
+-# include <bits/huge_vall.h>
+-
+-/* Get machine-dependent INFINITY value. */
+-# include <bits/inf.h>
++/* IEEE positive infinity. */
++# if __GNUC_PREREQ (3, 3)
++# define INFINITY (__builtin_inff ())
++# else
++# define INFINITY HUGE_VALF
++# endif
+
+-/* Get machine-dependent NAN value (returned for some domain errors). */
+-# include <bits/nan.h>
++/* IEEE Not A Number. */
++# if __GNUC_PREREQ (3, 3)
++# define NAN (__builtin_nanf (""))
++# else
++/* This will raise an "invalid" exception outside static initializers,
++ but is the best that can be done in ISO C while remaining a
++ constant expression. */
++# define NAN (0.0f / 0.0f)
++# endif
+ #endif /* __USE_ISOC99 */
+
+ #if __GLIBC_USE (IEC_60559_BFP_EXT)
+@@ -402,7 +432,13 @@ enum
+
+ /* Return number of classification appropriate for X. */
+ # if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ \
+- && !defined __OPTIMIZE_SIZE__
++ && (!defined __OPTIMIZE_SIZE__ || defined __cplusplus)
++ /* The check for __cplusplus allows the use of the builtin, even
++ when optimization for size is on. This is provided for
++ libstdc++, only to let its configure test work when it is built
++ with -Os. No further use of this definition of fpclassify is
++ expected in C++ mode, since libstdc++ provides its own version
++ of fpclassify in cmath (which undefines fpclassify). */
+ # define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, \
+ FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
+ # else
+@@ -412,6 +448,15 @@ enum
+ /* Return nonzero value if sign of X is negative. */
+ # if __GNUC_PREREQ (6,0)
+ # define signbit(x) __builtin_signbit (x)
++# elif defined __cplusplus
++ /* In C++ mode, __MATH_TG cannot be used, because it relies on
++ __builtin_types_compatible_p, which is a C-only builtin.
++ The check for __cplusplus allows the use of the builtin instead of
++ __MATH_TG. This is provided for libstdc++, only to let its configure
++ test work. No further use of this definition of signbit is expected
++ in C++ mode, since libstdc++ provides its own version of signbit
++ in cmath (which undefines signbit). */
++# define signbit(x) __builtin_signbitl (x)
+ # elif __GNUC_PREREQ (4,0)
+ # define signbit(x) __MATH_TG ((x), __builtin_signbit, (x))
+ # else
+@@ -442,8 +487,12 @@ enum
+
+ /* Return nonzero value if X is positive or negative infinity. */
+ # if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \
+- && !defined __SUPPORT_SNAN__
+- /* __builtin_isinf_sign is broken for float128 only before GCC 7.0. */
++ && !defined __SUPPORT_SNAN__ && !defined __cplusplus
++ /* Since __builtin_isinf_sign is broken for float128 before GCC 7.0,
++ use the helper function, __isinff128, with older compilers. This is
++ only provided for C mode, because in C++ mode, GCC has no support
++ for __builtin_types_compatible_p (and when in C++ mode, this macro is
++ not used anyway, because libstdc++ headers undefine it). */
+ # define isinf(x) \
+ (__builtin_types_compatible_p (__typeof (x), _Float128) \
+ ? __isinff128 (x) : __builtin_isinf_sign (x))
+@@ -470,7 +519,32 @@ enum
+ # include <bits/iscanonical.h>
+
+ /* Return nonzero value if X is a signaling NaN. */
+-# define issignaling(x) __MATH_TG ((x), __issignaling, (x))
++# ifndef __cplusplus
++# define issignaling(x) __MATH_TG ((x), __issignaling, (x))
++# else
++ /* In C++ mode, __MATH_TG cannot be used, because it relies on
++ __builtin_types_compatible_p, which is a C-only builtin. On the
++ other hand, overloading provides the means to distinguish between
++ the floating-point types. The overloading resolution will match
++ the correct parameter (regardless of type qualifiers (i.e.: const
++ and volatile)). */
++extern "C++" {
++inline int issignaling (float __val) { return __issignalingf (__val); }
++inline int issignaling (double __val) { return __issignaling (__val); }
++inline int
++issignaling (long double __val)
++{
++# ifdef __NO_LONG_DOUBLE_MATH
++ return __issignaling (__val);
++# else
++ return __issignalingl (__val);
++# endif
++}
++# if __HAVE_DISTINCT_FLOAT128
++inline int issignaling (_Float128 __val) { return __issignalingf128 (__val); }
++# endif
++} /* extern C++ */
++# endif
+
+ /* Return nonzero value if X is subnormal. */
+ # define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)
+@@ -484,83 +558,48 @@ enum
+ # endif
+ # else /* __cplusplus */
+ extern "C++" {
++# ifdef __SUPPORT_SNAN__
++inline int
++iszero (float __val)
++{
++ return __fpclassifyf (__val) == FP_ZERO;
++}
++inline int
++iszero (double __val)
++{
++ return __fpclassify (__val) == FP_ZERO;
++}
++inline int
++iszero (long double __val)
++{
++# ifdef __NO_LONG_DOUBLE_MATH
++ return __fpclassify (__val) == FP_ZERO;
++# else
++ return __fpclassifyl (__val) == FP_ZERO;
++# endif
++}
++# if __HAVE_DISTINCT_FLOAT128
++inline int
++iszero (_Float128 __val)
++{
++ return __fpclassifyf128 (__val) == FP_ZERO;
++}
++# endif
++# else
+ template <class __T> inline bool
+ iszero (__T __val)
+ {
+-# ifdef __SUPPORT_SNAN__
+- return fpclassify (__val) == FP_ZERO;
+-# else
+ return __val == 0;
+-# endif
+ }
++# endif
+ } /* extern C++ */
+ # endif /* __cplusplus */
+ #endif /* Use IEC_60559_BFP_EXT. */
+
+-#ifdef __USE_MISC
+-/* Support for various different standard error handling behaviors. */
+-typedef enum
+-{
+- _IEEE_ = -1, /* According to IEEE 754/IEEE 854. */
+- _SVID_, /* According to System V, release 4. */
+- _XOPEN_, /* Nowadays also Unix98. */
+- _POSIX_,
+- _ISOC_ /* Actually this is ISO C99. */
+-} _LIB_VERSION_TYPE;
+-
+-/* This variable can be changed at run-time to any of the values above to
+- affect floating point error handling behavior (it may also be necessary
+- to change the hardware FPU exception settings). */
+-extern _LIB_VERSION_TYPE _LIB_VERSION;
+-#endif
+-
+-
+-#ifdef __USE_MISC
+-/* In SVID error handling, `matherr' is called with this description
+- of the exceptional condition.
+-
+- We have a problem when using C++ since `exception' is a reserved
+- name in C++. */
+-# ifdef __cplusplus
+-struct __exception
+-# else
+-struct exception
+-# endif
+- {
+- int type;
+- char *name;
+- double arg1;
+- double arg2;
+- double retval;
+- };
+-
+-# ifdef __cplusplus
+-extern int matherr (struct __exception *__exc) throw ();
+-# else
+-extern int matherr (struct exception *__exc);
+-# endif
+-
+-# define X_TLOSS 1.41484755040568800000e+16
+-
+-/* Types of exceptions in the `type' field. */
+-# define DOMAIN 1
+-# define SING 2
+-# define OVERFLOW 3
+-# define UNDERFLOW 4
+-# define TLOSS 5
+-# define PLOSS 6
+-
+-/* SVID mode specifies returning this large value instead of infinity. */
+-# define HUGE 3.40282347e+38F
+-
+-#else /* !Misc. */
+-
+-# ifdef __USE_XOPEN
++#ifdef __USE_XOPEN
+ /* X/Open wants another strange constant. */
+-# define MAXFLOAT 3.40282347e+38F
+-# endif
+-
+-#endif /* Misc. */
++# define MAXFLOAT 3.40282347e+38F
++#endif
+
+
+ /* Some useful constants. */
+@@ -622,19 +661,41 @@ extern int matherr (struct exception *__
+ # define __NO_MATH_INLINES 1
+ #endif
+
+-#if defined __USE_ISOC99 && __GNUC_PREREQ(2,97)
++#ifdef __USE_ISOC99
++# if __GNUC_PREREQ (3, 1)
+ /* ISO C99 defines some macros to compare number while taking care for
+ unordered numbers. Many FPUs provide special instructions to support
+ these operations. Generic support in GCC for these as builtins went
+- in before 3.0.0, but not all cpus added their patterns. We define
+- versions that use the builtins here, and <bits/mathinline.h> will
+- undef/redefine as appropriate for the specific GCC version in use. */
+-# define isgreater(x, y) __builtin_isgreater(x, y)
+-# define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
+-# define isless(x, y) __builtin_isless(x, y)
+-# define islessequal(x, y) __builtin_islessequal(x, y)
+-# define islessgreater(x, y) __builtin_islessgreater(x, y)
+-# define isunordered(u, v) __builtin_isunordered(u, v)
++ in 2.97, but not all cpus added their patterns until 3.1. Therefore
++ we enable the builtins from 3.1 onwards and use a generic implementation
++ othwerwise. */
++# define isgreater(x, y) __builtin_isgreater(x, y)
++# define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
++# define isless(x, y) __builtin_isless(x, y)
++# define islessequal(x, y) __builtin_islessequal(x, y)
++# define islessgreater(x, y) __builtin_islessgreater(x, y)
++# define isunordered(x, y) __builtin_isunordered(x, y)
++# else
++# define isgreater(x, y) \
++ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \
++ !isunordered (__x, __y) && __x > __y; }))
++# define isgreaterequal(x, y) \
++ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \
++ !isunordered (__x, __y) && __x >= __y; }))
++# define isless(x, y) \
++ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \
++ !isunordered (__x, __y) && __x < __y; }))
++# define islessequal(x, y) \
++ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \
++ !isunordered (__x, __y) && __x <= __y; }))
++# define islessgreater(x, y) \
++ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \
++ !isunordered (__x, __y) && __x != __y; }))
++/* isunordered must always check both operands first for signaling NaNs. */
++# define isunordered(x, y) \
++ (__extension__ ({ __typeof__ (x) __u = (x); __typeof__ (y) __v = (y); \
++ __u != __v && (__u != __u || __v != __v); }))
++# endif
+ #endif
+
+ /* Get machine-dependent inline versions (if there are any). */
+@@ -649,15 +710,17 @@ extern int matherr (struct exception *__
+ /* Include bits/math-finite.h for double. */
+ # define _Mdouble_ double
+ # define __MATH_DECLARING_DOUBLE 1
+-# define __MATH_DECLARING_LDOUBLE 0
+ # define __MATH_DECLARING_FLOATN 0
+-# define _MSUF_
++# define __REDIRFROM_X(function, reentrant) \
++ function ## reentrant
++# define __REDIRTO_X(function, reentrant) \
++ __ ## function ## reentrant ## _finite
+ # include <bits/math-finite.h>
+ # undef _Mdouble_
+ # undef __MATH_DECLARING_DOUBLE
+-# undef __MATH_DECLARING_LDOUBLE
+ # undef __MATH_DECLARING_FLOATN
+-# undef _MSUF_
++# undef __REDIRFROM_X
++# undef __REDIRTO_X
+
+ /* When __USE_ISOC99 is defined, include math-finite for float and
+ long double, as well. */
+@@ -666,29 +729,38 @@ extern int matherr (struct exception *__
+ /* Include bits/math-finite.h for float. */
+ # define _Mdouble_ float
+ # define __MATH_DECLARING_DOUBLE 0
+-# define __MATH_DECLARING_LDOUBLE 0
+ # define __MATH_DECLARING_FLOATN 0
+-# define _MSUF_ f
++# define __REDIRFROM_X(function, reentrant) \
++ function ## f ## reentrant
++# define __REDIRTO_X(function, reentrant) \
++ __ ## function ## f ## reentrant ## _finite
+ # include <bits/math-finite.h>
+ # undef _Mdouble_
+ # undef __MATH_DECLARING_DOUBLE
+-# undef __MATH_DECLARING_LDOUBLE
+ # undef __MATH_DECLARING_FLOATN
+-# undef _MSUF_
++# undef __REDIRFROM_X
++# undef __REDIRTO_X
+
+ /* Include bits/math-finite.h for long double. */
+ # ifdef __MATH_DECLARE_LDOUBLE
+ # define _Mdouble_ long double
+ # define __MATH_DECLARING_DOUBLE 0
+-# define __MATH_DECLARING_LDOUBLE 1
+ # define __MATH_DECLARING_FLOATN 0
+-# define _MSUF_ l
++# define __REDIRFROM_X(function, reentrant) \
++ function ## l ## reentrant
++# ifdef __NO_LONG_DOUBLE_MATH
++# define __REDIRTO_X(function, reentrant) \
++ __ ## function ## reentrant ## _finite
++# else
++# define __REDIRTO_X(function, reentrant) \
++ __ ## function ## l ## reentrant ## _finite
++# endif
+ # include <bits/math-finite.h>
+ # undef _Mdouble_
+ # undef __MATH_DECLARING_DOUBLE
+-# undef __MATH_DECLARING_LDOUBLE
+ # undef __MATH_DECLARING_FLOATN
+-# undef _MSUF_
++# undef __REDIRFROM_X
++# undef __REDIRTO_X
+ # endif
+
+ # endif /* __USE_ISOC99. */
+@@ -698,71 +770,25 @@ extern int matherr (struct exception *__
+ && __GLIBC_USE (IEC_60559_TYPES_EXT)
+ # define _Mdouble_ _Float128
+ # define __MATH_DECLARING_DOUBLE 0
+-# define __MATH_DECLARING_LDOUBLE 0
+ # define __MATH_DECLARING_FLOATN 1
+-# define _MSUF_ f128
++# define __REDIRFROM_X(function, reentrant) \
++ function ## f128 ## reentrant
++# if __HAVE_DISTINCT_FLOAT128
++# define __REDIRTO_X(function, reentrant) \
++ __ ## function ## f128 ## reentrant ## _finite
++# else
++# define __REDIRTO_X(function, reentrant) \
++ __ ## function ## l ## reentrant ## _finite
++# endif
+ # include <bits/math-finite.h>
+ # undef _Mdouble_
+ # undef __MATH_DECLARING_DOUBLE
+-# undef __MATH_DECLARING_LDOUBLE
+ # undef __MATH_DECLARING_FLOATN
+-# undef _MSUF_
++# undef __REDIRFROM_X
++# undef __REDIRTO_X
+ # endif
+ #endif /* __FINITE_MATH_ONLY__ > 0. */
+
+-#ifdef __USE_ISOC99
+-/* If we've still got undefined comparison macros, provide defaults. */
+-
+-/* Return nonzero value if X is greater than Y. */
+-# ifndef isgreater
+-# define isgreater(x, y) \
+- (__extension__ \
+- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+- !isunordered (__x, __y) && __x > __y; }))
+-# endif
+-
+-/* Return nonzero value if X is greater than or equal to Y. */
+-# ifndef isgreaterequal
+-# define isgreaterequal(x, y) \
+- (__extension__ \
+- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+- !isunordered (__x, __y) && __x >= __y; }))
+-# endif
+-
+-/* Return nonzero value if X is less than Y. */
+-# ifndef isless
+-# define isless(x, y) \
+- (__extension__ \
+- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+- !isunordered (__x, __y) && __x < __y; }))
+-# endif
+-
+-/* Return nonzero value if X is less than or equal to Y. */
+-# ifndef islessequal
+-# define islessequal(x, y) \
+- (__extension__ \
+- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+- !isunordered (__x, __y) && __x <= __y; }))
+-# endif
+-
+-/* Return nonzero value if either X is less than Y or Y is less than X. */
+-# ifndef islessgreater
+-# define islessgreater(x, y) \
+- (__extension__ \
+- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+- !isunordered (__x, __y) && (__x < __y || __y < __x); }))
+-# endif
+-
+-/* Return nonzero value if arguments are unordered. */
+-# ifndef isunordered
+-# define isunordered(u, v) \
+- (__extension__ \
+- ({ __typeof__(u) __u = (u); __typeof__(v) __v = (v); \
+- fpclassify (__u) == FP_NAN || fpclassify (__v) == FP_NAN; }))
+-# endif
+-
+-#endif
+-
+ #if __GLIBC_USE (IEC_60559_BFP_EXT)
+ /* An expression whose type has the widest of the evaluation formats
+ of X and Y (which are of floating-point types). */
+diff -purN glibc-org/math/math-svid-compat.h glibc-2.26/math/math-svid-compat.h
+--- glibc-org/math/math-svid-compat.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/math-svid-compat.h 2017-10-22 17:02:23.568967254 +0000
+@@ -0,0 +1,86 @@
++/* Declarations for SVID math error handling compatibility.
++ Copyright (C) 1991-2017 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/>. */
++
++#ifndef _MATH_SVID_COMPAT_H
++#define _MATH_SVID_COMPAT_H 1
++
++/* Support for various different standard error handling behaviors. */
++typedef enum
++{
++ _IEEE_ = -1, /* According to IEEE 754/IEEE 854. */
++ _SVID_, /* According to System V, release 4. */
++ _XOPEN_, /* Nowadays also Unix98. */
++ _POSIX_,
++ _ISOC_ /* Actually this is ISO C99. */
++} _LIB_VERSION_TYPE;
++
++/* This variable can be changed at run-time to any of the values above to
++ affect floating point error handling behavior (it may also be necessary
++ to change the hardware FPU exception settings). */
++extern _LIB_VERSION_TYPE _LIB_VERSION;
++
++/* In SVID error handling, `matherr' is called with this description
++ of the exceptional condition. */
++struct exception
++ {
++ int type;
++ char *name;
++ double arg1;
++ double arg2;
++ double retval;
++ };
++
++extern int matherr (struct exception *__exc);
++extern int __matherr (struct exception *__exc);
++
++#define X_TLOSS 1.41484755040568800000e+16
++
++/* Types of exceptions in the `type' field. */
++#define DOMAIN 1
++#define SING 2
++#define OVERFLOW 3
++#define UNDERFLOW 4
++#define TLOSS 5
++#define PLOSS 6
++
++/* SVID mode specifies returning this large value instead of infinity. */
++#define HUGE 3.40282347e+38F
++
++/* The above definitions may be used in testcases. The following code
++ is only used in the implementation. */
++
++#ifdef _LIBC
++/* fdlibm kernel function */
++extern double __kernel_standard (double, double, int);
++extern float __kernel_standard_f (float, float, int);
++extern long double __kernel_standard_l (long double, long double, int);
++
++# include <shlib-compat.h>
++# define LIBM_SVID_COMPAT SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
++# if LIBM_SVID_COMPAT
++compat_symbol_reference (libm, matherr, matherr, GLIBC_2_0);
++compat_symbol_reference (libm, _LIB_VERSION, _LIB_VERSION, GLIBC_2_0);
++# else
++/* Except when building compat code, optimize out references to
++ _LIB_VERSION and matherr. */
++# define _LIB_VERSION _POSIX_
++# define matherr(EXC) ((void) (EXC), 0)
++# endif
++#endif
++
++#endif /* math-svid-compat.h. */
+diff -purN glibc-org/math/s_asinhl.c glibc-2.26/math/s_asinhl.c
+--- glibc-org/math/s_asinhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_asinhl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__asinhl(long double x)
+-{
+- fputs ("__asinhl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-
+-weak_alias (__asinhl, asinhl)
+-stub_warning (asinhl)
+diff -purN glibc-org/math/s_atanl.c glibc-2.26/math/s_atanl.c
+--- glibc-org/math/s_atanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_atanl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__atanl (long double x)
+-{
+- fputs ("__atanl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-weak_alias (__atanl, atanl)
+-
+-stub_warning (atanl)
+diff -purN glibc-org/math/s_cacosh_template.c glibc-2.26/math/s_cacosh_template.c
+--- glibc-org/math/s_cacosh_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_cacosh_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -90,7 +90,3 @@ M_DECL_FUNC (__cacosh) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__cacosh, cacosh)
+-
+-#if M_LIBM_NEED_COMPAT (cacosh)
+-declare_mgen_libm_compat (__cacosh, cacosh)
+-#endif
+diff -purN glibc-org/math/s_cacos_template.c glibc-2.26/math/s_cacos_template.c
+--- glibc-org/math/s_cacos_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_cacos_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -53,7 +53,3 @@ M_DECL_FUNC (__cacos) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__cacos, cacos);
+-
+-#if M_LIBM_NEED_COMPAT (carg)
+-declare_mgen_libm_compat (__cacos, cacos)
+-#endif
+diff -purN glibc-org/math/s_casinh_template.c glibc-2.26/math/s_casinh_template.c
+--- glibc-org/math/s_casinh_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_casinh_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -69,7 +69,3 @@ M_DECL_FUNC (__casinh) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__casinh, casinh)
+-
+-#if M_LIBM_NEED_COMPAT (casinh)
+-declare_mgen_libm_compat (__casinh, casinh)
+-#endif
+diff -purN glibc-org/math/s_casin_template.c glibc-2.26/math/s_casin_template.c
+--- glibc-org/math/s_casin_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_casin_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -61,7 +61,3 @@ M_DECL_FUNC (__casin) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__casin, casin)
+-
+-#if M_LIBM_NEED_COMPAT (casin)
+-declare_mgen_libm_compat (__casin, casin)
+-#endif
+diff -purN glibc-org/math/s_catanh_template.c glibc-2.26/math/s_catanh_template.c
+--- glibc-org/math/s_catanh_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_catanh_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -133,7 +133,3 @@ M_DECL_FUNC (__catanh) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__catanh, catanh)
+-
+-#if M_LIBM_NEED_COMPAT (catanh)
+-declare_mgen_libm_compat (__catanh, catanh)
+-#endif
+diff -purN glibc-org/math/s_catan_template.c glibc-2.26/math/s_catan_template.c
+--- glibc-org/math/s_catan_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_catan_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -139,7 +139,3 @@ M_DECL_FUNC (__catan) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__catan, catan)
+-
+-#if M_LIBM_NEED_COMPAT (catan)
+-declare_mgen_libm_compat (__catan, catan)
+-#endif
+diff -purN glibc-org/math/s_cbrtl.c glibc-2.26/math/s_cbrtl.c
+--- glibc-org/math/s_cbrtl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_cbrtl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__cbrtl(long double x)
+-{
+- fputs ("__cbrtl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-
+-weak_alias (__cbrtl, cbrtl)
+-stub_warning (cbrtl)
+diff -purN glibc-org/math/s_ccosh_template.c glibc-2.26/math/s_ccosh_template.c
+--- glibc-org/math/s_ccosh_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_ccosh_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -135,7 +135,3 @@ M_DECL_FUNC (__ccosh) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__ccosh, ccosh);
+-
+-#if M_LIBM_NEED_COMPAT (carg)
+-declare_mgen_libm_compat (__ccosh, ccosh)
+-#endif
+diff -purN glibc-org/math/s_ccos_template.c glibc-2.26/math/s_ccos_template.c
+--- glibc-org/math/s_ccos_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_ccos_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -34,7 +34,3 @@ M_DECL_FUNC (__ccos) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__ccos, ccos);
+-
+-#if M_LIBM_NEED_COMPAT (carg)
+-declare_mgen_libm_compat (__ccos, ccos)
+-#endif
+diff -purN glibc-org/math/s_cexp_template.c glibc-2.26/math/s_cexp_template.c
+--- glibc-org/math/s_cexp_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_cexp_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -148,7 +148,3 @@ M_DECL_FUNC (__cexp) (CFLOAT x)
+ return retval;
+ }
+ declare_mgen_alias (__cexp, cexp)
+-
+-#if M_LIBM_NEED_COMPAT (cexp)
+-declare_mgen_libm_compat (__cexp, cexp)
+-#endif
+diff -purN glibc-org/math/s_clog10_template.c glibc-2.26/math/s_clog10_template.c
+--- glibc-org/math/s_clog10_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_clog10_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -120,9 +120,3 @@ M_DECL_FUNC (__clog10) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__clog10, clog10)
+-
+-#if M_LIBM_NEED_COMPAT (clog10)
+-/* __clog10 is also a public symbol. */
+-declare_mgen_libm_compat (__clog10, __clog10)
+-declare_mgen_libm_compat (clog10, clog10)
+-#endif
+diff -purN glibc-org/math/s_clog_template.c glibc-2.26/math/s_clog_template.c
+--- glibc-org/math/s_clog_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_clog_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -113,7 +113,3 @@ M_DECL_FUNC (__clog) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__clog, clog)
+-
+-#if M_LIBM_NEED_COMPAT (clog)
+-declare_mgen_libm_compat (__clog, clog)
+-#endif
+diff -purN glibc-org/math/s_cpow_template.c glibc-2.26/math/s_cpow_template.c
+--- glibc-org/math/s_cpow_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_cpow_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -27,7 +27,3 @@ M_DECL_FUNC (__cpow) (CFLOAT x, CFLOAT c
+ }
+
+ declare_mgen_alias (__cpow, cpow)
+-
+-#if M_LIBM_NEED_COMPAT (cpow)
+-declare_mgen_libm_compat (__cpow, cpow)
+-#endif
+diff -purN glibc-org/math/s_cproj_template.c glibc-2.26/math/s_cproj_template.c
+--- glibc-org/math/s_cproj_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_cproj_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -39,7 +39,3 @@ M_DECL_FUNC (__cproj) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__cproj, cproj)
+-
+-#if M_LIBM_NEED_COMPAT (cproj)
+-declare_mgen_libm_compat (__cproj, cproj)
+-#endif
+diff -purN glibc-org/math/s_csinh_template.c glibc-2.26/math/s_csinh_template.c
+--- glibc-org/math/s_csinh_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_csinh_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -154,7 +154,3 @@ M_DECL_FUNC (__csinh) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__csinh, csinh)
+-
+-#if M_LIBM_NEED_COMPAT (csinh)
+-declare_mgen_libm_compat (__csinh, csinh)
+-#endif
+diff -purN glibc-org/math/s_csin_template.c glibc-2.26/math/s_csin_template.c
+--- glibc-org/math/s_csin_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_csin_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -159,7 +159,3 @@ M_DECL_FUNC (__csin) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__csin, csin)
+-
+-#if M_LIBM_NEED_COMPAT (csin)
+-declare_mgen_libm_compat (__csin, csin)
+-#endif
+diff -purN glibc-org/math/s_csqrt_template.c glibc-2.26/math/s_csqrt_template.c
+--- glibc-org/math/s_csqrt_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_csqrt_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -158,7 +158,3 @@ M_DECL_FUNC (__csqrt) (CFLOAT x)
+ return res;
+ }
+ declare_mgen_alias (__csqrt, csqrt)
+-
+-#if M_LIBM_NEED_COMPAT (csqrt)
+-declare_mgen_libm_compat (__csqrt, csqrt)
+-#endif
+diff -purN glibc-org/math/s_ctanh_template.c glibc-2.26/math/s_ctanh_template.c
+--- glibc-org/math/s_ctanh_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_ctanh_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -124,7 +124,3 @@ M_DECL_FUNC (__ctanh) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__ctanh, ctanh)
+-
+-#if M_LIBM_NEED_COMPAT (ctanh)
+-declare_mgen_libm_compat (__ctanh, ctanh)
+-#endif
+diff -purN glibc-org/math/s_ctan_template.c glibc-2.26/math/s_ctan_template.c
+--- glibc-org/math/s_ctan_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_ctan_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -124,7 +124,3 @@ M_DECL_FUNC (__ctan) (CFLOAT x)
+ }
+
+ declare_mgen_alias (__ctan, ctan)
+-
+-#if M_LIBM_NEED_COMPAT (ctan)
+-declare_mgen_libm_compat (__ctan, ctan)
+-#endif
+diff -purN glibc-org/math/s_erfl.c glibc-2.26/math/s_erfl.c
+--- glibc-org/math/s_erfl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_erfl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,25 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__erfl (long double x)
+-{
+- fputs ("__erfl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-weak_alias (__erfl, erfl)
+-
+-stub_warning (erfl)
+-
+-long double
+-__erfcl (long double x)
+-{
+- fputs ("__erfcl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-weak_alias (__erfcl, erfcl)
+-
+-stub_warning (erfcl)
+diff -purN glibc-org/math/s_expm1l.c glibc-2.26/math/s_expm1l.c
+--- glibc-org/math/s_expm1l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_expm1l.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,15 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__expm1l (long double x)
+-{
+- fputs ("__expm1l not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-libm_hidden_def (__expm1l)
+-weak_alias (__expm1l, expm1l)
+-
+-stub_warning (expm1l)
+diff -purN glibc-org/math/s_fdim_template.c glibc-2.26/math/s_fdim_template.c
+--- glibc-org/math/s_fdim_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_fdim_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -34,7 +34,3 @@ M_DECL_FUNC (__fdim) (FLOAT x, FLOAT y)
+ return r;
+ }
+ declare_mgen_alias (__fdim, fdim);
+-
+-#if M_LIBM_NEED_COMPAT (fdim)
+-declare_mgen_libm_compat (__fdim, fdim)
+-#endif
+diff -purN glibc-org/math/s_fma.c glibc-2.26/math/s_fma.c
+--- glibc-org/math/s_fma.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_fma.c 2017-10-22 17:02:23.569967254 +0000
+@@ -18,6 +18,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <math.h>
++#include <libm-alias-double.h>
+
+ double
+ __fma (double x, double y, double z)
+@@ -25,10 +26,5 @@ __fma (double x, double y, double z)
+ return (x * y) + z;
+ }
+ #ifndef __fma
+-weak_alias (__fma, fma)
+-#endif
+-
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__fma, __fmal)
+-weak_alias (__fmal, fmal)
++libm_alias_double (__fma, fma)
+ #endif
+diff -purN glibc-org/math/s_fmaf.c glibc-2.26/math/s_fmaf.c
+--- glibc-org/math/s_fmaf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_fmaf.c 2017-10-22 17:02:23.569967254 +0000
+@@ -18,6 +18,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <math.h>
++#include <libm-alias-float.h>
+
+ float
+ __fmaf (float x, float y, float z)
+@@ -25,5 +26,5 @@ __fmaf (float x, float y, float z)
+ return (x * y) + z;
+ }
+ #ifndef __fmaf
+-weak_alias (__fmaf, fmaf)
++libm_alias_float (__fma, fma)
+ #endif
+diff -purN glibc-org/math/s_fmal.c glibc-2.26/math/s_fmal.c
+--- glibc-org/math/s_fmal.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_fmal.c 2017-10-22 17:02:23.569967254 +0000
+@@ -18,10 +18,11 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <math.h>
++#include <libm-alias-ldouble.h>
+
+ long double
+ __fmal (long double x, long double y, long double z)
+ {
+ return (x * y) + z;
+ }
+-weak_alias (__fmal, fmal)
++libm_alias_ldouble (__fma, fma)
+diff -purN glibc-org/math/s_fmax_template.c glibc-2.26/math/s_fmax_template.c
+--- glibc-org/math/s_fmax_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_fmax_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -33,7 +33,3 @@ M_DECL_FUNC (__fmax) (FLOAT x, FLOAT y)
+ }
+
+ declare_mgen_alias (__fmax, fmax);
+-
+-#if M_LIBM_NEED_COMPAT (fmax)
+-declare_mgen_libm_compat (__fmax, fmax)
+-#endif
+diff -purN glibc-org/math/s_fmin_template.c glibc-2.26/math/s_fmin_template.c
+--- glibc-org/math/s_fmin_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_fmin_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -33,7 +33,3 @@ M_DECL_FUNC (__fmin) (FLOAT x, FLOAT y)
+ return isnan (y) ? x : y;
+ }
+ declare_mgen_alias (__fmin, fmin);
+-
+-#if M_LIBM_NEED_COMPAT (fmin)
+-declare_mgen_libm_compat (__fmin, fmin)
+-#endif
+diff -purN glibc-org/math/s_ldexp_template.c glibc-2.26/math/s_ldexp_template.c
+--- glibc-org/math/s_ldexp_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_ldexp_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -27,6 +27,8 @@ M_SUF (__ldexp) (FLOAT value, int exp)
+ return value;
+ }
+
+-declare_mgen_alias_2 (__ldexp, ldexp, scalbn);
++declare_mgen_alias (__ldexp, ldexp)
++strong_alias (M_SUF (__ldexp), M_SUF (__wrap_scalbn))
++declare_mgen_alias (__wrap_scalbn, scalbn)
+
+ /* Note, versioning issues are punted to ldbl-opt in this case. */
+diff -purN glibc-org/math/s_log1pl.c glibc-2.26/math/s_log1pl.c
+--- glibc-org/math/s_log1pl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_log1pl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,13 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__log1pl (long double x)
+-{
+- fputs ("__log1pl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-
+-stub_warning (log1pl)
+diff -purN glibc-org/math/s_nan_template.c glibc-2.26/math/s_nan_template.c
+--- glibc-org/math/s_nan_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_nan_template.c 2017-10-22 17:02:23.569967254 +0000
+@@ -31,7 +31,3 @@ M_DECL_FUNC (__nan) (const char *tagp)
+ }
+
+ declare_mgen_alias (__nan, nan)
+-
+-#if M_LIBM_NEED_COMPAT (nan)
+-declare_mgen_libm_compat (__nan, nan)
+-#endif
+diff -purN glibc-org/math/s_nextafter.c glibc-2.26/math/s_nextafter.c
+--- glibc-org/math/s_nextafter.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_nextafter.c 2017-10-22 17:02:23.569967254 +0000
+@@ -29,11 +29,12 @@ static char rcsid[] = "$NetBSD: s_nextaf
+ #include <math.h>
+ #include <math_private.h>
+ #include <float.h>
++#include <libm-alias-double.h>
+
+ double __nextafter(double x, double y)
+ {
+ int32_t hx,hy,ix,iy;
+- u_int32_t lx,ly;
++ uint32_t lx,ly;
+
+ EXTRACT_WORDS(hx,lx,x);
+ EXTRACT_WORDS(hy,ly,y);
+@@ -83,10 +84,8 @@ double __nextafter(double x, double y)
+ INSERT_WORDS(x,hx,lx);
+ return x;
+ }
+-weak_alias (__nextafter, nextafter)
++libm_alias_double (__nextafter, nextafter)
+ #ifdef NO_LONG_DOUBLE
+-strong_alias (__nextafter, __nextafterl)
+-weak_alias (__nextafter, nextafterl)
+ strong_alias (__nextafter, __nexttowardl)
+ weak_alias (__nexttowardl, nexttowardl)
+ #undef __nexttoward
+diff -purN glibc-org/math/s_nexttowardf.c glibc-2.26/math/s_nexttowardf.c
+--- glibc-org/math/s_nexttowardf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_nexttowardf.c 2017-10-22 17:02:23.569967254 +0000
+@@ -28,7 +28,7 @@
+ float __nexttowardf(float x, long double y)
+ {
+ int32_t hx,hy,ix,iy;
+- u_int32_t ly;
++ uint32_t ly;
+
+ GET_FLOAT_WORD(hx,x);
+ EXTRACT_WORDS(hy,ly,y);
+@@ -41,7 +41,7 @@ float __nexttowardf(float x, long double
+ if((long double) x==y) return y; /* x=y, return y */
+ if(ix==0) { /* x == 0 */
+ float u;
+- SET_FLOAT_WORD(x,(u_int32_t)(hy&0x80000000)|1);/* return +-minsub*/
++ SET_FLOAT_WORD(x,(uint32_t)(hy&0x80000000)|1);/* return +-minsub*/
+ u = math_opt_barrier (x);
+ u = u * u;
+ math_force_eval (u); /* raise underflow flag */
+diff -purN glibc-org/math/s_tanhl.c glibc-2.26/math/s_tanhl.c
+--- glibc-org/math/s_tanhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/s_tanhl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,14 +0,0 @@
+-#include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
+-
+-long double
+-__tanhl(long double x)
+-{
+- fputs ("__tanhl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
+-
+-weak_alias (__tanhl, tanhl)
+-stub_warning (tanhl)
+diff -purN glibc-org/math/test-double.h glibc-2.26/math/test-double.h
+--- glibc-org/math/test-double.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/test-double.h 2017-10-22 17:02:23.569967254 +0000
+@@ -23,6 +23,8 @@
+ #define PREFIX DBL
+ #define LIT(x) (x)
+ #define TYPE_STR "double"
++#define ULP_IDX ULP_DBL
++#define ULP_I_IDX ULP_I_DBL
+ #define LITM(x) x
+ #define FTOSTR strfromd
+ #define snan_value_MACRO SNAN
+diff -purN glibc-org/math/test-finite-macros.c glibc-2.26/math/test-finite-macros.c
+--- glibc-org/math/test-finite-macros.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/test-finite-macros.c 2017-10-22 17:02:23.569967254 +0000
+@@ -0,0 +1,35 @@
++/* Test finite-math-only code does not conflict with user macros (bug 22028).
++ Copyright (C) 2017 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/>. */
++
++/* The main test is that the inclusion of <math.h> compiles. */
++#define f first test macro
++#define l second test macro
++#define f128 third test macro
++
++#include <math.h>
++
++volatile float a, b;
++
++static int
++do_test (void)
++{
++ b = acosf (a);
++ return 0;
++}
++
++#include <support/test-driver.c>
+diff -purN glibc-org/math/test-float128.h glibc-2.26/math/test-float128.h
+--- glibc-org/math/test-float128.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/test-float128.h 2017-10-22 17:02:23.569967254 +0000
+@@ -28,7 +28,15 @@
+ #define CFLOAT __CFLOAT128
+ #define BUILD_COMPLEX(real, imag) (CMPLXF128 ((real), (imag)))
+ #define PREFIX FLT128
+-#define TYPE_STR "float128"
++#if FLT128_MANT_DIG == LDBL_MANT_DIG
++# define TYPE_STR "ldouble"
++# define ULP_IDX ULP_LDBL
++# define ULP_I_IDX ULP_I_LDBL
++#else
++# define TYPE_STR "float128"
++# define ULP_IDX ULP_FLT128
++# define ULP_I_IDX ULP_I_FLT128
++#endif
+ #define LIT(x) __f128 (x)
+ #define LITM(x) x ## f128
+ #define FTOSTR strfromf128
+diff -purN glibc-org/math/test-float.h glibc-2.26/math/test-float.h
+--- glibc-org/math/test-float.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/test-float.h 2017-10-22 17:02:23.569967254 +0000
+@@ -22,6 +22,8 @@
+ #define BUILD_COMPLEX(real, imag) (CMPLXF ((real), (imag)))
+ #define PREFIX FLT
+ #define TYPE_STR "float"
++#define ULP_IDX ULP_FLT
++#define ULP_I_IDX ULP_I_FLT
+ #define LIT(x) (x ## f)
+ /* Use the double variants of macro constants. */
+ #define LITM(x) x
+diff -purN glibc-org/math/test-ldouble.h glibc-2.26/math/test-ldouble.h
+--- glibc-org/math/test-ldouble.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/test-ldouble.h 2017-10-22 17:02:23.569967254 +0000
+@@ -16,12 +16,22 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include <float.h>
++
+ #define FUNC(function) function##l
+ #define FLOAT long double
+ #define CFLOAT __complex__ long double
+ #define BUILD_COMPLEX(real, imag) (CMPLXL ((real), (imag)))
+ #define PREFIX LDBL
+-#define TYPE_STR "ldouble"
++#if LDBL_MANT_DIG == DBL_MANT_DIG
++# define TYPE_STR "double"
++# define ULP_IDX ULP_DBL
++# define ULP_I_IDX ULP_I_DBL
++#else
++# define TYPE_STR "ldouble"
++# define ULP_IDX ULP_LDBL
++# define ULP_I_IDX ULP_I_LDBL
++#endif
+ #define LIT(x) (x ## L)
+ #define LITM(x) x ## l
+ #define FTOSTR strfroml
+diff -purN glibc-org/math/test-math-cxx11.cc glibc-2.26/math/test-math-cxx11.cc
+--- glibc-org/math/test-math-cxx11.cc 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/test-math-cxx11.cc 2017-10-22 17:02:23.569967254 +0000
+@@ -0,0 +1,160 @@
++/* Test C99 math functions are available in C++11 without _GNU_SOURCE.
++ Copyright (C) 2017 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/>. */
++
++#undef _GNU_SOURCE
++#undef _DEFAULT_SOURCE
++#undef _XOPEN_SOURCE
++#undef _POSIX_SOURCE
++#undef _POSIX_C_SOURCE
++// __STRICT_ANSI__ gets defined by -std=c++11 in CFLAGS
++#include <math.h>
++#include <stdio.h>
++
++static int
++do_test (void)
++{
++#ifdef _GNU_SOURCE
++ printf ("FAIL: _GNU_SOURCE is defined.\n");
++ return 1;
++#endif
++
++#if __cplusplus >= 201103L
++ /* Verify that C11 math functions and types are defined for C++11,
++ without _GNU_SOURCE being defined. [BZ #21326] */
++ (void) FP_INFINITE;
++ (void) FP_NAN;
++ (void) FP_NORMAL;
++ (void) FP_SUBNORMAL;
++ (void) FP_ZERO;
++ double_t d = 1.0;
++ (void) d;
++ float_t f = 1.0f;
++ (void) f;
++ (void) acosh;
++ (void) acoshf;
++ (void) acoshl;
++ (void) asinh;
++ (void) asinhf;
++ (void) asinhl;
++ (void) atanh;
++ (void) atanhf;
++ (void) atanhl;
++ (void) cbrt;
++ (void) cbrtf;
++ (void) cbrtl;
++ (void) copysign;
++ (void) copysignf;
++ (void) copysignl;
++ (void) erf;
++ (void) erff;
++ (void) erfl;
++ (void) erfc;
++ (void) erfcf;
++ (void) erfcl;
++ (void) exp2;
++ (void) exp2f;
++ (void) exp2l;
++ (void) expm1;
++ (void) expm1f;
++ (void) expm1l;
++ (void) fdim;
++ (void) fdimf;
++ (void) fdiml;
++ (void) fma;
++ (void) fmaf;
++ (void) fmal;
++ (void) fmax;
++ (void) fmaxf;
++ (void) fmaxl;
++ (void) fmin;
++ (void) fminf;
++ (void) fminl;
++ (void) hypot;
++ (void) hypotf;
++ (void) hypotl;
++ (void) ilogb;
++ (void) ilogbf;
++ (void) ilogbl;
++ (void) lgamma;
++ (void) lgammaf;
++ (void) lgammal;
++ (void) llrint;
++ (void) llrintf;
++ (void) llrintl;
++ (void) llround;
++ (void) llroundf;
++ (void) llroundl;
++ (void) log1p;
++ (void) log1pf;
++ (void) log1pl;
++ (void) log2;
++ (void) log2f;
++ (void) log2l;
++ (void) logb;
++ (void) logbf;
++ (void) logbl;
++ (void) lrint;
++ (void) lrintf;
++ (void) lrintl;
++ (void) lround;
++ (void) lroundf;
++ (void) lroundl;
++ (void) nan;
++ (void) nanf;
++ (void) nanl;
++ (void) nearbyint;
++ (void) nearbyintf;
++ (void) nearbyintl;
++ (void) nextafter;
++ (void) nextafterf;
++ (void) nextafterl;
++ (void) nexttoward;
++ (void) nexttowardf;
++ (void) nexttowardl;
++ (void) remainder;
++ (void) remainderf;
++ (void) remainderl;
++ (void) remquo;
++ (void) remquof;
++ (void) remquol;
++ (void) rint;
++ (void) rintf;
++ (void) rintl;
++ (void) round;
++ (void) roundf;
++ (void) roundl;
++ (void) scalbln;
++ (void) scalblnf;
++ (void) scalblnl;
++ (void) scalbn;
++ (void) scalbnf;
++ (void) scalbnl;
++ (void) tgamma;
++ (void) tgammaf;
++ (void) tgammal;
++ (void) trunc;
++ (void) truncf;
++ (void) truncl;
++ printf ("PASS: C11 math functions present in C++11 without _GNU_SOURCE.\n");
++#else
++ printf ("UNSUPPORTED: C++11 not enabled.\n");
++#endif
++ return 0;
++}
++
++#include <support/test-driver.c>
+diff -purN glibc-org/math/test-matherr-2.c glibc-2.26/math/test-matherr-2.c
+--- glibc-org/math/test-matherr-2.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/test-matherr-2.c 2017-10-22 17:02:23.569967254 +0000
+@@ -0,0 +1,59 @@
++/* Test matherr (compat symbols, binary defines own _LIB_VERSION).
++ Copyright (C) 1997-2017 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 <stdio.h>
++#include <stdlib.h>
++
++#include <math-svid-compat.h>
++#include <shlib-compat.h>
++
++#if TEST_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
++
++# undef matherr
++# undef _LIB_VERSION
++compat_symbol_reference (libm, matherr, matherr, GLIBC_2_0);
++compat_symbol_reference (libm, _LIB_VERSION, _LIB_VERSION, GLIBC_2_0);
++
++_LIB_VERSION_TYPE _LIB_VERSION = _SVID_;
++
++static int fail = 1;
++
++int
++matherr (struct exception *s)
++{
++ printf ("matherr is working\n");
++ fail = 0;
++ return 1;
++}
++
++static int
++do_test (void)
++{
++ acos (2.0);
++ return fail;
++}
++#else
++static int
++do_test (void)
++{
++ return 77;
++}
++#endif
++
++#include <support/test-driver.c>
+diff -purN glibc-org/math/test-matherr-3.c glibc-2.26/math/test-matherr-3.c
+--- glibc-org/math/test-matherr-3.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/test-matherr-3.c 2017-10-22 17:02:23.569967254 +0000
+@@ -0,0 +1,44 @@
++/* Test matherr not supported for new binaries.
++ Copyright (C) 1997-2017 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 <stdio.h>
++#include <stdlib.h>
++
++#include <math-svid-compat.h>
++
++_LIB_VERSION_TYPE _LIB_VERSION = _SVID_;
++
++static int fail = 0;
++
++int
++matherr (struct exception *s)
++{
++ printf ("matherr is working, but should not be\n");
++ fail = 1;
++ return 1;
++}
++
++static int
++do_test (void)
++{
++ acos (2.0);
++ return fail;
++}
++
++#include <support/test-driver.c>
+diff -purN glibc-org/math/test-matherr.c glibc-2.26/math/test-matherr.c
+--- glibc-org/math/test-matherr.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/test-matherr.c 2017-10-22 17:02:23.569967254 +0000
+@@ -1,7 +1,35 @@
++/* Test matherr (compat symbols, binary modifies library's _LIB_VERSION).
++ Copyright (C) 1997-2017 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 <stdio.h>
+ #include <stdlib.h>
+
++#include <math-svid-compat.h>
++#include <shlib-compat.h>
++
++#if TEST_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
++
++# undef matherr
++# undef _LIB_VERSION
++compat_symbol_reference (libm, matherr, matherr, GLIBC_2_0);
++compat_symbol_reference (libm, _LIB_VERSION, _LIB_VERSION, GLIBC_2_0);
++
+ static int fail = 1;
+
+ int
+@@ -19,6 +47,12 @@ do_test (void)
+ acos (2.0);
+ return fail;
+ }
++#else
++static int
++do_test (void)
++{
++ return 77;
++}
++#endif
+
+-#define TEST_FUNCTION do_test ()
+-#include "../test-skeleton.c"
++#include <support/test-driver.c>
+diff -purN glibc-org/math/test-math-iscanonical.cc glibc-2.26/math/test-math-iscanonical.cc
+--- glibc-org/math/test-math-iscanonical.cc 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/test-math-iscanonical.cc 2017-10-22 17:02:23.569967254 +0000
+@@ -0,0 +1,48 @@
++/* Test for the C++ implementation of iscanonical.
++ Copyright (C) 2017 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/>. */
++
++#define _GNU_SOURCE 1
++#include <math.h>
++#include <stdio.h>
++
++static int errors;
++
++template <class T>
++static void
++check_type ()
++{
++ T val = 0;
++
++ /* Check if iscanonical is available in C++ mode (bug 22235). */
++ if (iscanonical (val) == 0)
++ errors++;
++}
++
++static int
++do_test (void)
++{
++ check_type<float> ();
++ check_type<double> ();
++ check_type<long double> ();
++#if __HAVE_DISTINCT_FLOAT128
++ check_type<_Float128> ();
++#endif
++ return errors != 0;
++}
++
++#include <support/test-driver.c>
+diff -purN glibc-org/math/test-math-issignaling.cc glibc-2.26/math/test-math-issignaling.cc
+--- glibc-org/math/test-math-issignaling.cc 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/test-math-issignaling.cc 2017-10-22 17:02:23.569967254 +0000
+@@ -0,0 +1,113 @@
++/* Test for the C++ implementation of issignaling.
++ Copyright (C) 2017 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/>. */
++
++#define _GNU_SOURCE 1
++#include <math.h>
++#include <stdio.h>
++
++#include <limits>
++
++/* There is no signaling_NaN for _Float128 in std::numeric_limits.
++ Include ieee754_float128.h and use the bitfields in the union
++ ieee854_float128.ieee_nan to build a signaling NaN. */
++#if __HAVE_DISTINCT_FLOAT128
++# include <ieee754_float128.h>
++#endif
++
++static bool errors;
++
++static void
++check (int actual, int expected, const char *actual_expr, int line)
++{
++ if (actual != expected)
++ {
++ errors = true;
++ printf ("%s:%d: error: %s\n", __FILE__, line, actual_expr);
++ printf ("%s:%d: expected: %d\n", __FILE__, line, expected);
++ printf ("%s:%d: actual: %d\n", __FILE__, line, actual);
++ }
++}
++
++#define CHECK(actual, expected) \
++ check ((actual), (expected), #actual, __LINE__)
++
++template <class T>
++static void
++check_type ()
++{
++ typedef std::numeric_limits<T> limits;
++ CHECK (issignaling (T{0}), 0);
++ if (limits::has_infinity)
++ {
++ CHECK (issignaling (limits::infinity ()), 0);
++ CHECK (issignaling (-limits::infinity ()), 0);
++ }
++ if (limits::has_quiet_NaN)
++ CHECK (issignaling (limits::quiet_NaN ()), 0);
++ if (limits::has_signaling_NaN)
++ CHECK (issignaling (limits::signaling_NaN ()), 1);
++}
++
++#if __HAVE_DISTINCT_FLOAT128
++static void
++check_float128 ()
++{
++ ieee854_float128 q;
++
++ q.d = 0;
++ CHECK (issignaling (q.d), 0);
++
++ /* Infinity. */
++ q.ieee.negative = 0;
++ q.ieee.exponent = 0x7FFF;
++ q.ieee.mantissa0 = 0x0000;
++ q.ieee.mantissa1 = 0x00000000;
++ q.ieee.mantissa2 = 0x00000000;
++ q.ieee.mantissa3 = 0x00000000;
++ CHECK (issignaling (q.d), 0);
++
++ /* Quiet NaN. */
++ q.ieee_nan.quiet_nan = 1;
++ q.ieee_nan.mantissa0 = 0x0000;
++ CHECK (issignaling (q.d), 0);
++
++ /* Still a quiet NaN. */
++ q.ieee_nan.quiet_nan = 1;
++ q.ieee_nan.mantissa0 = 0x4000;
++ CHECK (issignaling (q.d), 0);
++
++ /* Signaling NaN. */
++ q.ieee_nan.quiet_nan = 0;
++ q.ieee_nan.mantissa0 = 0x4000;
++ CHECK (issignaling (q.d), 1);
++}
++#endif
++
++static int
++do_test (void)
++{
++ check_type<float> ();
++ check_type<double> ();
++ check_type<long double> ();
++#if __HAVE_DISTINCT_FLOAT128
++ check_float128 ();
++#endif
++ return errors;
++}
++
++#include <support/test-driver.c>
+diff -purN glibc-org/math/test-math-iszero.cc glibc-2.26/math/test-math-iszero.cc
+--- glibc-org/math/test-math-iszero.cc 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/test-math-iszero.cc 2017-10-22 17:02:23.569967254 +0000
+@@ -22,6 +22,13 @@
+
+ #include <limits>
+
++/* Support for _Float128 in std::numeric_limits is limited.
++ Include ieee754_float128.h and use the bitfields in the union
++ ieee854_float128.ieee_nan to build corner-case inputs. */
++#if __HAVE_DISTINCT_FLOAT128
++# include <ieee754_float128.h>
++#endif
++
+ static bool errors;
+
+ static void
+@@ -72,12 +79,84 @@ check_type ()
+ std::numeric_limits<T>::has_denorm == std::denorm_absent);
+ }
+
++#if __HAVE_DISTINCT_FLOAT128
++static void
++check_float128 ()
++{
++ ieee854_float128 q;
++
++ q.d = 0.0Q;
++ CHECK (iszero (q.d), 1);
++ q.d = -0.0Q;
++ CHECK (iszero (q.d), 1);
++ q.d = 1.0Q;
++ CHECK (iszero (q.d), 0);
++ q.d = -1.0Q;
++ CHECK (iszero (q.d), 0);
++
++ /* Normal min. */
++ q.ieee.negative = 0;
++ q.ieee.exponent = 0x0001;
++ q.ieee.mantissa0 = 0x0000;
++ q.ieee.mantissa1 = 0x00000000;
++ q.ieee.mantissa2 = 0x00000000;
++ q.ieee.mantissa3 = 0x00000000;
++ CHECK (iszero (q.d), 0);
++ q.ieee.negative = 1;
++ CHECK (iszero (q.d), 0);
++
++ /* Normal max. */
++ q.ieee.negative = 0;
++ q.ieee.exponent = 0x7FFE;
++ q.ieee.mantissa0 = 0xFFFF;
++ q.ieee.mantissa1 = 0xFFFFFFFF;
++ q.ieee.mantissa2 = 0xFFFFFFFF;
++ q.ieee.mantissa3 = 0xFFFFFFFF;
++ CHECK (iszero (q.d), 0);
++ q.ieee.negative = 1;
++ CHECK (iszero (q.d), 0);
++
++ /* Infinity. */
++ q.ieee.negative = 0;
++ q.ieee.exponent = 0x7FFF;
++ q.ieee.mantissa0 = 0x0000;
++ q.ieee.mantissa1 = 0x00000000;
++ q.ieee.mantissa2 = 0x00000000;
++ q.ieee.mantissa3 = 0x00000000;
++ CHECK (iszero (q.d), 0);
++
++ /* Quiet NaN. */
++ q.ieee_nan.quiet_nan = 1;
++ q.ieee_nan.mantissa0 = 0x0000;
++ CHECK (iszero (q.d), 0);
++
++ /* Signaling NaN. */
++ q.ieee_nan.quiet_nan = 0;
++ q.ieee_nan.mantissa0 = 0x4000;
++ CHECK (iszero (q.d), 0);
++
++ /* Denormal min. */
++ q.ieee.negative = 0;
++ q.ieee.exponent = 0x0000;
++ q.ieee.mantissa0 = 0x0000;
++ q.ieee.mantissa1 = 0x00000000;
++ q.ieee.mantissa2 = 0x00000000;
++ q.ieee.mantissa3 = 0x00000001;
++ CHECK (iszero (q.d), 0);
++ q.ieee.negative = 1;
++ CHECK (iszero (q.d), 0);
++}
++#endif
++
+ static int
+ do_test (void)
+ {
+ check_type<float> ();
+ check_type<double> ();
+ check_type<long double> ();
++#if __HAVE_DISTINCT_FLOAT128
++ check_float128 ();
++#endif
+ return errors;
+ }
+
+diff -purN glibc-org/math/tgmath.h glibc-2.26/math/tgmath.h
+--- glibc-org/math/tgmath.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/tgmath.h 2017-10-22 17:02:23.570967253 +0000
+@@ -48,38 +48,83 @@
+ /* This is ugly but unless gcc gets appropriate builtins we have to do
+ something like this. Don't ask how it works. */
+
+-/* 1 if 'type' is a floating type, 0 if 'type' is an integer type.
+- Allows for _Bool. Expands to an integer constant expression. */
++/* __floating_type expands to 1 if TYPE is a floating type (including
++ complex floating types), 0 if TYPE is an integer type (including
++ complex integer types). __real_integer_type expands to 1 if TYPE
++ is a real integer type. __complex_integer_type expands to 1 if
++ TYPE is a complex integer type. All these macros expand to integer
++ constant expressions. All these macros can assume their argument
++ has an arithmetic type (not vector, decimal floating-point or
++ fixed-point), valid to pass to tgmath.h macros. */
+ # if __GNUC_PREREQ (3, 1)
+-# define __floating_type(type) \
+- (__builtin_classify_type ((type) 0) == 8 \
+- || (__builtin_classify_type ((type) 0) == 9 \
+- && __builtin_classify_type (__real__ ((type) 0)) == 8))
++/* __builtin_classify_type expands to an integer constant expression
++ in GCC 3.1 and later. Default conversions applied to the argument
++ of __builtin_classify_type mean it always returns 1 for real
++ integer types rather than ever returning different values for
++ character, boolean or enumerated types. */
++# define __floating_type(type) \
++ (__builtin_classify_type (__real__ ((type) 0)) == 8)
++# define __real_integer_type(type) \
++ (__builtin_classify_type ((type) 0) == 1)
++# define __complex_integer_type(type) \
++ (__builtin_classify_type ((type) 0) == 9 \
++ && __builtin_classify_type (__real__ ((type) 0)) == 1)
+ # else
+-# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))
++/* GCC versions predating __builtin_classify_type are also looser on
++ what counts as an integer constant expression. */
++# define __floating_type(type) (((type) 1.25) != 1)
++# define __real_integer_type(type) (((type) (1.25 + _Complex_I)) == 1)
++# define __complex_integer_type(type) \
++ (((type) (1.25 + _Complex_I)) == (1 + _Complex_I))
+ # endif
+
+-/* The tgmath real type for T, where E is 0 if T is an integer type and
+- 1 for a floating type. */
++/* Whether an expression (of arithmetic type) has a real type. */
++# define __expr_is_real(E) (__builtin_classify_type (E) != 9)
++
++/* The tgmath real type for T, where E is 0 if T is an integer type
++ and 1 for a floating type. If T has a complex type, it is
++ unspecified whether the return type is real or complex (but it has
++ the correct corresponding real type). */
+ # define __tgmath_real_type_sub(T, E) \
+ __typeof__ (*(0 ? (__typeof__ (0 ? (double *) 0 : (void *) (E))) 0 \
+ : (__typeof__ (0 ? (T *) 0 : (void *) (!(E)))) 0))
+
+ /* The tgmath real type of EXPR. */
+ # define __tgmath_real_type(expr) \
+- __tgmath_real_type_sub (__typeof__ ((__typeof__ (expr)) 0), \
+- __floating_type (__typeof__ (expr)))
++ __tgmath_real_type_sub (__typeof__ ((__typeof__ (+(expr))) 0), \
++ __floating_type (__typeof__ (+(expr))))
++
++/* The tgmath complex type for T, where E1 is 1 if T has a floating
++ type and 0 otherwise, E2 is 1 if T has a real integer type and 0
++ otherwise, and E3 is 1 if T has a complex type and 0 otherwise. */
++# define __tgmath_complex_type_sub(T, E1, E2, E3) \
++ __typeof__ (*(0 \
++ ? (__typeof__ (0 ? (T *) 0 : (void *) (!(E1)))) 0 \
++ : (__typeof__ (0 \
++ ? (__typeof__ (0 \
++ ? (double *) 0 \
++ : (void *) (!(E2)))) 0 \
++ : (__typeof__ (0 \
++ ? (_Complex double *) 0 \
++ : (void *) (!(E3)))) 0)) 0))
++
++/* The tgmath complex type of EXPR. */
++# define __tgmath_complex_type(expr) \
++ __tgmath_complex_type_sub (__typeof__ ((__typeof__ (+(expr))) 0), \
++ __floating_type (__typeof__ (+(expr))), \
++ __real_integer_type (__typeof__ (+(expr))), \
++ __complex_integer_type (__typeof__ (+(expr))))
+
+ /* Expand to text that checks if ARG_COMB has type _Float128, and if
+ so calls the appropriately suffixed FCT (which may include a cast),
+ or FCT and CFCT for complex functions, with arguments ARG_CALL. */
+-# if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
++# if __HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+ # define __TGMATH_F128(arg_comb, fct, arg_call) \
+- __builtin_types_compatible_p (__typeof (arg_comb), _Float128) \
++ __builtin_types_compatible_p (__typeof (+(arg_comb)), _Float128) \
+ ? fct ## f128 arg_call :
+ # define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) \
+- __builtin_types_compatible_p (__typeof (__real__ (arg_comb)), _Float128) \
+- ? (sizeof (__real__ (arg_comb)) == sizeof (arg_comb) \
++ __builtin_types_compatible_p (__typeof (+__real__ (arg_comb)), _Float128) \
++ ? (__expr_is_real (arg_comb) \
+ ? fct ## f128 arg_call \
+ : cfct ## f128 arg_call) :
+ # else
+@@ -92,45 +137,44 @@
+ only defined on real valued parameters and those which are defined
+ for complex functions as well. */
+ # define __TGMATH_UNARY_REAL_ONLY(Val, Fct) \
+- (__extension__ ((sizeof (Val) == sizeof (double) \
++ (__extension__ ((sizeof (+(Val)) == sizeof (double) \
+ || __builtin_classify_type (Val) != 8) \
+ ? (__tgmath_real_type (Val)) Fct (Val) \
+- : (sizeof (Val) == sizeof (float)) \
++ : (sizeof (+(Val)) == sizeof (float)) \
+ ? (__tgmath_real_type (Val)) Fct##f (Val) \
+ : __TGMATH_F128 ((Val), (__tgmath_real_type (Val)) Fct, \
+ (Val)) \
+ (__tgmath_real_type (Val)) __tgml(Fct) (Val)))
+
+ # define __TGMATH_UNARY_REAL_RET_ONLY(Val, Fct) \
+- (__extension__ ((sizeof (Val) == sizeof (double) \
++ (__extension__ ((sizeof (+(Val)) == sizeof (double) \
+ || __builtin_classify_type (Val) != 8) \
+ ? Fct (Val) \
+- : (sizeof (Val) == sizeof (float)) \
++ : (sizeof (+(Val)) == sizeof (float)) \
+ ? Fct##f (Val) \
+ : __TGMATH_F128 ((Val), Fct, (Val)) \
+ __tgml(Fct) (Val)))
+
+ # define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \
+- (__extension__ ((sizeof (Val1) == sizeof (double) \
++ (__extension__ ((sizeof (+(Val1)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8) \
+ ? (__tgmath_real_type (Val1)) Fct (Val1, Val2) \
+- : (sizeof (Val1) == sizeof (float)) \
++ : (sizeof (+(Val1)) == sizeof (float)) \
+ ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2) \
+ : __TGMATH_F128 ((Val1), (__tgmath_real_type (Val1)) Fct, \
+ (Val1, Val2)) \
+ (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
+
+ # define __TGMATH_BINARY_FIRST_REAL_STD_ONLY(Val1, Val2, Fct) \
+- (__extension__ ((sizeof (Val1) == sizeof (double) \
++ (__extension__ ((sizeof (+(Val1)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8) \
+ ? (__tgmath_real_type (Val1)) Fct (Val1, Val2) \
+- : (sizeof (Val1) == sizeof (float)) \
++ : (sizeof (+(Val1)) == sizeof (float)) \
+ ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2) \
+ : (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
+
+ # define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
+- (__extension__ (((sizeof (Val1) > sizeof (double) \
+- || sizeof (Val2) > sizeof (double)) \
++ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
+ && __builtin_classify_type ((Val1) + (Val2)) == 8) \
+ ? __TGMATH_F128 ((Val1) + (Val2), \
+ (__typeof \
+@@ -140,8 +184,8 @@
+ (__typeof ((__tgmath_real_type (Val1)) 0 \
+ + (__tgmath_real_type (Val2)) 0)) \
+ __tgml(Fct) (Val1, Val2) \
+- : (sizeof (Val1) == sizeof (double) \
+- || sizeof (Val2) == sizeof (double) \
++ : (sizeof (+(Val1)) == sizeof (double) \
++ || sizeof (+(Val2)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8 \
+ || __builtin_classify_type (Val2) != 8) \
+ ? (__typeof ((__tgmath_real_type (Val1)) 0 \
+@@ -152,14 +196,13 @@
+ Fct##f (Val1, Val2)))
+
+ # define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \
+- (__extension__ (((sizeof (Val1) > sizeof (double) \
+- || sizeof (Val2) > sizeof (double)) \
++ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
+ && __builtin_classify_type ((Val1) + (Val2)) == 8) \
+ ? (__typeof ((__tgmath_real_type (Val1)) 0 \
+ + (__tgmath_real_type (Val2)) 0)) \
+ __tgml(Fct) (Val1, Val2) \
+- : (sizeof (Val1) == sizeof (double) \
+- || sizeof (Val2) == sizeof (double) \
++ : (sizeof (+(Val1)) == sizeof (double) \
++ || sizeof (+(Val2)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8 \
+ || __builtin_classify_type (Val2) != 8) \
+ ? (__typeof ((__tgmath_real_type (Val1)) 0 \
+@@ -170,21 +213,19 @@
+ Fct##f (Val1, Val2)))
+
+ # define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \
+- (__extension__ (((sizeof (Val1) > sizeof (double) \
+- || sizeof (Val2) > sizeof (double)) \
++ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
+ && __builtin_classify_type ((Val1) + (Val2)) == 8) \
+ ? __TGMATH_F128 ((Val1) + (Val2), Fct, (Val1, Val2)) \
+ __tgml(Fct) (Val1, Val2) \
+- : (sizeof (Val1) == sizeof (double) \
+- || sizeof (Val2) == sizeof (double) \
++ : (sizeof (+(Val1)) == sizeof (double) \
++ || sizeof (+(Val2)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8 \
+ || __builtin_classify_type (Val2) != 8) \
+ ? Fct (Val1, Val2) \
+ : Fct##f (Val1, Val2)))
+
+ # define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
+- (__extension__ (((sizeof (Val1) > sizeof (double) \
+- || sizeof (Val2) > sizeof (double)) \
++ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
+ && __builtin_classify_type ((Val1) + (Val2)) == 8) \
+ ? __TGMATH_F128 ((Val1) + (Val2), \
+ (__typeof \
+@@ -194,8 +235,8 @@
+ (__typeof ((__tgmath_real_type (Val1)) 0 \
+ + (__tgmath_real_type (Val2)) 0)) \
+ __tgml(Fct) (Val1, Val2, Val3) \
+- : (sizeof (Val1) == sizeof (double) \
+- || sizeof (Val2) == sizeof (double) \
++ : (sizeof (+(Val1)) == sizeof (double) \
++ || sizeof (+(Val2)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8 \
+ || __builtin_classify_type (Val2) != 8) \
+ ? (__typeof ((__tgmath_real_type (Val1)) 0 \
+@@ -206,9 +247,7 @@
+ Fct##f (Val1, Val2, Val3)))
+
+ # define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
+- (__extension__ (((sizeof (Val1) > sizeof (double) \
+- || sizeof (Val2) > sizeof (double) \
+- || sizeof (Val3) > sizeof (double)) \
++ (__extension__ ((sizeof ((Val1) + (Val2) + (Val3)) > sizeof (double) \
+ && __builtin_classify_type ((Val1) + (Val2) + (Val3)) \
+ == 8) \
+ ? __TGMATH_F128 ((Val1) + (Val2) + (Val3), \
+@@ -221,9 +260,9 @@
+ + (__tgmath_real_type (Val2)) 0 \
+ + (__tgmath_real_type (Val3)) 0)) \
+ __tgml(Fct) (Val1, Val2, Val3) \
+- : (sizeof (Val1) == sizeof (double) \
+- || sizeof (Val2) == sizeof (double) \
+- || sizeof (Val3) == sizeof (double) \
++ : (sizeof (+(Val1)) == sizeof (double) \
++ || sizeof (+(Val2)) == sizeof (double) \
++ || sizeof (+(Val3)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8 \
+ || __builtin_classify_type (Val2) != 8 \
+ || __builtin_classify_type (Val3) != 8) \
+@@ -237,10 +276,10 @@
+ Fct##f (Val1, Val2, Val3)))
+
+ # define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) \
+- (__extension__ ((sizeof (Val1) == sizeof (double) \
++ (__extension__ ((sizeof (+(Val1)) == sizeof (double) \
+ || __builtin_classify_type (Val1) != 8) \
+ ? Fct (Val1, Val2, Val3) \
+- : (sizeof (Val1) == sizeof (float)) \
++ : (sizeof (+(Val1)) == sizeof (float)) \
+ ? Fct##f (Val1, Val2, Val3) \
+ : __TGMATH_F128 ((Val1), Fct, (Val1, Val2, Val3)) \
+ __tgml(Fct) (Val1, Val2, Val3)))
+@@ -248,28 +287,29 @@
+ /* XXX This definition has to be changed as soon as the compiler understands
+ the imaginary keyword. */
+ # define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \
+- (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
++ (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double) \
+ || __builtin_classify_type (__real__ (Val)) != 8) \
+- ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
+- ? (__tgmath_real_type (Val)) Fct (Val) \
+- : (__tgmath_real_type (Val)) Cfct (Val)) \
+- : (sizeof (__real__ (Val)) == sizeof (float)) \
+- ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
+- ? (__tgmath_real_type (Val)) Fct##f (Val) \
+- : (__tgmath_real_type (Val)) Cfct##f (Val)) \
+- : __TGMATH_CF128 ((Val), (__tgmath_real_type (Val)) Fct, \
+- (__tgmath_real_type (Val)) Cfct, \
++ ? (__expr_is_real (Val) \
++ ? (__tgmath_complex_type (Val)) Fct (Val) \
++ : (__tgmath_complex_type (Val)) Cfct (Val)) \
++ : (sizeof (+__real__ (Val)) == sizeof (float)) \
++ ? (__expr_is_real (Val) \
++ ? (__tgmath_complex_type (Val)) Fct##f (Val) \
++ : (__tgmath_complex_type (Val)) Cfct##f (Val)) \
++ : __TGMATH_CF128 ((Val), \
++ (__tgmath_complex_type (Val)) Fct, \
++ (__tgmath_complex_type (Val)) Cfct, \
+ (Val)) \
+- ((sizeof (__real__ (Val)) == sizeof (Val)) \
+- ? (__tgmath_real_type (Val)) __tgml(Fct) (Val) \
+- : (__tgmath_real_type (Val)) __tgml(Cfct) (Val))))
++ (__expr_is_real (Val) \
++ ? (__tgmath_complex_type (Val)) __tgml(Fct) (Val) \
++ : (__tgmath_complex_type (Val)) __tgml(Cfct) (Val))))
+
+ # define __TGMATH_UNARY_IMAG(Val, Cfct) \
+- (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
++ (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double) \
+ || __builtin_classify_type (__real__ (Val)) != 8) \
+ ? (__typeof__ ((__tgmath_real_type (Val)) 0 \
+ + _Complex_I)) Cfct (Val) \
+- : (sizeof (__real__ (Val)) == sizeof (float)) \
++ : (sizeof (+__real__ (Val)) == sizeof (float)) \
+ ? (__typeof__ ((__tgmath_real_type (Val)) 0 \
+ + _Complex_I)) Cfct##f (Val) \
+ : __TGMATH_F128 (__real__ (Val), \
+@@ -282,15 +322,15 @@
+ /* XXX This definition has to be changed as soon as the compiler understands
+ the imaginary keyword. */
+ # define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct) \
+- (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
++ (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double) \
+ || __builtin_classify_type (__real__ (Val)) != 8) \
+- ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
++ ? (__expr_is_real (Val) \
+ ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
+ Fct (Val) \
+ : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
+ Cfct (Val)) \
+- : (sizeof (__real__ (Val)) == sizeof (float)) \
+- ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
++ : (sizeof (+__real__ (Val)) == sizeof (float)) \
++ ? (__expr_is_real (Val) \
+ ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
+ Fct##f (Val) \
+ : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
+@@ -303,7 +343,7 @@
+ (__real__ \
+ (__tgmath_real_type (Val)) 0)) Cfct, \
+ (Val)) \
+- ((sizeof (__real__ (Val)) == sizeof (Val)) \
++ (__expr_is_real (Val) \
+ ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0)) \
+ __tgml(Fct) (Val) \
+ : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0)) \
+@@ -312,47 +352,44 @@
+ /* XXX This definition has to be changed as soon as the compiler understands
+ the imaginary keyword. */
+ # define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
+- (__extension__ (((sizeof (__real__ (Val1)) > sizeof (double) \
+- || sizeof (__real__ (Val2)) > sizeof (double)) \
++ (__extension__ ((sizeof (__real__ (Val1) \
++ + __real__ (Val2)) > sizeof (double) \
+ && __builtin_classify_type (__real__ (Val1) \
+ + __real__ (Val2)) == 8) \
+ ? __TGMATH_CF128 ((Val1) + (Val2), \
+ (__typeof \
+- ((__tgmath_real_type (Val1)) 0 \
+- + (__tgmath_real_type (Val2)) 0)) \
++ ((__tgmath_complex_type (Val1)) 0 \
++ + (__tgmath_complex_type (Val2)) 0)) \
+ Fct, \
+ (__typeof \
+- ((__tgmath_real_type (Val1)) 0 \
+- + (__tgmath_real_type (Val2)) 0)) \
++ ((__tgmath_complex_type (Val1)) 0 \
++ + (__tgmath_complex_type (Val2)) 0)) \
+ Cfct, \
+ (Val1, Val2)) \
+- ((sizeof (__real__ (Val1)) == sizeof (Val1) \
+- && sizeof (__real__ (Val2)) == sizeof (Val2)) \
+- ? (__typeof ((__tgmath_real_type (Val1)) 0 \
+- + (__tgmath_real_type (Val2)) 0)) \
++ (__expr_is_real ((Val1) + (Val2)) \
++ ? (__typeof ((__tgmath_complex_type (Val1)) 0 \
++ + (__tgmath_complex_type (Val2)) 0)) \
+ __tgml(Fct) (Val1, Val2) \
+- : (__typeof ((__tgmath_real_type (Val1)) 0 \
+- + (__tgmath_real_type (Val2)) 0)) \
++ : (__typeof ((__tgmath_complex_type (Val1)) 0 \
++ + (__tgmath_complex_type (Val2)) 0)) \
+ __tgml(Cfct) (Val1, Val2)) \
+- : (sizeof (__real__ (Val1)) == sizeof (double) \
+- || sizeof (__real__ (Val2)) == sizeof (double) \
++ : (sizeof (+__real__ (Val1)) == sizeof (double) \
++ || sizeof (+__real__ (Val2)) == sizeof (double) \
+ || __builtin_classify_type (__real__ (Val1)) != 8 \
+ || __builtin_classify_type (__real__ (Val2)) != 8) \
+- ? ((sizeof (__real__ (Val1)) == sizeof (Val1) \
+- && sizeof (__real__ (Val2)) == sizeof (Val2)) \
+- ? (__typeof ((__tgmath_real_type (Val1)) 0 \
+- + (__tgmath_real_type (Val2)) 0)) \
++ ? (__expr_is_real ((Val1) + (Val2)) \
++ ? (__typeof ((__tgmath_complex_type (Val1)) 0 \
++ + (__tgmath_complex_type (Val2)) 0)) \
+ Fct (Val1, Val2) \
+- : (__typeof ((__tgmath_real_type (Val1)) 0 \
+- + (__tgmath_real_type (Val2)) 0)) \
++ : (__typeof ((__tgmath_complex_type (Val1)) 0 \
++ + (__tgmath_complex_type (Val2)) 0)) \
+ Cfct (Val1, Val2)) \
+- : ((sizeof (__real__ (Val1)) == sizeof (Val1) \
+- && sizeof (__real__ (Val2)) == sizeof (Val2)) \
+- ? (__typeof ((__tgmath_real_type (Val1)) 0 \
+- + (__tgmath_real_type (Val2)) 0)) \
++ : (__expr_is_real ((Val1) + (Val2)) \
++ ? (__typeof ((__tgmath_complex_type (Val1)) 0 \
++ + (__tgmath_complex_type (Val2)) 0)) \
+ Fct##f (Val1, Val2) \
+- : (__typeof ((__tgmath_real_type (Val1)) 0 \
+- + (__tgmath_real_type (Val2)) 0)) \
++ : (__typeof ((__tgmath_complex_type (Val1)) 0 \
++ + (__tgmath_complex_type (Val2)) 0)) \
+ Cfct##f (Val1, Val2))))
+ #else
+ # error "Unsupported compiler; you cannot use <tgmath.h>"
+diff -purN glibc-org/math/Versions glibc-2.26/math/Versions
+--- glibc-org/math/Versions 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/Versions 2017-10-22 17:02:23.568967254 +0000
+@@ -1,3 +1,4 @@
++%include <float128-abi.h>
+ libc {
+ GLIBC_2.0 {
+ # functions used in inline functions or macros
+@@ -229,4 +230,115 @@ libm {
+ fromfp; fromfpf; fromfpl; ufromfp; ufromfpf; ufromfpl;
+ fromfpx; fromfpxf; fromfpxl; ufromfpx; ufromfpxf; ufromfpxl;
+ }
++%ifdef FLOAT128_VERSION
++ FLOAT128_VERSION {
++ acosf128;
++ acoshf128;
++ asinf128;
++ asinhf128;
++ atan2f128;
++ atanf128;
++ atanhf128;
++ cabsf128;
++ cacosf128;
++ cacoshf128;
++ canonicalizef128;
++ cargf128;
++ casinf128;
++ casinhf128;
++ catanf128;
++ catanhf128;
++ cbrtf128;
++ ccosf128;
++ ccoshf128;
++ ceilf128;
++ cexpf128;
++ cimagf128;
++ clog10f128;
++ clogf128;
++ conjf128;
++ copysignf128;
++ cosf128;
++ coshf128;
++ cpowf128;
++ cprojf128;
++ crealf128;
++ csinf128;
++ csinhf128;
++ csqrtf128;
++ ctanf128;
++ ctanhf128;
++ erfcf128;
++ erff128;
++ exp10f128;
++ exp2f128;
++ expf128;
++ expm1f128;
++ fabsf128;
++ fdimf128;
++ floorf128;
++ fmaf128;
++ fmaxf128;
++ fmaxmagf128;
++ fminf128;
++ fminmagf128;
++ fmodf128;
++ frexpf128;
++ fromfpf128;
++ fromfpxf128;
++ getpayloadf128;
++ hypotf128;
++ ilogbf128;
++ j0f128;
++ j1f128;
++ jnf128;
++ ldexpf128;
++ lgammaf128;
++ lgammaf128_r;
++ llogbf128;
++ llrintf128;
++ llroundf128;
++ log10f128;
++ log1pf128;
++ log2f128;
++ logbf128;
++ logf128;
++ lrintf128;
++ lroundf128;
++ modff128;
++ nanf128;
++ nearbyintf128;
++ nextafterf128;
++ nextdownf128;
++ nextupf128;
++ powf128;
++ remainderf128;
++ remquof128;
++ rintf128;
++ roundevenf128;
++ roundf128;
++ scalblnf128;
++ scalbnf128;
++ setpayloadf128;
++ setpayloadsigf128;
++ sincosf128;
++ sinf128;
++ sinhf128;
++ sqrtf128;
++ tanf128;
++ tanhf128;
++ tgammaf128;
++ totalorderf128;
++ totalordermagf128;
++ truncf128;
++ ufromfpf128;
++ ufromfpxf128;
++ y0f128;
++ y1f128;
++ ynf128;
++ }
++%endif
++ GLIBC_2.27 {
++ expf; exp2f; logf; log2f; powf;
++ }
+ }
+diff -purN glibc-org/math/w_acos_compat.c glibc-2.26/math/w_acos_compat.c
+--- glibc-org/math/w_acos_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_acos_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper acos */
+ double
+ __acos (double x)
+@@ -35,8 +38,5 @@ __acos (double x)
+
+ return __ieee754_acos (x);
+ }
+-weak_alias (__acos, acos)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__acos, __acosl)
+-weak_alias (__acos, acosl)
++libm_alias_double (__acos, acos)
+ #endif
+diff -purN glibc-org/math/w_acosf_compat.c glibc-2.26/math/w_acosf_compat.c
+--- glibc-org/math/w_acosf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_acosf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper acosf */
+ float
+ __acosf (float x)
+@@ -35,4 +38,5 @@ __acosf (float x)
+
+ return __ieee754_acosf (x);
+ }
+-weak_alias (__acosf, acosf)
++libm_alias_float (__acos, acos)
++#endif
+diff -purN glibc-org/math/w_acosh_compat.c glibc-2.26/math/w_acosh_compat.c
+--- glibc-org/math/w_acosh_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_acosh_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper acosh */
+ double
+ __acosh (double x)
+@@ -30,8 +33,5 @@ __acosh (double x)
+
+ return __ieee754_acosh (x);
+ }
+-weak_alias (__acosh, acosh)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__acosh, __acoshl)
+-weak_alias (__acosh, acoshl)
++libm_alias_double (__acosh, acosh)
+ #endif
+diff -purN glibc-org/math/w_acoshf_compat.c glibc-2.26/math/w_acoshf_compat.c
+--- glibc-org/math/w_acoshf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_acoshf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper acoshf */
+ float
+ __acoshf (float x)
+@@ -30,4 +33,5 @@ __acoshf (float x)
+
+ return __ieee754_acoshf (x);
+ }
+-weak_alias (__acoshf, acoshf)
++libm_alias_float (__acosh, acosh)
++#endif
+diff -purN glibc-org/math/w_acoshl_compat.c glibc-2.26/math/w_acoshl_compat.c
+--- glibc-org/math/w_acoshl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_acoshl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper acosl */
+ long double
+ __acoshl (long double x)
+@@ -30,4 +33,5 @@ __acoshl (long double x)
+
+ return __ieee754_acoshl (x);
+ }
+-weak_alias (__acoshl, acoshl)
++libm_alias_ldouble (__acosh, acosh)
++#endif
+diff -purN glibc-org/math/w_acosl_compat.c glibc-2.26/math/w_acosl_compat.c
+--- glibc-org/math/w_acosl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_acosl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper acosl */
+ long double
+ __acosl (long double x)
+@@ -35,4 +38,5 @@ __acosl (long double x)
+
+ return __ieee754_acosl (x);
+ }
+-weak_alias (__acosl, acosl)
++libm_alias_ldouble (__acos, acos)
++#endif
+diff -purN glibc-org/math/w_asin_compat.c glibc-2.26/math/w_asin_compat.c
+--- glibc-org/math/w_asin_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_asin_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper asin */
+ double
+ __asin (double x)
+@@ -35,8 +38,5 @@ __asin (double x)
+
+ return __ieee754_asin (x);
+ }
+-weak_alias (__asin, asin)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__asin, __asinl)
+-weak_alias (__asin, asinl)
++libm_alias_double (__asin, asin)
+ #endif
+diff -purN glibc-org/math/w_asinf_compat.c glibc-2.26/math/w_asinf_compat.c
+--- glibc-org/math/w_asinf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_asinf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper asinf */
+ float
+ __asinf (float x)
+@@ -35,4 +38,5 @@ __asinf (float x)
+
+ return __ieee754_asinf (x);
+ }
+-weak_alias (__asinf, asinf)
++libm_alias_float (__asin, asin)
++#endif
+diff -purN glibc-org/math/w_asinl_compat.c glibc-2.26/math/w_asinl_compat.c
+--- glibc-org/math/w_asinl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_asinl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper asinl */
+ long double
+ __asinl (long double x)
+@@ -35,4 +38,5 @@ __asinl (long double x)
+
+ return __ieee754_asinl (x);
+ }
+-weak_alias (__asinl, asinl)
++libm_alias_ldouble (__asin, asin)
++#endif
+diff -purN glibc-org/math/w_atan2_compat.c glibc-2.26/math/w_atan2_compat.c
+--- glibc-org/math/w_atan2_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_atan2_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -23,8 +23,11 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ double
+ __atan2 (double y, double x)
+ {
+@@ -38,8 +41,5 @@ __atan2 (double y, double x)
+ __set_errno (ERANGE);
+ return z;
+ }
+-weak_alias (__atan2, atan2)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__atan2, __atan2l)
+-weak_alias (__atan2, atan2l)
++libm_alias_double (__atan2, atan2)
+ #endif
+diff -purN glibc-org/math/w_atan2f_compat.c glibc-2.26/math/w_atan2f_compat.c
+--- glibc-org/math/w_atan2f_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_atan2f_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -23,8 +23,11 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ float
+ __atan2f (float y, float x)
+ {
+@@ -38,4 +41,5 @@ __atan2f (float y, float x)
+ __set_errno (ERANGE);
+ return z;
+ }
+-weak_alias (__atan2f, atan2f)
++libm_alias_float (__atan2, atan2)
++#endif
+diff -purN glibc-org/math/w_atan2l_compat.c glibc-2.26/math/w_atan2l_compat.c
+--- glibc-org/math/w_atan2l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_atan2l_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -23,8 +23,11 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ long double
+ __atan2l (long double y, long double x)
+ {
+@@ -38,4 +41,5 @@ __atan2l (long double y, long double x)
+ __set_errno (ERANGE);
+ return z;
+ }
+-weak_alias (__atan2l, atan2l)
++libm_alias_ldouble (__atan2, atan2)
++#endif
+diff -purN glibc-org/math/w_atanh_compat.c glibc-2.26/math/w_atanh_compat.c
+--- glibc-org/math/w_atanh_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_atanh_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper atanh */
+ double
+ __atanh (double x)
+@@ -33,8 +36,5 @@ __atanh (double x)
+
+ return __ieee754_atanh (x);
+ }
+-weak_alias (__atanh, atanh)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__atanh, __atanhl)
+-weak_alias (__atanh, atanhl)
++libm_alias_double (__atanh, atanh)
+ #endif
+diff -purN glibc-org/math/w_atanhf_compat.c glibc-2.26/math/w_atanhf_compat.c
+--- glibc-org/math/w_atanhf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_atanhf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper atanhf */
+ float
+ __atanhf (float x)
+@@ -33,4 +36,5 @@ __atanhf (float x)
+
+ return __ieee754_atanhf (x);
+ }
+-weak_alias (__atanhf, atanhf)
++libm_alias_float (__atanh, atanh)
++#endif
+diff -purN glibc-org/math/w_atanhl_compat.c glibc-2.26/math/w_atanhl_compat.c
+--- glibc-org/math/w_atanhl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_atanhl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper atanhl */
+ long double
+ __atanhl (long double x)
+@@ -33,4 +36,5 @@ __atanhl (long double x)
+
+ return __ieee754_atanhl (x);
+ }
+-weak_alias (__atanhl, atanhl)
++libm_alias_ldouble (__atanh, atanh)
++#endif
+diff -purN glibc-org/math/w_cosh_compat.c glibc-2.26/math/w_cosh_compat.c
+--- glibc-org/math/w_cosh_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_cosh_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -16,7 +16,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
++#if LIBM_SVID_COMPAT
+ double
+ __cosh (double x)
+ {
+@@ -27,8 +30,5 @@ __cosh (double x)
+
+ return z;
+ }
+-weak_alias (__cosh, cosh)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__cosh, __coshl)
+-weak_alias (__cosh, coshl)
++libm_alias_double (__cosh, cosh)
+ #endif
+diff -purN glibc-org/math/w_coshf_compat.c glibc-2.26/math/w_coshf_compat.c
+--- glibc-org/math/w_coshf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_coshf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -20,7 +20,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
++#if LIBM_SVID_COMPAT
+ float
+ __coshf (float x)
+ {
+@@ -31,4 +34,5 @@ __coshf (float x)
+
+ return z;
+ }
+-weak_alias (__coshf, coshf)
++libm_alias_float (__cosh, cosh)
++#endif
+diff -purN glibc-org/math/w_coshl_compat.c glibc-2.26/math/w_coshl_compat.c
+--- glibc-org/math/w_coshl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_coshl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -21,7 +21,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
++#if LIBM_SVID_COMPAT
+ long double
+ __coshl (long double x)
+ {
+@@ -32,4 +35,5 @@ __coshl (long double x)
+
+ return z;
+ }
+-weak_alias (__coshl, coshl)
++libm_alias_ldouble (__cosh, cosh)
++#endif
+diff -purN glibc-org/math/w_exp10_compat.c glibc-2.26/math/w_exp10_compat.c
+--- glibc-org/math/w_exp10_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_exp10_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -23,7 +23,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
++#if LIBM_SVID_COMPAT
+ double
+ __exp10 (double x)
+ {
+@@ -35,12 +38,15 @@ __exp10 (double x)
+
+ return z;
+ }
+-weak_alias (__exp10, exp10)
++libm_alias_double (__exp10, exp10)
++# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+ strong_alias (__exp10, __pow10)
+-weak_alias (__pow10, pow10)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__exp10, __exp10l)
+-weak_alias (__exp10, exp10l)
++compat_symbol (libm, __pow10, pow10, GLIBC_2_1);
++# endif
++# ifdef NO_LONG_DOUBLE
++# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+ strong_alias (__exp10l, __pow10l)
+-weak_alias (__pow10l, pow10l)
++compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1);
++# endif
++# endif
+ #endif
+diff -purN glibc-org/math/w_exp10f_compat.c glibc-2.26/math/w_exp10f_compat.c
+--- glibc-org/math/w_exp10f_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_exp10f_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -23,7 +23,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
++#if LIBM_SVID_COMPAT
+ float
+ __exp10f (float x)
+ {
+@@ -35,6 +38,9 @@ __exp10f (float x)
+
+ return z;
+ }
+-weak_alias (__exp10f, exp10f)
++libm_alias_float (__exp10, exp10)
++# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+ strong_alias (__exp10f, __pow10f)
+-weak_alias (__pow10f, pow10f)
++compat_symbol (libm, __pow10f, pow10f, GLIBC_2_1);
++# endif
++#endif
+diff -purN glibc-org/math/w_exp10l_compat.c glibc-2.26/math/w_exp10l_compat.c
+--- glibc-org/math/w_exp10l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_exp10l_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -23,7 +23,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
++#if LIBM_SVID_COMPAT
+ long double
+ __exp10l (long double x)
+ {
+@@ -35,6 +38,9 @@ __exp10l (long double x)
+
+ return z;
+ }
+-weak_alias (__exp10l, exp10l)
++libm_alias_ldouble (__exp10, exp10)
++# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+ strong_alias (__exp10l, __pow10l)
+-weak_alias (__pow10l, pow10l)
++compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1);
++# endif
++#endif
+diff -purN glibc-org/math/w_exp2_compat.c glibc-2.26/math/w_exp2_compat.c
+--- glibc-org/math/w_exp2_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_exp2_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -4,7 +4,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
++#if LIBM_SVID_COMPAT
+ double
+ __exp2 (double x)
+ {
+@@ -16,8 +19,5 @@ __exp2 (double x)
+
+ return z;
+ }
+-weak_alias (__exp2, exp2)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__exp2, __exp2l)
+-weak_alias (__exp2, exp2l)
++libm_alias_double (__exp2, exp2)
+ #endif
+diff -purN glibc-org/math/w_exp2f.c glibc-2.26/math/w_exp2f.c
+--- glibc-org/math/w_exp2f.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_exp2f.c 2017-10-22 17:02:23.570967253 +0000
+@@ -0,0 +1,8 @@
++#include <math-type-macros-float.h>
++#undef __USE_WRAPPER_TEMPLATE
++#define __USE_WRAPPER_TEMPLATE 1
++#undef declare_mgen_alias
++#define declare_mgen_alias(a, b)
++#include <w_exp2_template.c>
++versioned_symbol (libm, __exp2f, exp2f, GLIBC_2_27);
++libm_alias_float_other (__exp2, exp2)
+diff -purN glibc-org/math/w_exp2f_compat.c glibc-2.26/math/w_exp2f_compat.c
+--- glibc-org/math/w_exp2f_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_exp2f_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -4,9 +4,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
+
++#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+ float
+-__exp2f (float x)
++__exp2f_compat (float x)
+ {
+ float z = __ieee754_exp2f (x);
+ if (__builtin_expect (!isfinite (z) || z == 0, 0)
+@@ -16,4 +18,5 @@ __exp2f (float x)
+
+ return z;
+ }
+-weak_alias (__exp2f, exp2f)
++compat_symbol (libm, __exp2f_compat, exp2f, GLIBC_2_1);
++#endif
+diff -purN glibc-org/math/w_exp2l_compat.c glibc-2.26/math/w_exp2l_compat.c
+--- glibc-org/math/w_exp2l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_exp2l_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -4,7 +4,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
++#if LIBM_SVID_COMPAT
+ long double
+ __exp2l (long double x)
+ {
+@@ -16,4 +19,5 @@ __exp2l (long double x)
+
+ return z;
+ }
+-weak_alias (__exp2l, exp2l)
++libm_alias_ldouble (__exp2, exp2)
++#endif
+diff -purN glibc-org/math/w_exp_compat.c glibc-2.26/math/w_exp_compat.c
+--- glibc-org/math/w_exp_compat.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_exp_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
++
++ 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 <math-svid-compat.h>
++#include <libm-alias-double.h>
++
++#if LIBM_SVID_COMPAT
++/* wrapper exp */
++double
++__exp (double x)
++{
++ double z = __ieee754_exp (x);
++ if (__builtin_expect (!isfinite (z) || z == 0, 0)
++ && isfinite (x) && _LIB_VERSION != _IEEE_)
++ return __kernel_standard (x, x, 6 + !!signbit (x));
++
++ return z;
++}
++hidden_def (__exp)
++libm_alias_double (__exp, exp)
++#endif
+diff -purN glibc-org/math/w_expf.c glibc-2.26/math/w_expf.c
+--- glibc-org/math/w_expf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_expf.c 2017-10-22 17:02:23.570967253 +0000
+@@ -0,0 +1,8 @@
++#include <math-type-macros-float.h>
++#undef __USE_WRAPPER_TEMPLATE
++#define __USE_WRAPPER_TEMPLATE 1
++#undef declare_mgen_alias
++#define declare_mgen_alias(a, b)
++#include <w_exp_template.c>
++versioned_symbol (libm, __expf, expf, GLIBC_2_27);
++libm_alias_float_other (__exp, exp)
+diff -purN glibc-org/math/w_expf_compat.c glibc-2.26/math/w_expf_compat.c
+--- glibc-org/math/w_expf_compat.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_expf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -0,0 +1,36 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
++
++ 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 <math-svid-compat.h>
++
++#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
++/* wrapper expf */
++float
++__expf_compat (float x)
++{
++ float z = __ieee754_expf (x);
++ if (__builtin_expect (!isfinite (z) || z == 0, 0)
++ && isfinite (x) && _LIB_VERSION != _IEEE_)
++ return __kernel_standard_f (x, x, 106 + !!signbit (x));
++
++ return z;
++}
++compat_symbol (libm, __expf_compat, expf, GLIBC_2_0);
++#endif
+diff -purN glibc-org/math/w_expl_compat.c glibc-2.26/math/w_expl_compat.c
+--- glibc-org/math/w_expl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_expl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -1,13 +1,46 @@
++/* w_expl.c -- long double version of w_exp.c.
++ * Conversion to long double by Ulrich Drepper,
++ * Cygnus Support, drepper@cygnus.com.
++ */
++
++/*
++ * ====================================================
++ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
++ *
++ * Developed at SunPro, a Sun Microsystems, Inc. business.
++ * Permission to use, copy, modify, and distribute this
++ * software is freely granted, provided that this notice
++ * is preserved.
++ * ====================================================
++ */
++
++#if defined(LIBM_SCCS) && !defined(lint)
++static char rcsid[] = "$NetBSD: $";
++#endif
++
++/*
++ * wrapper expl(x)
++ */
++
+ #include <math.h>
+-#include <stdio.h>
+-#include <errno.h>
++#include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+-long double
+-__expl(long double x)
++#if LIBM_SVID_COMPAT
++long double __expl(long double x) /* wrapper exp */
+ {
+- fputs ("__expl not implemented\n", stderr);
+- __set_errno (ENOSYS);
+- return 0.0;
+-}
++# ifdef _IEEE_LIBM
++ return __ieee754_expl(x);
++# else
++ long double z = __ieee754_expl (x);
++ if (__glibc_unlikely (!isfinite (z) || z == 0)
++ && isfinite (x) && _LIB_VERSION != _IEEE_)
++ return __kernel_standard_l (x, x, 206 + !!signbit (x));
+
+-weak_alias (__expl, expl)
++ return z;
++# endif
++}
++hidden_def (__expl)
++libm_alias_ldouble (__exp, exp)
++#endif
+diff -purN glibc-org/math/w_fmod_compat.c glibc-2.26/math/w_fmod_compat.c
+--- glibc-org/math/w_fmod_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_fmod_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,7 +18,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
++#if LIBM_SVID_COMPAT
+ /* wrapper fmod */
+ double
+ __fmod (double x, double y)
+@@ -30,8 +33,5 @@ __fmod (double x, double y)
+
+ return __ieee754_fmod (x, y);
+ }
+-weak_alias (__fmod, fmod)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__fmod, __fmodl)
+-weak_alias (__fmod, fmodl)
++libm_alias_double (__fmod, fmod)
+ #endif
+diff -purN glibc-org/math/w_fmodf_compat.c glibc-2.26/math/w_fmodf_compat.c
+--- glibc-org/math/w_fmodf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_fmodf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,7 +18,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
++#if LIBM_SVID_COMPAT
+ /* wrapper fmodf */
+ float
+ __fmodf (float x, float y)
+@@ -30,4 +33,5 @@ __fmodf (float x, float y)
+
+ return __ieee754_fmodf (x, y);
+ }
+-weak_alias (__fmodf, fmodf)
++libm_alias_float (__fmod, fmod)
++#endif
+diff -purN glibc-org/math/w_fmodl_compat.c glibc-2.26/math/w_fmodl_compat.c
+--- glibc-org/math/w_fmodl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_fmodl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,7 +18,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
++#if LIBM_SVID_COMPAT
+ /* wrapper fmodl */
+ long double
+ __fmodl (long double x, long double y)
+@@ -30,4 +33,5 @@ __fmodl (long double x, long double y)
+
+ return __ieee754_fmodl (x, y);
+ }
+-weak_alias (__fmodl, fmodl)
++libm_alias_ldouble (__fmod, fmod)
++#endif
+diff -purN glibc-org/math/w_hypot_compat.c glibc-2.26/math/w_hypot_compat.c
+--- glibc-org/math/w_hypot_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_hypot_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -16,8 +16,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ double
+ __hypot (double x, double y)
+ {
+@@ -28,8 +31,5 @@ __hypot (double x, double y)
+
+ return z;
+ }
+-weak_alias (__hypot, hypot)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__hypot, __hypotl)
+-weak_alias (__hypot, hypotl)
++libm_alias_double (__hypot, hypot)
+ #endif
+diff -purN glibc-org/math/w_hypotf_compat.c glibc-2.26/math/w_hypotf_compat.c
+--- glibc-org/math/w_hypotf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_hypotf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ float
+ __hypotf(float x, float y)
+ {
+@@ -32,4 +35,5 @@ __hypotf(float x, float y)
+
+ return z;
+ }
+-weak_alias (__hypotf, hypotf)
++libm_alias_float (__hypot, hypot)
++#endif
+diff -purN glibc-org/math/w_hypotl_compat.c glibc-2.26/math/w_hypotl_compat.c
+--- glibc-org/math/w_hypotl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_hypotl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -20,8 +20,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ long double
+ __hypotl(long double x, long double y)
+ {
+@@ -33,4 +36,5 @@ __hypotl(long double x, long double y)
+
+ return z;
+ }
+-weak_alias (__hypotl, hypotl)
++libm_alias_ldouble (__hypot, hypot)
++#endif
+diff -purN glibc-org/math/w_ilogb_template.c glibc-2.26/math/w_ilogb_template.c
+--- glibc-org/math/w_ilogb_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_ilogb_template.c 2017-10-22 17:02:23.570967253 +0000
+@@ -36,7 +36,3 @@ M_DECL_FUNC (__ilogb) (FLOAT x)
+ return r;
+ }
+ declare_mgen_alias (__ilogb, ilogb)
+-
+-#if M_LIBM_NEED_COMPAT (ilogb)
+-declare_mgen_libm_compat (__ilogb, ilogb)
+-#endif
+diff -purN glibc-org/math/w_j0_compat.c glibc-2.26/math/w_j0_compat.c
+--- glibc-org/math/w_j0_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_j0_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,11 +19,14 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper j0 */
+ double
+-j0 (double x)
++__j0 (double x)
+ {
+ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
+@@ -32,14 +35,12 @@ j0 (double x)
+
+ return __ieee754_j0 (x);
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (j0, j0l)
+-#endif
++libm_alias_double (__j0, j0)
+
+
+ /* wrapper y0 */
+ double
+-y0 (double x)
++__y0 (double x)
+ {
+ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_)
+@@ -63,6 +64,5 @@ y0 (double x)
+
+ return __ieee754_y0 (x);
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (y0, y0l)
++libm_alias_double (__y0, y0)
+ #endif
+diff -purN glibc-org/math/w_j0f_compat.c glibc-2.26/math/w_j0f_compat.c
+--- glibc-org/math/w_j0f_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_j0f_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,11 +19,14 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper j0f */
+ float
+-j0f (float x)
++__j0f (float x)
+ {
+ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
+@@ -32,11 +35,12 @@ j0f (float x)
+
+ return __ieee754_j0f (x);
+ }
++libm_alias_float (__j0, j0)
+
+
+ /* wrapper y0f */
+ float
+-y0f (float x)
++__y0f (float x)
+ {
+ if (__builtin_expect (islessequal (x, 0.0f)
+ || isgreater (x, (float) X_TLOSS), 0)
+@@ -61,3 +65,5 @@ y0f (float x)
+
+ return __ieee754_y0f (x);
+ }
++libm_alias_float (__y0, y0)
++#endif
+diff -purN glibc-org/math/w_j0l_compat.c glibc-2.26/math/w_j0l_compat.c
+--- glibc-org/math/w_j0l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_j0l_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper j0l */
+ long double
+ __j0l (long double x)
+@@ -32,7 +35,7 @@ __j0l (long double x)
+
+ return __ieee754_j0l (x);
+ }
+-weak_alias (__j0l, j0l)
++libm_alias_ldouble (__j0, j0)
+
+
+ /* wrapper y0l */
+@@ -61,4 +64,5 @@ __y0l (long double x)
+
+ return __ieee754_y0l (x);
+ }
+-weak_alias (__y0l, y0l)
++libm_alias_ldouble (__y0, y0)
++#endif
+diff -purN glibc-org/math/w_j1_compat.c glibc-2.26/math/w_j1_compat.c
+--- glibc-org/math/w_j1_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_j1_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,11 +19,14 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper j1 */
+ double
+-j1 (double x)
++__j1 (double x)
+ {
+ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
+@@ -32,14 +35,12 @@ j1 (double x)
+
+ return __ieee754_j1 (x);
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (j1, j1l)
+-#endif
++libm_alias_double (__j1, j1)
+
+
+ /* wrapper y1 */
+ double
+-y1 (double x)
++__y1 (double x)
+ {
+ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_)
+@@ -63,6 +64,5 @@ y1 (double x)
+
+ return __ieee754_y1 (x);
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (y1, y1l)
++libm_alias_double (__y1, y1)
+ #endif
+diff -purN glibc-org/math/w_j1f_compat.c glibc-2.26/math/w_j1f_compat.c
+--- glibc-org/math/w_j1f_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_j1f_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,11 +19,14 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper j1f */
+ float
+-j1f (float x)
++__j1f (float x)
+ {
+ if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
+@@ -32,11 +35,12 @@ j1f (float x)
+
+ return __ieee754_j1f (x);
+ }
++libm_alias_float (__j1, j1)
+
+
+ /* wrapper y1f */
+ float
+-y1f (float x)
++__y1f (float x)
+ {
+ if (__builtin_expect (islessequal (x, 0.0f)
+ || isgreater (x, (float) X_TLOSS), 0)
+@@ -61,3 +65,5 @@ y1f (float x)
+
+ return __ieee754_y1f (x);
+ }
++libm_alias_float (__y1, y1)
++#endif
+diff -purN glibc-org/math/w_j1l_compat.c glibc-2.26/math/w_j1l_compat.c
+--- glibc-org/math/w_j1l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_j1l_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper j1l */
+ long double
+ __j1l (long double x)
+@@ -32,7 +35,7 @@ __j1l (long double x)
+
+ return __ieee754_j1l (x);
+ }
+-weak_alias (__j1l, j1l)
++libm_alias_ldouble (__j1, j1)
+
+
+ /* wrapper y1l */
+@@ -61,4 +64,5 @@ __y1l (long double x)
+
+ return __ieee754_y1l (x);
+ }
+-weak_alias (__y1l, y1l)
++libm_alias_ldouble (__y1, y1)
++#endif
+diff -purN glibc-org/math/w_jn_compat.c glibc-2.26/math/w_jn_compat.c
+--- glibc-org/math/w_jn_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_jn_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,11 +19,14 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper jn */
+ double
+-jn (int n, double x)
++__jn (int n, double x)
+ {
+ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
+@@ -32,14 +35,12 @@ jn (int n, double x)
+
+ return __ieee754_jn (n, x);
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (jn, jnl)
+-#endif
++libm_alias_double (__jn, jn)
+
+
+ /* wrapper yn */
+ double
+-yn (int n, double x)
++__yn (int n, double x)
+ {
+ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_)
+@@ -63,6 +64,5 @@ yn (int n, double x)
+
+ return __ieee754_yn (n, x);
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (yn, ynl)
++libm_alias_double (__yn, yn)
+ #endif
+diff -purN glibc-org/math/w_jnf_compat.c glibc-2.26/math/w_jnf_compat.c
+--- glibc-org/math/w_jnf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_jnf_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -19,11 +19,14 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper jnf */
+ float
+-jnf (int n, float x)
++__jnf (int n, float x)
+ {
+ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
+@@ -32,11 +35,12 @@ jnf (int n, float x)
+
+ return __ieee754_jnf (n, x);
+ }
++libm_alias_float (__jn, jn)
+
+
+ /* wrapper ynf */
+ float
+-ynf (int n, float x)
++__ynf (int n, float x)
+ {
+ if (__builtin_expect (islessequal (x, 0.0f)
+ || isgreater (x, (float) X_TLOSS), 0)
+@@ -61,3 +65,5 @@ ynf (int n, float x)
+
+ return __ieee754_ynf (n, x);
+ }
++libm_alias_float (__yn, yn)
++#endif
+diff -purN glibc-org/math/w_jnl_compat.c glibc-2.26/math/w_jnl_compat.c
+--- glibc-org/math/w_jnl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_jnl_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -46,12 +46,15 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
++#if LIBM_SVID_COMPAT
+ long double __jnl(int n, long double x) /* wrapper jnl */
+ {
+-#ifdef _IEEE_LIBM
++# ifdef _IEEE_LIBM
+ return __ieee754_jnl(n,x);
+-#else
++# else
+ long double z;
+ z = __ieee754_jnl(n,x);
+ if (_LIB_VERSION == _IEEE_
+@@ -62,15 +65,15 @@ long double __jnl(int n, long double x)
+ return __kernel_standard_l((double)n,x,238); /* jn(|x|>X_TLOSS,n) */
+ } else
+ return z;
+-#endif
++# endif
+ }
+-weak_alias (__jnl, jnl)
++libm_alias_ldouble (__jn, jn)
+
+ long double __ynl(int n, long double x) /* wrapper ynl */
+ {
+-#ifdef _IEEE_LIBM
++# ifdef _IEEE_LIBM
+ return __ieee754_ynl(n,x);
+-#else
++# else
+ long double z;
+ z = __ieee754_ynl(n,x);
+ if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
+@@ -86,6 +89,7 @@ long double __ynl(int n, long double x)
+ return __kernel_standard_l((double)n,x,239); /* yn(x>X_TLOSS,n) */
+ } else
+ return z;
+-#endif
++# endif
+ }
+-weak_alias (__ynl, ynl)
++libm_alias_ldouble (__yn, yn)
++#endif
+diff -purN glibc-org/math/w_lgamma.c glibc-2.26/math/w_lgamma.c
+--- glibc-org/math/w_lgamma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_lgamma.c 2017-10-22 17:02:23.570967253 +0000
+@@ -0,0 +1,10 @@
++#include <math-type-macros-double.h>
++#include <w_lgamma_template.c>
++#if __USE_WRAPPER_TEMPLATE
++strong_alias (__lgamma, __gamma)
++weak_alias (__gamma, gamma)
++# ifdef NO_LONG_DOUBLE
++strong_alias (__gamma, __gammal)
++weak_alias (__gammal, gammal)
++# endif
++#endif
+diff -purN glibc-org/math/w_lgammaf.c glibc-2.26/math/w_lgammaf.c
+--- glibc-org/math/w_lgammaf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_lgammaf.c 2017-10-22 17:02:23.570967253 +0000
+@@ -0,0 +1,6 @@
++#include <math-type-macros-float.h>
++#include <w_lgamma_template.c>
++#if __USE_WRAPPER_TEMPLATE
++strong_alias (__lgammaf, __gammaf)
++weak_alias (__gammaf, gammaf)
++#endif
+diff -purN glibc-org/math/w_lgammaf_main.c glibc-2.26/math/w_lgammaf_main.c
+--- glibc-org/math/w_lgammaf_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_lgammaf_main.c 2017-10-22 17:02:23.571967253 +0000
+@@ -15,6 +15,8 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+ #include <lgamma-compat.h>
+
+@@ -36,6 +38,7 @@ LGFUNC (__lgammaf) (float x)
+ compat_symbol (libm, __lgammaf_compat, lgammaf, LGAMMA_OLD_VER);
+ # else
+ versioned_symbol (libm, __lgammaf, lgammaf, LGAMMA_NEW_VER);
++libm_alias_float_other (__lgamma, lgamma)
+ # endif
+ # if GAMMA_ALIAS
+ strong_alias (LGFUNC (__lgammaf), __gammaf)
+diff -purN glibc-org/math/w_lgammaf_r_compat.c glibc-2.26/math/w_lgammaf_r_compat.c
+--- glibc-org/math/w_lgammaf_r_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_lgammaf_r_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ float
+ __lgammaf_r(float x, int *signgamp)
+ {
+@@ -34,4 +37,5 @@ __lgammaf_r(float x, int *signgamp)
+
+ return y;
+ }
+-weak_alias (__lgammaf_r, lgammaf_r)
++libm_alias_float_r (__lgamma, lgamma, _r)
++#endif
+diff -purN glibc-org/math/w_lgammal.c glibc-2.26/math/w_lgammal.c
+--- glibc-org/math/w_lgammal.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_lgammal.c 2017-10-22 17:02:23.571967253 +0000
+@@ -0,0 +1,6 @@
++#include <math-type-macros-ldouble.h>
++#include <w_lgamma_template.c>
++#if __USE_WRAPPER_TEMPLATE
++strong_alias (__lgammal, __gammal)
++weak_alias (__gammal, gammal)
++#endif
+diff -purN glibc-org/math/w_lgammal_main.c glibc-2.26/math/w_lgammal_main.c
+--- glibc-org/math/w_lgammal_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_lgammal_main.c 2017-10-22 17:02:23.571967253 +0000
+@@ -22,6 +22,8 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+ #include <lgamma-compat.h>
+
+@@ -43,6 +45,7 @@ LGFUNC (__lgammal) (long double x)
+ compat_symbol (libm, __lgammal_compat, lgammal, LGAMMA_OLD_VER);
+ # else
+ versioned_symbol (libm, __lgammal, lgammal, LGAMMA_NEW_VER);
++libm_alias_ldouble_other (__lgamma, lgamma)
+ # endif
+ # if GAMMA_ALIAS
+ strong_alias (LGFUNC (__lgammal), __gammal)
+diff -purN glibc-org/math/w_lgammal_r_compat.c glibc-2.26/math/w_lgammal_r_compat.c
+--- glibc-org/math/w_lgammal_r_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_lgammal_r_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -20,8 +20,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ long double
+ __lgammal_r(long double x, int *signgamp)
+ {
+@@ -35,4 +38,5 @@ __lgammal_r(long double x, int *signgamp
+
+ return y;
+ }
+-weak_alias (__lgammal_r, lgammal_r)
++libm_alias_ldouble_r (__lgamma, lgamma, _r)
++#endif
+diff -purN glibc-org/math/w_lgamma_main.c glibc-2.26/math/w_lgamma_main.c
+--- glibc-org/math/w_lgamma_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_lgamma_main.c 2017-10-22 17:02:23.570967253 +0000
+@@ -18,6 +18,8 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+ #include <lgamma-compat.h>
+
+@@ -47,6 +49,7 @@ versioned_symbol (libm, __lgamma, lgamma
+ strong_alias (__lgamma, __lgammal)
+ versioned_symbol (libm, __lgammal, lgammal, LGAMMA_NEW_VER);
+ # endif
++libm_alias_double_other (__lgamma, lgamma)
+ # endif
+ # if GAMMA_ALIAS
+ strong_alias (LGFUNC (__lgamma), __gamma)
+diff -purN glibc-org/math/w_lgamma_r_compat.c glibc-2.26/math/w_lgamma_r_compat.c
+--- glibc-org/math/w_lgamma_r_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_lgamma_r_compat.c 2017-10-22 17:02:23.570967253 +0000
+@@ -16,8 +16,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ double
+ __lgamma_r(double x, int *signgamp)
+ {
+@@ -31,8 +34,5 @@ __lgamma_r(double x, int *signgamp)
+
+ return y;
+ }
+-weak_alias (__lgamma_r, lgamma_r)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__lgamma_r, __lgammal_r)
+-weak_alias (__lgamma_r, lgammal_r)
++libm_alias_double_r (__lgamma, lgamma, _r)
+ #endif
+diff -purN glibc-org/math/w_lgamma_r_template.c glibc-2.26/math/w_lgamma_r_template.c
+--- glibc-org/math/w_lgamma_r_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_lgamma_r_template.c 2017-10-22 17:02:23.570967253 +0000
+@@ -34,12 +34,6 @@
+ #define M_CALL_FUNC_R_S(x) M_CALL_FUNC_R_X (x)
+ #define M_CALL_FUNC_R(x) M_CALL_FUNC_R_S (M_SUF (x))
+
+-#define declare_mgen_alias_r_x(from, to) weak_alias (from ## _r, to ## _r)
+-#define declare_mgen_alias_r_s(from, to) \
+- declare_mgen_alias_r_x (from, to)
+-#define declare_mgen_alias_r(from, to) \
+- declare_mgen_alias_r_s (M_SUF (from), M_SUF (to))
+-
+ FLOAT
+ M_DECL_FUNC_R (__lgamma) (FLOAT x, int *signgamp)
+ {
+diff -purN glibc-org/math/w_log10_compat.c glibc-2.26/math/w_log10_compat.c
+--- glibc-org/math/w_log10_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_log10_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper log10(x) */
+ double
+ __log10 (double x)
+@@ -41,8 +44,5 @@ __log10 (double x)
+
+ return __ieee754_log10 (x);
+ }
+-weak_alias (__log10, log10)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__log10, __log10l)
+-weak_alias (__log10, log10l)
++libm_alias_double (__log10, log10)
+ #endif
+diff -purN glibc-org/math/w_log10f_compat.c glibc-2.26/math/w_log10f_compat.c
+--- glibc-org/math/w_log10f_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_log10f_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper log10f(x) */
+ float
+ __log10f (float x)
+@@ -41,4 +44,5 @@ __log10f (float x)
+
+ return __ieee754_log10f (x);
+ }
+-weak_alias (__log10f, log10f)
++libm_alias_float (__log10, log10)
++#endif
+diff -purN glibc-org/math/w_log10l_compat.c glibc-2.26/math/w_log10l_compat.c
+--- glibc-org/math/w_log10l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_log10l_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper log10l(x) */
+ long double
+ __log10l (long double x)
+@@ -41,4 +44,5 @@ __log10l (long double x)
+
+ return __ieee754_log10l (x);
+ }
+-weak_alias (__log10l, log10l)
++libm_alias_ldouble (__log10, log10)
++#endif
+diff -purN glibc-org/math/w_log2_compat.c glibc-2.26/math/w_log2_compat.c
+--- glibc-org/math/w_log2_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_log2_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper log2(x) */
+ double
+ __log2 (double x)
+@@ -41,8 +44,5 @@ __log2 (double x)
+
+ return __ieee754_log2 (x);
+ }
+-weak_alias (__log2, log2)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__log2, __log2l)
+-weak_alias (__log2, log2l)
++libm_alias_double (__log2, log2)
+ #endif
+diff -purN glibc-org/math/w_log2f.c glibc-2.26/math/w_log2f.c
+--- glibc-org/math/w_log2f.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_log2f.c 2017-10-22 17:02:23.571967253 +0000
+@@ -0,0 +1,8 @@
++#include <math-type-macros-float.h>
++#undef __USE_WRAPPER_TEMPLATE
++#define __USE_WRAPPER_TEMPLATE 1
++#undef declare_mgen_alias
++#define declare_mgen_alias(a, b)
++#include <w_log2_template.c>
++versioned_symbol (libm, __log2f, log2f, GLIBC_2_27);
++libm_alias_float_other (__log2, log2)
+diff -purN glibc-org/math/w_log2f_compat.c glibc-2.26/math/w_log2f_compat.c
+--- glibc-org/math/w_log2f_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_log2f_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,11 +19,14 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+ /* wrapper log2f(x) */
+ float
+-__log2f (float x)
++__log2f_compat (float x)
+ {
+ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
+ {
+@@ -41,4 +44,5 @@ __log2f (float x)
+
+ return __ieee754_log2f (x);
+ }
+-weak_alias (__log2f, log2f)
++compat_symbol (libm, __log2f_compat, log2f, GLIBC_2_1);
++#endif
+diff -purN glibc-org/math/w_log2l_compat.c glibc-2.26/math/w_log2l_compat.c
+--- glibc-org/math/w_log2l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_log2l_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper log2l(x) */
+ long double
+ __log2l (long double x)
+@@ -41,4 +44,5 @@ __log2l (long double x)
+
+ return __ieee754_log2l (x);
+ }
+-weak_alias (__log2l, log2l)
++libm_alias_ldouble (__log2, log2)
++#endif
+diff -purN glibc-org/math/w_log_compat.c glibc-2.26/math/w_log_compat.c
+--- glibc-org/math/w_log_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_log_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper log(x) */
+ double
+ __log (double x)
+@@ -41,8 +44,5 @@ __log (double x)
+
+ return __ieee754_log (x);
+ }
+-weak_alias (__log, log)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__log, __logl)
+-weak_alias (__log, logl)
++libm_alias_double (__log, log)
+ #endif
+diff -purN glibc-org/math/w_logf.c glibc-2.26/math/w_logf.c
+--- glibc-org/math/w_logf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_logf.c 2017-10-22 17:02:23.571967253 +0000
+@@ -0,0 +1,8 @@
++#include <math-type-macros-float.h>
++#undef __USE_WRAPPER_TEMPLATE
++#define __USE_WRAPPER_TEMPLATE 1
++#undef declare_mgen_alias
++#define declare_mgen_alias(a, b)
++#include <w_log_template.c>
++versioned_symbol (libm, __logf, logf, GLIBC_2_27);
++libm_alias_float_other (__log, log)
+diff -purN glibc-org/math/w_logf_compat.c glibc-2.26/math/w_logf_compat.c
+--- glibc-org/math/w_logf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_logf_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,11 +19,14 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
+ /* wrapper logf(x) */
+ float
+-__logf (float x)
++__logf_compat (float x)
+ {
+ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
+ {
+@@ -41,4 +44,5 @@ __logf (float x)
+
+ return __ieee754_logf (x);
+ }
+-weak_alias (__logf, logf)
++compat_symbol (libm, __logf_compat, logf, GLIBC_2_0);
++#endif
+diff -purN glibc-org/math/w_logl_compat.c glibc-2.26/math/w_logl_compat.c
+--- glibc-org/math/w_logl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_logl_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,11 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper logl(x) */
+ long double
+ __logl (long double x)
+@@ -41,4 +44,5 @@ __logl (long double x)
+
+ return __ieee754_logl (x);
+ }
+-weak_alias (__logl, logl)
++libm_alias_ldouble (__log, log)
++#endif
+diff -purN glibc-org/math/w_pow_compat.c glibc-2.26/math/w_pow_compat.c
+--- glibc-org/math/w_pow_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_pow_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper pow */
+ double
+ __pow (double x, double y)
+@@ -57,8 +60,5 @@ __pow (double x, double y)
+
+ return z;
+ }
+-weak_alias (__pow, pow)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__pow, __powl)
+-weak_alias (__pow, powl)
++libm_alias_double (__pow, pow)
+ #endif
+diff -purN glibc-org/math/w_powf.c glibc-2.26/math/w_powf.c
+--- glibc-org/math/w_powf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_powf.c 2017-10-22 17:02:23.571967253 +0000
+@@ -0,0 +1,8 @@
++#include <math-type-macros-float.h>
++#undef __USE_WRAPPER_TEMPLATE
++#define __USE_WRAPPER_TEMPLATE 1
++#undef declare_mgen_alias
++#define declare_mgen_alias(a, b)
++#include <w_pow_template.c>
++versioned_symbol (libm, __powf, powf, GLIBC_2_27);
++libm_alias_float_other (__pow, pow)
+diff -purN glibc-org/math/w_powf_compat.c glibc-2.26/math/w_powf_compat.c
+--- glibc-org/math/w_powf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_powf_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,11 +18,14 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
+ /* wrapper powf */
+ float
+-__powf (float x, float y)
++__powf_compat (float x, float y)
+ {
+ float z = __ieee754_powf (x, y);
+ if (__glibc_unlikely (!isfinite (z)))
+@@ -57,4 +60,5 @@ __powf (float x, float y)
+
+ return z;
+ }
+-weak_alias (__powf, powf)
++compat_symbol (libm, __powf_compat, powf, GLIBC_2_0);
++#endif
+diff -purN glibc-org/math/w_powl_compat.c glibc-2.26/math/w_powl_compat.c
+--- glibc-org/math/w_powl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_powl_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper powl */
+ long double
+ __powl (long double x, long double y)
+@@ -57,4 +60,5 @@ __powl (long double x, long double y)
+
+ return z;
+ }
+-weak_alias (__powl, powl)
++libm_alias_ldouble (__pow, pow)
++#endif
+diff -purN glibc-org/math/w_remainder.c glibc-2.26/math/w_remainder.c
+--- glibc-org/math/w_remainder.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_remainder.c 2017-10-22 17:02:23.571967253 +0000
+@@ -0,0 +1,8 @@
++#include <math-type-macros-double.h>
++#include <w_remainder_template.c>
++#if __USE_WRAPPER_TEMPLATE
++weak_alias (__remainder, drem)
++# ifdef NO_LONG_DOUBLE
++weak_alias (__remainder, dreml)
++# endif
++#endif
+diff -purN glibc-org/math/w_remainder_compat.c glibc-2.26/math/w_remainder_compat.c
+--- glibc-org/math/w_remainder_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_remainder_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper remainder */
+ double
+ __remainder (double x, double y)
+@@ -31,10 +34,9 @@ __remainder (double x, double y)
+
+ return __ieee754_remainder (x, y);
+ }
+-weak_alias (__remainder, remainder)
++libm_alias_double (__remainder, remainder)
+ weak_alias (__remainder, drem)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__remainder, __remainderl)
+-weak_alias (__remainder, remainderl)
++# ifdef NO_LONG_DOUBLE
+ weak_alias (__remainder, dreml)
++# endif
+ #endif
+diff -purN glibc-org/math/w_remainderf.c glibc-2.26/math/w_remainderf.c
+--- glibc-org/math/w_remainderf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_remainderf.c 2017-10-22 17:02:23.571967253 +0000
+@@ -0,0 +1,5 @@
++#include <math-type-macros-float.h>
++#include <w_remainder_template.c>
++#if __USE_WRAPPER_TEMPLATE
++weak_alias (__remainderf, dremf)
++#endif
+diff -purN glibc-org/math/w_remainderf_compat.c glibc-2.26/math/w_remainderf_compat.c
+--- glibc-org/math/w_remainderf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_remainderf_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper remainderf */
+ float
+ __remainderf (float x, float y)
+@@ -31,5 +34,6 @@ __remainderf (float x, float y)
+
+ return __ieee754_remainderf (x, y);
+ }
+-weak_alias (__remainderf, remainderf)
++libm_alias_float (__remainder, remainder)
+ weak_alias (__remainderf, dremf)
++#endif
+diff -purN glibc-org/math/w_remainderl.c glibc-2.26/math/w_remainderl.c
+--- glibc-org/math/w_remainderl.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/math/w_remainderl.c 2017-10-22 17:02:23.571967253 +0000
+@@ -0,0 +1,5 @@
++#include <math-type-macros-ldouble.h>
++#include <w_remainder_template.c>
++#if __USE_WRAPPER_TEMPLATE
++weak_alias (__remainderl, dreml)
++#endif
+diff -purN glibc-org/math/w_remainderl_compat.c glibc-2.26/math/w_remainderl_compat.c
+--- glibc-org/math/w_remainderl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_remainderl_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper remainderl */
+ long double
+ __remainderl (long double x, long double y)
+@@ -31,5 +34,6 @@ __remainderl (long double x, long double
+
+ return __ieee754_remainderl (x, y);
+ }
+-weak_alias (__remainderl, remainderl)
++libm_alias_ldouble (__remainder, remainder)
+ weak_alias (__remainderl, dreml)
++#endif
+diff -purN glibc-org/math/w_scalb_compat.c glibc-2.26/math/w_scalb_compat.c
+--- glibc-org/math/w_scalb_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_scalb_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,10 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
+
+
++#if LIBM_SVID_COMPAT
+ static double
+ __attribute__ ((noinline))
+ sysv_scalb (double x, double fn)
+@@ -39,15 +41,18 @@ sysv_scalb (double x, double fn)
+
+ return z;
+ }
++#endif
+
+
+ /* Wrapper scalb */
+ double
+ __scalb (double x, double fn)
+ {
++#if LIBM_SVID_COMPAT
+ if (__glibc_unlikely (_LIB_VERSION == _SVID_))
+ return sysv_scalb (x, fn);
+ else
++#endif
+ {
+ double z = __ieee754_scalb (x, fn);
+
+diff -purN glibc-org/math/w_scalbf_compat.c glibc-2.26/math/w_scalbf_compat.c
+--- glibc-org/math/w_scalbf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_scalbf_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,10 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
+
+
++#if LIBM_SVID_COMPAT
+ static float
+ __attribute__ ((noinline))
+ sysv_scalbf (float x, float fn)
+@@ -39,15 +41,18 @@ sysv_scalbf (float x, float fn)
+
+ return z;
+ }
++#endif
+
+
+ /* Wrapper scalbf */
+ float
+ __scalbf (float x, float fn)
+ {
++#if LIBM_SVID_COMPAT
+ if (__glibc_unlikely (_LIB_VERSION == _SVID_))
+ return sysv_scalbf (x, fn);
+ else
++#endif
+ {
+ float z = __ieee754_scalbf (x, fn);
+
+diff -purN glibc-org/math/w_scalbl_compat.c glibc-2.26/math/w_scalbl_compat.c
+--- glibc-org/math/w_scalbl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_scalbl_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,8 +19,10 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
+
+
++#if LIBM_SVID_COMPAT
+ static long double
+ __attribute__ ((noinline))
+ sysv_scalbl (long double x, long double fn)
+@@ -39,15 +41,18 @@ sysv_scalbl (long double x, long double
+
+ return z;
+ }
++#endif
+
+
+ /* Wrapper scalbl */
+ long double
+ __scalbl (long double x, long double fn)
+ {
++#if LIBM_SVID_COMPAT
+ if (__glibc_unlikely (_LIB_VERSION == _SVID_))
+ return sysv_scalbl (x, fn);
+ else
++#endif
+ {
+ long double z = __ieee754_scalbl (x, fn);
+
+diff -purN glibc-org/math/w_scalbln_template.c glibc-2.26/math/w_scalbln_template.c
+--- glibc-org/math/w_scalbln_template.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_scalbln_template.c 2017-10-22 17:02:23.571967253 +0000
+@@ -34,8 +34,4 @@ M_DECL_FUNC (__w_scalbln) (FLOAT x, long
+ return x;
+ }
+
+-/* Define strong_alias to nothing because we don't want
+- declare_mgen_alias to create a strong alias for scalblnl. */
+-#undef strong_alias
+-#define strong_alias(name, alias_name)
+ declare_mgen_alias (__w_scalbln, scalbln)
+diff -purN glibc-org/math/w_sinh_compat.c glibc-2.26/math/w_sinh_compat.c
+--- glibc-org/math/w_sinh_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_sinh_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -16,7 +16,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
++#if LIBM_SVID_COMPAT
+ double
+ __sinh (double x)
+ {
+@@ -27,8 +30,5 @@ __sinh (double x)
+
+ return z;
+ }
+-weak_alias (__sinh, sinh)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__sinh, __sinhl)
+-weak_alias (__sinh, sinhl)
++libm_alias_double (__sinh, sinh)
+ #endif
+diff -purN glibc-org/math/w_sinhf_compat.c glibc-2.26/math/w_sinhf_compat.c
+--- glibc-org/math/w_sinhf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_sinhf_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -19,7 +19,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
++#if LIBM_SVID_COMPAT
+ float
+ __sinhf (float x)
+ {
+@@ -30,4 +33,5 @@ __sinhf (float x)
+
+ return z;
+ }
+-weak_alias (__sinhf, sinhf)
++libm_alias_float (__sinh, sinh)
++#endif
+diff -purN glibc-org/math/w_sinhl_compat.c glibc-2.26/math/w_sinhl_compat.c
+--- glibc-org/math/w_sinhl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_sinhl_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -20,7 +20,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
++#if LIBM_SVID_COMPAT
+ long double
+ __sinhl (long double x)
+ {
+@@ -31,4 +34,5 @@ __sinhl (long double x)
+
+ return z;
+ }
+-weak_alias (__sinhl, sinhl)
++libm_alias_ldouble (__sinh, sinh)
++#endif
+diff -purN glibc-org/math/w_sqrt_compat.c glibc-2.26/math/w_sqrt_compat.c
+--- glibc-org/math/w_sqrt_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_sqrt_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper sqrt */
+ double
+ __sqrt (double x)
+@@ -29,8 +32,5 @@ __sqrt (double x)
+
+ return __ieee754_sqrt (x);
+ }
+-weak_alias (__sqrt, sqrt)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__sqrt, __sqrtl)
+-weak_alias (__sqrt, sqrtl)
++libm_alias_double (__sqrt, sqrt)
+ #endif
+diff -purN glibc-org/math/w_sqrtf_compat.c glibc-2.26/math/w_sqrtf_compat.c
+--- glibc-org/math/w_sqrtf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_sqrtf_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper sqrtf */
+ float
+ __sqrtf (float x)
+@@ -29,4 +32,5 @@ __sqrtf (float x)
+
+ return __ieee754_sqrtf (x);
+ }
+-weak_alias (__sqrtf, sqrtf)
++libm_alias_float (__sqrt, sqrt)
++#endif
+diff -purN glibc-org/math/w_sqrtl_compat.c glibc-2.26/math/w_sqrtl_compat.c
+--- glibc-org/math/w_sqrtl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_sqrtl_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,8 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* wrapper sqrtl */
+ long double
+ __sqrtl (long double x)
+@@ -29,4 +32,5 @@ __sqrtl (long double x)
+
+ return __ieee754_sqrtl (x);
+ }
+-weak_alias (__sqrtl, sqrtl)
++libm_alias_ldouble (__sqrt, sqrt)
++#endif
+diff -purN glibc-org/math/w_tgamma_compat.c glibc-2.26/math/w_tgamma_compat.c
+--- glibc-org/math/w_tgamma_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_tgamma_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -18,7 +18,10 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-double.h>
+
++#if LIBM_SVID_COMPAT
+ double
+ __tgamma(double x)
+ {
+@@ -39,8 +42,5 @@ __tgamma(double x)
+ }
+ return local_signgam < 0 ? -y : y;
+ }
+-weak_alias (__tgamma, tgamma)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__tgamma, __tgammal)
+-weak_alias (__tgamma, tgammal)
++libm_alias_double (__tgamma, tgamma)
+ #endif
+diff -purN glibc-org/math/w_tgammaf_compat.c glibc-2.26/math/w_tgammaf_compat.c
+--- glibc-org/math/w_tgammaf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_tgammaf_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -16,7 +16,10 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-float.h>
+
++#if LIBM_SVID_COMPAT
+ float
+ __tgammaf(float x)
+ {
+@@ -41,4 +44,5 @@ __tgammaf(float x)
+ }
+ return local_signgam < 0 ? - y : y;
+ }
+-weak_alias (__tgammaf, tgammaf)
++libm_alias_float (__tgamma, tgamma)
++#endif
+diff -purN glibc-org/math/w_tgammal_compat.c glibc-2.26/math/w_tgammal_compat.c
+--- glibc-org/math/w_tgammal_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/math/w_tgammal_compat.c 2017-10-22 17:02:23.571967253 +0000
+@@ -21,7 +21,10 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
++#include <libm-alias-ldouble.h>
+
++#if LIBM_SVID_COMPAT
+ long double
+ __tgammal(long double x)
+ {
+@@ -42,4 +45,5 @@ __tgammal(long double x)
+ }
+ return local_signgam < 0 ? - y : y;
+ }
+-weak_alias (__tgammal, tgammal)
++libm_alias_ldouble (__tgamma, tgamma)
++#endif
+diff -purN glibc-org/sysdeps/generic/libm-alias-double.h glibc-2.26/sysdeps/generic/libm-alias-double.h
+--- glibc-org/sysdeps/generic/libm-alias-double.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/generic/libm-alias-double.h 2017-10-22 17:15:57.164198167 +0000
+@@ -0,0 +1,54 @@
++/* Define aliases for libm double functions.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _LIBM_ALIAS_DOUBLE_H
++#define _LIBM_ALIAS_DOUBLE_H
++
++/* Define _FloatN / _FloatNx aliases for a double libm function that
++ has internal name FROM ## R and public names TO ## suffix ## R for
++ each suffix of a supported _FloatN / _FloatNx floating-point type
++ with the same format as double. */
++#define libm_alias_double_other_r(from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_double_other(from, to) \
++ libm_alias_double_other_r (from, to, )
++
++/* Define aliases for a double libm function that has internal name
++ FROM ## R and public names TO ## suffix ## R for each suffix of a
++ supported floating-point type with the same format as double. This
++ should only be used for functions where such public names exist for
++ _FloatN types, not for implementation-namespace exported names
++ (where there is one name per format, not per type) or for
++ obsolescent functions not provided for _FloatN types. */
++#ifdef NO_LONG_DOUBLE
++# define libm_alias_double_r(from, to, r) \
++ weak_alias (from ## r, to ## r) \
++ strong_alias (from ## r, from ## l ## r) \
++ weak_alias (from ## r, to ## l ## r) \
++ libm_alias_double_other_r (from, to, r)
++#else
++# define libm_alias_double_r(from, to, r) \
++ weak_alias (from ## r, to ## r) \
++ libm_alias_double_other_r (from, to, r)
++#endif
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_double(from, to) libm_alias_double_r (from, to, )
++
++#endif
+diff -purN glibc-org/sysdeps/generic/libm-alias-float128.h glibc-2.26/sysdeps/generic/libm-alias-float128.h
+--- glibc-org/sysdeps/generic/libm-alias-float128.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/generic/libm-alias-float128.h 2017-10-22 17:15:57.164198167 +0000
+@@ -0,0 +1,48 @@
++/* Define aliases for libm _Float128 functions.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _LIBM_ALIAS_FLOAT128_H
++#define _LIBM_ALIAS_FLOAT128_H
++
++/* Define _FloatN / _FloatNx aliases (other than that for _Float128)
++ for a _Float128 libm function that has internal name FROM ## f128
++ ## R and public names TO ## suffix ## R for each suffix of a
++ supported _FloatN / _FloatNx floating-point type with the same
++ format as _Float128. */
++#define libm_alias_float128_other_r(from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_float128_other(from, to) \
++ libm_alias_float128_other_r (from, to, )
++
++/* Define aliases for a _Float128 libm function that has internal name
++ FROM ## f128 ## R and public names TO ## suffix ## R for each
++ suffix of a supported floating-point type with the same format as
++ _Float128. This should only be used for functions where such
++ public names exist for _FloatN types, not for
++ implementation-namespace exported names (where there is one name
++ per format, not per type) or for obsolescent functions not provided
++ for _FloatN types. */
++#define libm_alias_float128_r(from, to, r) \
++ weak_alias (from ## f128 ## r, to ## f128 ## r) \
++ libm_alias_float128_other_r (from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_float128(from, to) libm_alias_float128_r (from, to, )
++
++#endif
+diff -purN glibc-org/sysdeps/generic/libm-alias-float.h glibc-2.26/sysdeps/generic/libm-alias-float.h
+--- glibc-org/sysdeps/generic/libm-alias-float.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/generic/libm-alias-float.h 2017-10-22 17:15:57.164198167 +0000
+@@ -0,0 +1,46 @@
++/* Define aliases for libm float functions.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _LIBM_ALIAS_FLOAT_H
++#define _LIBM_ALIAS_FLOAT_H
++
++/* Define _FloatN / _FloatNx aliases for a float libm function that
++ has internal name FROM ## f ## R and public names TO ## suffix ## R
++ for each suffix of a supported _FloatN / _FloatNx floating-point
++ type with the same format as float. */
++#define libm_alias_float_other_r(from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_float_other(from, to) \
++ libm_alias_float_other_r (from, to, )
++
++/* Define aliases for a float libm function that has internal name
++ FROM ## f ## R and public names TO ## suffix ## R for each suffix
++ of a supported floating-point type with the same format as float.
++ This should only be used for functions where such public names
++ exist for _FloatN types, not for implementation-namespace exported
++ names (where there is one name per format, not per type) or for
++ obsolescent functions not provided for _FloatN types. */
++#define libm_alias_float_r(from, to, r) \
++ weak_alias (from ## f ## r, to ## f ## r) \
++ libm_alias_float_other_r (from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_float(from, to) libm_alias_float_r (from, to, )
++
++#endif
+diff -purN glibc-org/sysdeps/generic/libm-alias-ldouble.h glibc-2.26/sysdeps/generic/libm-alias-ldouble.h
+--- glibc-org/sysdeps/generic/libm-alias-ldouble.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/generic/libm-alias-ldouble.h 2017-10-22 17:15:57.164198167 +0000
+@@ -0,0 +1,54 @@
++/* Define aliases for libm long double functions.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _LIBM_ALIAS_LDOUBLE_H
++#define _LIBM_ALIAS_LDOUBLE_H
++
++#include <bits/floatn.h>
++
++/* Define _FloatN / _FloatNx aliases for a long double libm function
++ that has internal name FROM ## l ## R and public names TO ## suffix
++ ## R for each suffix of a supported _FloatN / _FloatNx
++ floating-point type with the same format as long double. */
++#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
++# define libm_alias_ldouble_other_r(from, to, r) \
++ weak_alias (from ## l ## r, to ## f128 ## r)
++#else
++# define libm_alias_ldouble_other_r(from, to, r)
++#endif
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_ldouble_other(from, to) \
++ libm_alias_ldouble_other_r (from, to, )
++
++/* Define aliases for a long double libm function that has internal
++ name FROM ## l ## R and public names TO ## suffix ## R for each
++ suffix of a supported floating-point type with the same format as
++ long double. This should only be used for functions where such
++ public names exist for _FloatN types, not for
++ implementation-namespace exported names (where there is one name
++ per format, not per type) or for obsolescent functions not provided
++ for _FloatN types. */
++#define libm_alias_ldouble_r(from, to, r) \
++ weak_alias (from ## l ## r, to ## l ## r) \
++ libm_alias_ldouble_other_r (from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_ldouble(from, to) libm_alias_ldouble_r (from, to, )
++
++#endif
+diff -purN glibc-org/sysdeps/generic/math-type-macros-double.h glibc-2.26/sysdeps/generic/math-type-macros-double.h
+--- glibc-org/sysdeps/generic/math-type-macros-double.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/generic/math-type-macros-double.h 2017-10-22 23:04:05.863090977 +0000
+@@ -27,27 +27,22 @@
+ #define CFLOAT _Complex double
+ #define M_STRTO_NAN __strtod_nan
+
+-/* Machines without a distinct long double type
+- alias long double functions to their double
+- equivalent. */
+-#if defined NO_LONG_DOUBLE && !defined declare_mgen_alias
+-# define declare_mgen_alias(from, to) \
+- weak_alias (from, to) \
+- strong_alias (from, from ## l) \
+- weak_alias (from, to ## l)
++#include <libm-alias-double.h>
++
++#ifndef declare_mgen_alias
++# define declare_mgen_alias(from, to) libm_alias_double (from, to)
+ #endif
+
+-#if defined NO_LONG_DOUBLE && !defined declare_mgen_alias_2
+-# define declare_mgen_alias_2(from, to, to2) \
+- declare_mgen_alias (from, to) \
+- weak_alias (from, to2) \
+- weak_alias (from, to2 ## l)
++#ifndef declare_mgen_alias_r
++# define declare_mgen_alias_r(from, to) libm_alias_double_r (from, to, _r)
+ #endif
+
+ /* Supply the generic macros. */
+ #include <math-type-macros.h>
+
+-/* Do not use the type-generic wrapper templates. */
+-#define __USE_WRAPPER_TEMPLATE 0
++/* Do not use the type-generic wrapper templates if compatibility with
++ SVID error handling is needed. */
++#include <math-svid-compat.h>
++#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT
+
+ #endif
+diff -purN glibc-org/sysdeps/generic/math-type-macros-float128.h glibc-2.26/sysdeps/generic/math-type-macros-float128.h
+--- glibc-org/sysdeps/generic/math-type-macros-float128.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/generic/math-type-macros-float128.h 2017-10-22 23:04:05.863090977 +0000
+@@ -32,6 +32,15 @@
+
+ #define M_MLIT(c) c ## f128
+
++#include <libm-alias-float128.h>
++
++#ifndef declare_mgen_alias
++# define declare_mgen_alias(from, to) libm_alias_float128 (from, to)
++#endif
++
++#ifndef declare_mgen_alias_r
++# define declare_mgen_alias_r(from, to) libm_alias_float128_r (from, to, _r)
++#endif
+
+ /* Supply the generic macros. */
+ #include <math-type-macros.h>
+diff -purN glibc-org/sysdeps/generic/math-type-macros-float.h glibc-2.26/sysdeps/generic/math-type-macros-float.h
+--- glibc-org/sysdeps/generic/math-type-macros-float.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/generic/math-type-macros-float.h 2017-10-22 23:04:05.863090977 +0000
+@@ -30,10 +30,22 @@
+ the double macro constants. */
+ #define M_MLIT(c) c
+
++#include <libm-alias-float.h>
++
++#ifndef declare_mgen_alias
++# define declare_mgen_alias(from, to) libm_alias_float (from, to)
++#endif
++
++#ifndef declare_mgen_alias_r
++# define declare_mgen_alias_r(from, to) libm_alias_float_r (from, to, _r)
++#endif
++
+ /* Supply the generic macros. */
+ #include <math-type-macros.h>
+
+-/* Do not use the type-generic wrapper templates. */
+-#define __USE_WRAPPER_TEMPLATE 0
++/* Do not use the type-generic wrapper templates if compatibility with
++ SVID error handling is needed. */
++#include <math-svid-compat.h>
++#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT
+
+ #endif
+diff -purN glibc-org/sysdeps/generic/math-type-macros.h glibc-2.26/sysdeps/generic/math-type-macros.h
+--- glibc-org/sysdeps/generic/math-type-macros.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/generic/math-type-macros.h 2017-10-22 23:04:05.863090977 +0000
+@@ -34,26 +34,13 @@
+ converts a string into the appropriate FLOAT nan
+ value.
+
+- Optionally, these headers may inject a non-standard
+- definition for the following:
+-
+ declare_mgen_alias(from,to)
+ This exposes the appropriate symbol(s) for a
+ function f of type FLOAT.
+
+- declare_mgen_alias_2(from,to,to2)
++ declare_mgen_alias_r(from,to)
+ This exposes the appropriate symbol(s) for a
+- function f of type FLOAT when it is aliased
+- to two symbols.
+-
+- M_LIBM_NEED_COMPAT(func)
+- This is utilized in macro context to indicate
+- whether func should declare compat symbols.
+-
+- declare_mgen_libm_compat(from,to)
+- This is used in conjunction with the above macro
+- outside of macro context to paste whatever is
+- required to generate a compat symbol. */
++ function f_r of type FLOAT. */
+
+ #ifndef M_PFX
+ # error "M_PFX must be defined."
+@@ -73,6 +60,12 @@
+ #ifndef CFLOAT
+ # error "CFLOAT must be defined."
+ #endif
++#ifndef declare_mgen_alias
++# error "declare_mgen_alias must be defined."
++#endif
++#ifndef declare_mgen_alias_r
++# error "declare_mgen_alias_r must be defined."
++#endif
+
+ #define __M_CONCAT(a,b) a ## b
+ #define __M_CONCATX(a,b) __M_CONCAT(a,b)
+@@ -116,22 +109,4 @@
+ # define M_DECL_FUNC(f) M_SUF (f)
+ #endif
+
+-/* If the type does not declare special aliasing, use the default. */
+-#ifndef declare_mgen_alias
+-# define declare_mgen_alias(from, to) weak_alias (M_SUF (from), M_SUF (to))
+-#endif
+-
+-/* Likewise, if two aliases are derived from the same symbol. */
+-#ifndef declare_mgen_alias_2
+-# define declare_mgen_alias_2(from, to, to2) \
+- declare_mgen_alias (from, to) \
+- declare_mgen_alias (from, to2)
+-#endif
+-
+-/* Do not generate anything for compat symbols by default. */
+-#ifndef M_LIBM_NEED_COMPAT
+-# define M_LIBM_NEED_COMPAT(func) 0
+-# define declare_mgen_libm_compat(from, to)
+-#endif
+-
+ #endif /* _MATH_TYPE_MACROS */
+diff -purN glibc-org/sysdeps/generic/math-type-macros-ldouble.h glibc-2.26/sysdeps/generic/math-type-macros-ldouble.h
+--- glibc-org/sysdeps/generic/math-type-macros-ldouble.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/generic/math-type-macros-ldouble.h 2017-10-22 23:04:05.863090977 +0000
+@@ -27,10 +27,22 @@
+ #define CFLOAT _Complex long double
+ #define M_STRTO_NAN __strtold_nan
+
++#include <libm-alias-ldouble.h>
++
++#ifndef declare_mgen_alias
++# define declare_mgen_alias(from, to) libm_alias_ldouble (from, to)
++#endif
++
++#ifndef declare_mgen_alias_r
++# define declare_mgen_alias_r(from, to) libm_alias_ldouble_r (from, to, _r)
++#endif
++
+ /* Supply the generic macros. */
+ #include <math-type-macros.h>
+
+-/* Do not use the type-generic wrapper templates. */
+-#define __USE_WRAPPER_TEMPLATE 0
++/* Do not use the type-generic wrapper templates if compatibility with
++ SVID error handling is needed. */
++#include <math-svid-compat.h>
++#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT
+
+ #endif
+diff -purN glibc-org/sysdeps/i386/fpu/e_exp2f.S glibc-2.26/sysdeps/i386/fpu/e_exp2f.S
+--- glibc-org/sysdeps/i386/fpu/e_exp2f.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/e_exp2f.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,52 +0,0 @@
+-/*
+- * Written by J.T. Conklin <jtc@netbsd.org>.
+- * Adapted for exp2 by Ulrich Drepper <drepper@cygnus.com>.
+- * Public domain.
+- */
+-
+-#include <machine/asm.h>
+-#include <i386-math-asm.h>
+-
+-DEFINE_FLT_MIN
+-
+-#ifdef PIC
+-# define MO(op) op##@GOTOFF(%ecx)
+-#else
+-# define MO(op) op
+-#endif
+-
+- .text
+-ENTRY(__ieee754_exp2f)
+-#ifdef PIC
+- LOAD_PIC_REG (cx)
+-#endif
+- flds 4(%esp)
+-/* I added the following ugly construct because exp(+-Inf) resulted
+- in NaN. The ugliness results from the bright minds at Intel.
+- For the i686 the code can be written better.
+- -- drepper@cygnus.com. */
+- fxam /* Is NaN or +-Inf? */
+- fstsw %ax
+- movb $0x45, %dh
+- andb %ah, %dh
+- cmpb $0x05, %dh
+- je 1f /* Is +-Inf, jump. */
+- fld %st
+- frndint /* int(x) */
+- fsubr %st,%st(1) /* fract(x) */
+- fxch
+- f2xm1 /* 2^(fract(x)) - 1 */
+- fld1
+- faddp /* 2^(fract(x)) */
+- fscale /* e^x */
+- fstp %st(1)
+- FLT_NARROW_EVAL_UFLOW_NONNEG_NAN
+- ret
+-
+-1: testl $0x200, %eax /* Test sign. */
+- jz 2f /* If positive, jump. */
+- fstp %st
+- fldz /* Set result to 0. */
+-2: ret
+-END (__ieee754_exp2f)
+-strong_alias (__ieee754_exp2f, __exp2f_finite)
+diff -purN glibc-org/sysdeps/i386/fpu/e_expf.S glibc-2.26/sysdeps/i386/fpu/e_expf.S
+--- glibc-org/sysdeps/i386/fpu/e_expf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/e_expf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,74 +0,0 @@
+-/*
+- * Written by J.T. Conklin <jtc@netbsd.org>.
+- * Public domain.
+- * Adapted for float type by Ulrich Drepper <drepper@cygnus.com>.
+- */
+-
+-#include <machine/asm.h>
+-#include <i386-math-asm.h>
+-
+-DEFINE_FLT_MIN
+-
+-#ifdef PIC
+-# define MO(op) op##@GOTOFF(%ecx)
+-#else
+-# define MO(op) op
+-#endif
+-
+- .text
+-/* e^x = 2^(x * log2(e)) */
+-ENTRY(__ieee754_expf)
+-#ifdef PIC
+- LOAD_PIC_REG (cx)
+-#endif
+- flds 4(%esp)
+-/* I added the following ugly construct because exp(+-Inf) resulted
+- in NaN. The ugliness results from the bright minds at Intel.
+- For the i686 the code can be written better.
+- -- drepper@cygnus.com. */
+- fxam /* Is NaN or +-Inf? */
+- fstsw %ax
+- movb $0x45, %dh
+- andb %ah, %dh
+- cmpb $0x05, %dh
+- je 1f /* Is +-Inf, jump. */
+- fldl2e
+- fmulp /* x * log2(e) */
+- fld %st
+- frndint /* int(x * log2(e)) */
+- fsubr %st,%st(1) /* fract(x * log2(e)) */
+- fxch
+- f2xm1 /* 2^(fract(x * log2(e))) - 1 */
+- fld1
+- faddp /* 2^(fract(x * log2(e))) */
+- fscale /* e^x */
+- fstp %st(1)
+- FLT_NARROW_EVAL_UFLOW_NONNEG_NAN
+- ret
+-
+-1: testl $0x200, %eax /* Test sign. */
+- jz 2f /* If positive, jump. */
+- fstp %st
+- fldz /* Set result to 0. */
+-2: ret
+-END (__ieee754_expf)
+-
+-
+-ENTRY(__expf_finite)
+-#ifdef PIC
+- LOAD_PIC_REG (cx)
+-#endif
+- fldl2e
+- fmuls 4(%esp) /* x * log2(e) */
+- fld %st
+- frndint /* int(x * log2(e)) */
+- fsubr %st,%st(1) /* fract(x * log2(e)) */
+- fxch
+- f2xm1 /* 2^(fract(x * log2(e))) - 1 */
+- fld1
+- faddp /* 2^(fract(x * log2(e))) */
+- fscale /* e^x */
+- fstp %st(1)
+- FLT_NARROW_EVAL_UFLOW_NONNEG
+- ret
+-END(__expf_finite)
+diff -purN glibc-org/sysdeps/i386/fpu/e_log2f.S glibc-2.26/sysdeps/i386/fpu/e_log2f.S
+--- glibc-org/sysdeps/i386/fpu/e_log2f.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/e_log2f.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,69 +0,0 @@
+-/*
+- * Written by J.T. Conklin <jtc@netbsd.org>.
+- * Adapted for use as log2 by Ulrich Drepper <drepper@cygnus.com>.
+- * Public domain.
+- *
+- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
+- */
+-
+-#include <machine/asm.h>
+-
+- .section .rodata.cst8,"aM",@progbits,8
+-
+- .p2align 3
+- .type one,@object
+-one: .double 1.0
+- ASM_SIZE_DIRECTIVE(one)
+- /* It is not important that this constant is precise. It is only
+- a value which is known to be on the safe side for using the
+- fyl2xp1 instruction. */
+- .type limit,@object
+-limit: .double 0.29
+- ASM_SIZE_DIRECTIVE(limit)
+-
+-
+-#ifdef PIC
+-# define MO(op) op##@GOTOFF(%edx)
+-#else
+-# define MO(op) op
+-#endif
+-
+- .text
+-ENTRY(__ieee754_log2f)
+-#ifdef PIC
+- LOAD_PIC_REG (dx)
+-#endif
+- fldl MO(one)
+- flds 4(%esp) // x : 1
+- fxam
+- fnstsw
+- fld %st // x : x : 1
+- sahf
+- jc 3f // in case x is NaN or ±Inf
+-4: fsub %st(2), %st // x-1 : x : 1
+- fld %st // x-1 : x-1 : x : 1
+- fabs // |x-1| : x-1 : x : 1
+- fcompl MO(limit) // x-1 : x : 1
+- fnstsw // x-1 : x : 1
+- andb $0x45, %ah
+- jz 2f
+- fxam
+- fnstsw
+- andb $0x45, %ah
+- cmpb $0x40, %ah
+- jne 5f
+- fabs // log2(1) is +0 in all rounding modes.
+-5: fstp %st(1) // x-1 : 1
+- fyl2xp1 // log(x)
+- ret
+-
+-2: fstp %st(0) // x : 1
+- fyl2x // log(x)
+- ret
+-
+-3: jp 4b // in case x is ±Inf
+- fstp %st(1)
+- fstp %st(1)
+- ret
+-END (__ieee754_log2f)
+-strong_alias (__ieee754_log2f, __log2f_finite)
+diff -purN glibc-org/sysdeps/i386/fpu/e_logf.S glibc-2.26/sysdeps/i386/fpu/e_logf.S
+--- glibc-org/sysdeps/i386/fpu/e_logf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/e_logf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,93 +0,0 @@
+-/*
+- * Written by J.T. Conklin <jtc@netbsd.org>.
+- * Public domain.
+- * Adapted for float by Ulrich Drepper <drepper@cygnus.com>.
+- *
+- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
+- */
+-
+-#include <machine/asm.h>
+-
+- .section .rodata.cst8,"aM",@progbits,8
+-
+- .p2align 3
+- .type one,@object
+-one: .double 1.0
+- ASM_SIZE_DIRECTIVE(one)
+- /* It is not important that this constant is precise. It is only
+- a value which is known to be on the safe side for using the
+- fyl2xp1 instruction. */
+- .type limit,@object
+-limit: .double 0.29
+- ASM_SIZE_DIRECTIVE(limit)
+-
+-
+-#ifdef PIC
+-# define MO(op) op##@GOTOFF(%edx)
+-#else
+-# define MO(op) op
+-#endif
+-
+- .text
+-ENTRY(__ieee754_logf)
+- fldln2 // log(2)
+- flds 4(%esp) // x : log(2)
+- fxam
+- fnstsw
+-#ifdef PIC
+- LOAD_PIC_REG (dx)
+-#endif
+- fld %st // x : x : log(2)
+- sahf
+- jc 3f // in case x is NaN or +-Inf
+-4: fsubl MO(one) // x-1 : x : log(2)
+- fld %st // x-1 : x-1 : x : log(2)
+- fabs // |x-1| : x-1 : x : log(2)
+- fcompl MO(limit) // x-1 : x : log(2)
+- fnstsw // x-1 : x : log(2)
+- andb $0x45, %ah
+- jz 2f
+- fxam
+- fnstsw
+- andb $0x45, %ah
+- cmpb $0x40, %ah
+- jne 5f
+- fabs // log(1) is +0 in all rounding modes.
+-5: fstp %st(1) // x-1 : log(2)
+- fyl2xp1 // log(x)
+- ret
+-
+-2: fstp %st(0) // x : log(2)
+- fyl2x // log(x)
+- ret
+-
+-3: jp 4b // in case x is +-Inf
+- fstp %st(1)
+- fstp %st(1)
+- ret
+-END (__ieee754_logf)
+-
+-ENTRY(__logf_finite)
+- fldln2 // log(2)
+- flds 4(%esp) // x : log(2)
+-#ifdef PIC
+- LOAD_PIC_REG (dx)
+-#endif
+- fld %st // x : x : log(2)
+- fsubl MO(one) // x-1 : x : log(2)
+- fld %st // x-1 : x-1 : x : log(2)
+- fabs // |x-1| : x-1 : x : log(2)
+- fcompl MO(limit) // x-1 : x : log(2)
+- fnstsw // x-1 : x : log(2)
+- andb $0x45, %ah
+- jz 2b
+- fxam
+- fnstsw
+- andb $0x45, %ah
+- cmpb $0x40, %ah
+- jne 6f
+- fabs // log(1) is +0 in all rounding modes.
+-6: fstp %st(1) // x-1 : log(2)
+- fyl2xp1 // log(x)
+- ret
+-END(__logf_finite)
+diff -purN glibc-org/sysdeps/i386/fpu/e_powf.S glibc-2.26/sysdeps/i386/fpu/e_powf.S
+--- glibc-org/sysdeps/i386/fpu/e_powf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/e_powf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,392 +0,0 @@
+-/* ix87 specific implementation of pow function.
+- Copyright (C) 1996-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+-
+- 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 <machine/asm.h>
+-#include <i386-math-asm.h>
+-
+- .section .rodata.cst8,"aM",@progbits,8
+-
+- .p2align 3
+- .type one,@object
+-one: .double 1.0
+- ASM_SIZE_DIRECTIVE(one)
+- .type limit,@object
+-limit: .double 0.29
+- ASM_SIZE_DIRECTIVE(limit)
+- .type p31,@object
+-p31: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x41
+- ASM_SIZE_DIRECTIVE(p31)
+-
+- .section .rodata.cst16,"aM",@progbits,16
+-
+- .p2align 3
+- .type infinity,@object
+-inf_zero:
+-infinity:
+- .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
+- ASM_SIZE_DIRECTIVE(infinity)
+- .type zero,@object
+-zero: .double 0.0
+- ASM_SIZE_DIRECTIVE(zero)
+- .type minf_mzero,@object
+-minf_mzero:
+-minfinity:
+- .byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
+-mzero:
+- .byte 0, 0, 0, 0, 0, 0, 0, 0x80
+- ASM_SIZE_DIRECTIVE(minf_mzero)
+-DEFINE_FLT_MIN
+-
+-#ifdef PIC
+-# define MO(op) op##@GOTOFF(%ecx)
+-# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
+-#else
+-# define MO(op) op
+-# define MOX(op,x,f) op(,x,f)
+-#endif
+-
+- .text
+-ENTRY(__ieee754_powf)
+- flds 8(%esp) // y
+- fxam
+-
+-#ifdef PIC
+- LOAD_PIC_REG (cx)
+-#endif
+-
+- fnstsw
+- movb %ah, %dl
+- andb $0x45, %ah
+- cmpb $0x40, %ah // is y == 0 ?
+- je 11f
+-
+- cmpb $0x05, %ah // is y == ±inf ?
+- je 12f
+-
+- cmpb $0x01, %ah // is y == NaN ?
+- je 30f
+-
+- flds 4(%esp) // x : y
+-
+- subl $4, %esp
+- cfi_adjust_cfa_offset (4)
+-
+- fxam
+- fnstsw
+- movb %ah, %dh
+- andb $0x45, %ah
+- cmpb $0x40, %ah
+- je 20f // x is ±0
+-
+- cmpb $0x05, %ah
+- je 15f // x is ±inf
+-
+- cmpb $0x01, %ah
+- je 33f // x is NaN
+-
+- fxch // y : x
+-
+- /* fistpl raises invalid exception for |y| >= 1L<<31. */
+- fld %st // y : y : x
+- fabs // |y| : y : x
+- fcompl MO(p31) // y : x
+- fnstsw
+- sahf
+- jnc 2f
+-
+- /* First see whether `y' is a natural number. In this case we
+- can use a more precise algorithm. */
+- fld %st // y : y : x
+- fistpl (%esp) // y : x
+- fildl (%esp) // int(y) : y : x
+- fucomp %st(1) // y : x
+- fnstsw
+- sahf
+- jne 3f
+-
+- /* OK, we have an integer value for y. */
+- popl %edx
+- cfi_adjust_cfa_offset (-4)
+- orl $0, %edx
+- fstp %st(0) // x
+- jns 4f // y >= 0, jump
+- fdivrl MO(one) // 1/x (now referred to as x)
+- negl %edx
+-4: fldl MO(one) // 1 : x
+- fxch
+-
+- /* If y is even, take the absolute value of x. Otherwise,
+- ensure all intermediate values that might overflow have the
+- sign of x. */
+- testb $1, %dl
+- jnz 6f
+- fabs
+-
+-6: shrl $1, %edx
+- jnc 5f
+- fxch
+- fabs
+- fmul %st(1) // x : ST*x
+- fxch
+-5: fld %st // x : x : ST*x
+- fabs // |x| : x : ST*x
+- fmulp // |x|*x : ST*x
+- testl %edx, %edx
+- jnz 6b
+- fstp %st(0) // ST*x
+- FLT_NARROW_EVAL_UFLOW_NONNAN
+- ret
+-
+- /* y is ±NAN */
+-30: flds 4(%esp) // x : y
+- fldl MO(one) // 1.0 : x : y
+- fucomp %st(1) // x : y
+- fnstsw
+- sahf
+- je 31f
+- fxch // y : x
+-31: fstp %st(1)
+- ret
+-
+- cfi_adjust_cfa_offset (4)
+- .align ALIGNARG(4)
+-2: /* y is a large integer (so even). */
+- fxch // x : y
+- fabs // |x| : y
+- fxch // y : x
+- .align ALIGNARG(4)
+-3: /* y is a real number. */
+- fxch // x : y
+- fldl MO(one) // 1.0 : x : y
+- fldl MO(limit) // 0.29 : 1.0 : x : y
+- fld %st(2) // x : 0.29 : 1.0 : x : y
+- fsub %st(2) // x-1 : 0.29 : 1.0 : x : y
+- fabs // |x-1| : 0.29 : 1.0 : x : y
+- fucompp // 1.0 : x : y
+- fnstsw
+- fxch // x : 1.0 : y
+- sahf
+- ja 7f
+- fsub %st(1) // x-1 : 1.0 : y
+- fyl2xp1 // log2(x) : y
+- jmp 8f
+-
+-7: fyl2x // log2(x) : y
+-8: fmul %st(1) // y*log2(x) : y
+- fst %st(1) // y*log2(x) : y*log2(x)
+- frndint // int(y*log2(x)) : y*log2(x)
+- fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x))
+- fxch // fract(y*log2(x)) : int(y*log2(x))
+- f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x))
+- faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
+- fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
+-32: addl $4, %esp
+- cfi_adjust_cfa_offset (-4)
+- fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
+- FLT_NARROW_EVAL_UFLOW_NONNAN
+- ret
+-
+- /* x is NaN. */
+- cfi_adjust_cfa_offset (4)
+-33: addl $4, %esp
+- cfi_adjust_cfa_offset (-4)
+- fstp %st(1)
+- ret
+-
+- // pow(x,±0) = 1
+- .align ALIGNARG(4)
+-11: fstp %st(0) // pop y
+- fldl MO(one)
+- ret
+-
+- // y == ±inf
+- .align ALIGNARG(4)
+-12: fstp %st(0) // pop y
+- fldl MO(one) // 1
+- flds 4(%esp) // x : 1
+- fabs // abs(x) : 1
+- fucompp // < 1, == 1, or > 1
+- fnstsw
+- andb $0x45, %ah
+- cmpb $0x45, %ah
+- je 13f // jump if x is NaN
+-
+- cmpb $0x40, %ah
+- je 14f // jump if |x| == 1
+-
+- shlb $1, %ah
+- xorb %ah, %dl
+- andl $2, %edx
+- fldl MOX(inf_zero, %edx, 4)
+- ret
+-
+- .align ALIGNARG(4)
+-14: fldl MO(one)
+- ret
+-
+- .align ALIGNARG(4)
+-13: flds 4(%esp) // load x == NaN
+- ret
+-
+- cfi_adjust_cfa_offset (4)
+- .align ALIGNARG(4)
+- // x is ±inf
+-15: fstp %st(0) // y
+- testb $2, %dh
+- jz 16f // jump if x == +inf
+-
+- // fistpl raises invalid exception for |y| >= 1L<<31, so test
+- // that (in which case y is certainly even) before testing
+- // whether y is odd.
+- fld %st // y : y
+- fabs // |y| : y
+- fcompl MO(p31) // y
+- fnstsw
+- sahf
+- jnc 16f
+-
+- // We must find out whether y is an odd integer.
+- fld %st // y : y
+- fistpl (%esp) // y
+- fildl (%esp) // int(y) : y
+- fucompp // <empty>
+- fnstsw
+- sahf
+- jne 17f
+-
+- // OK, the value is an integer.
+- popl %edx
+- cfi_adjust_cfa_offset (-4)
+- testb $1, %dl
+- jz 18f // jump if not odd
+- // It's an odd integer.
+- shrl $31, %edx
+- fldl MOX(minf_mzero, %edx, 8)
+- ret
+-
+- cfi_adjust_cfa_offset (4)
+- .align ALIGNARG(4)
+-16: fcompl MO(zero)
+- addl $4, %esp
+- cfi_adjust_cfa_offset (-4)
+- fnstsw
+- shrl $5, %eax
+- andl $8, %eax
+- fldl MOX(inf_zero, %eax, 1)
+- ret
+-
+- cfi_adjust_cfa_offset (4)
+- .align ALIGNARG(4)
+-17: shll $30, %edx // sign bit for y in right position
+- addl $4, %esp
+- cfi_adjust_cfa_offset (-4)
+-18: shrl $31, %edx
+- fldl MOX(inf_zero, %edx, 8)
+- ret
+-
+- cfi_adjust_cfa_offset (4)
+- .align ALIGNARG(4)
+- // x is ±0
+-20: fstp %st(0) // y
+- testb $2, %dl
+- jz 21f // y > 0
+-
+- // x is ±0 and y is < 0. We must find out whether y is an odd integer.
+- testb $2, %dh
+- jz 25f
+-
+- // fistpl raises invalid exception for |y| >= 1L<<31, so test
+- // that (in which case y is certainly even) before testing
+- // whether y is odd.
+- fld %st // y : y
+- fabs // |y| : y
+- fcompl MO(p31) // y
+- fnstsw
+- sahf
+- jnc 25f
+-
+- fld %st // y : y
+- fistpl (%esp) // y
+- fildl (%esp) // int(y) : y
+- fucompp // <empty>
+- fnstsw
+- sahf
+- jne 26f
+-
+- // OK, the value is an integer.
+- popl %edx
+- cfi_adjust_cfa_offset (-4)
+- testb $1, %dl
+- jz 27f // jump if not odd
+- // It's an odd integer.
+- // Raise divide-by-zero exception and get minus infinity value.
+- fldl MO(one)
+- fdivl MO(zero)
+- fchs
+- ret
+-
+- cfi_adjust_cfa_offset (4)
+-25: fstp %st(0)
+-26: addl $4, %esp
+- cfi_adjust_cfa_offset (-4)
+-27: // Raise divide-by-zero exception and get infinity value.
+- fldl MO(one)
+- fdivl MO(zero)
+- ret
+-
+- cfi_adjust_cfa_offset (4)
+- .align ALIGNARG(4)
+- // x is ±0 and y is > 0. We must find out whether y is an odd integer.
+-21: testb $2, %dh
+- jz 22f
+-
+- // fistpl raises invalid exception for |y| >= 1L<<31, so test
+- // that (in which case y is certainly even) before testing
+- // whether y is odd.
+- fcoml MO(p31) // y
+- fnstsw
+- sahf
+- jnc 22f
+-
+- fld %st // y : y
+- fistpl (%esp) // y
+- fildl (%esp) // int(y) : y
+- fucompp // <empty>
+- fnstsw
+- sahf
+- jne 23f
+-
+- // OK, the value is an integer.
+- popl %edx
+- cfi_adjust_cfa_offset (-4)
+- testb $1, %dl
+- jz 24f // jump if not odd
+- // It's an odd integer.
+- fldl MO(mzero)
+- ret
+-
+- cfi_adjust_cfa_offset (4)
+-22: fstp %st(0)
+-23: addl $4, %esp // Don't use pop.
+- cfi_adjust_cfa_offset (-4)
+-24: fldl MO(zero)
+- ret
+-
+-END(__ieee754_powf)
+-strong_alias (__ieee754_powf, __powf_finite)
+diff -purN glibc-org/sysdeps/i386/fpu/libm-test-ulps glibc-2.26/sysdeps/i386/fpu/libm-test-ulps
+--- glibc-org/sysdeps/i386/fpu/libm-test-ulps 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/libm-test-ulps 2017-10-22 17:02:23.592967253 +0000
+@@ -1921,26 +1921,34 @@ ildouble: 1
+ ldouble: 1
+
+ Function: "exp2_upward":
++float: 1
+ float128: 2
++ifloat: 1
+ ifloat128: 2
+ ildouble: 1
+ ldouble: 1
+
+ Function: "exp_downward":
+ double: 1
++float: 1
+ idouble: 1
++ifloat: 1
+ ildouble: 1
+ ldouble: 1
+
+ Function: "exp_towardzero":
+ double: 1
++float: 1
+ idouble: 1
++ifloat: 1
+ ildouble: 2
+ ldouble: 2
+
+ Function: "exp_upward":
+ double: 1
++float: 1
+ idouble: 1
++ifloat: 1
+ ildouble: 1
+ ldouble: 1
+
+@@ -1992,17 +2000,17 @@ ldouble: 4
+
+ Function: "gamma_downward":
+ double: 4
+-float: 4
++float: 5
+ idouble: 4
+-ifloat: 4
++ifloat: 5
+ ildouble: 7
+ ldouble: 7
+
+ Function: "gamma_towardzero":
+ double: 4
+-float: 2
++float: 3
+ idouble: 4
+-ifloat: 2
++ifloat: 3
+ ildouble: 7
+ ldouble: 7
+
+@@ -2058,10 +2066,10 @@ ldouble: 2
+
+ Function: "j0_downward":
+ double: 1
+-float: 2
++float: 3
+ float128: 4
+ idouble: 1
+-ifloat: 2
++ifloat: 3
+ ifloat128: 4
+ ildouble: 4
+ ldouble: 4
+@@ -2178,20 +2186,20 @@ ldouble: 4
+
+ Function: "lgamma_downward":
+ double: 4
+-float: 4
++float: 5
+ float128: 8
+ idouble: 4
+-ifloat: 4
++ifloat: 5
+ ifloat128: 8
+ ildouble: 7
+ ldouble: 7
+
+ Function: "lgamma_towardzero":
+ double: 4
+-float: 2
++float: 3
+ float128: 5
+ idouble: 4
+-ifloat: 2
++ifloat: 3
+ ifloat128: 5
+ ildouble: 7
+ ldouble: 7
+@@ -2292,8 +2300,10 @@ ldouble: 3
+
+ Function: "log2":
+ double: 1
++float: 1
+ float128: 2
+ idouble: 1
++ifloat: 1
+ ifloat128: 2
+ ildouble: 1
+ ldouble: 1
+@@ -2358,56 +2368,32 @@ ifloat128: 2
+ ildouble: 1
+ ldouble: 1
+
+-Function: "pow10":
+-double: 1
+-idouble: 1
+-ildouble: 1
+-ldouble: 1
+-
+-Function: "pow10_downward":
+-double: 1
+-float: 1
+-idouble: 1
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+-Function: "pow10_towardzero":
+-double: 1
+-float: 1
+-idouble: 1
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+-Function: "pow10_upward":
+-double: 1
+-float: 1
+-idouble: 1
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+ Function: "pow_downward":
+ double: 1
++float: 1
+ float128: 2
+ idouble: 1
++ifloat: 1
+ ifloat128: 2
+ ildouble: 4
+ ldouble: 4
+
+ Function: "pow_towardzero":
+ double: 1
++float: 1
+ float128: 2
+ idouble: 1
++ifloat: 1
+ ifloat128: 2
+ ildouble: 4
+ ldouble: 4
+
+ Function: "pow_upward":
+ double: 1
++float: 1
+ float128: 2
+ idouble: 1
++ifloat: 1
+ ifloat128: 2
+ ildouble: 4
+ ldouble: 4
+@@ -2663,10 +2649,10 @@ ldouble: 5
+
+ Function: "y0_towardzero":
+ double: 2
+-float: 2
++float: 3
+ float128: 3
+ idouble: 2
+-ifloat: 2
++ifloat: 3
+ ifloat128: 3
+ ildouble: 5
+ ldouble: 5
+diff -purN glibc-org/sysdeps/i386/fpu/s_fpclassifyl.c glibc-2.26/sysdeps/i386/fpu/s_fpclassifyl.c
+--- glibc-org/sysdeps/i386/fpu/s_fpclassifyl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/s_fpclassifyl.c 2017-10-22 17:02:23.592967253 +0000
+@@ -25,7 +25,7 @@
+ int
+ __fpclassifyl (long double x)
+ {
+- u_int32_t ex, hx, lx;
++ uint32_t ex, hx, lx;
+ int retval = FP_NORMAL;
+
+ GET_LDOUBLE_WORDS (ex, hx, lx, x);
+diff -purN glibc-org/sysdeps/i386/fpu/s_isnanl.c glibc-2.26/sysdeps/i386/fpu/s_isnanl.c
+--- glibc-org/sysdeps/i386/fpu/s_isnanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/s_isnanl.c 2017-10-22 17:02:23.592967253 +0000
+@@ -35,9 +35,9 @@ int __isnanl(long double x)
+ extended format has the normally implicit 1 explicit
+ present. Sigh! */
+ lx |= hx & 0x7fffffff;
+- se |= (u_int32_t)(lx|(-lx))>>31;
++ se |= (uint32_t)(lx|(-lx))>>31;
+ se = 0xfffe - se;
+- return (int)((u_int32_t)(se))>>16;
++ return (int)((uint32_t)(se))>>16;
+ }
+ hidden_def (__isnanl)
+ weak_alias (__isnanl, isnanl)
+diff -purN glibc-org/sysdeps/i386/fpu/s_nextafterl.c glibc-2.26/sysdeps/i386/fpu/s_nextafterl.c
+--- glibc-org/sysdeps/i386/fpu/s_nextafterl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/s_nextafterl.c 2017-10-22 17:02:23.592967253 +0000
+@@ -32,8 +32,8 @@ static char rcsid[] = "$NetBSD: $";
+
+ long double __nextafterl(long double x, long double y)
+ {
+- u_int32_t hx,hy,ix,iy;
+- u_int32_t lx,ly;
++ uint32_t hx,hy,ix,iy;
++ uint32_t lx,ly;
+ int32_t esx,esy;
+
+ GET_LDOUBLE_WORDS(esx,hx,lx,x);
+diff -purN glibc-org/sysdeps/i386/fpu/s_nexttoward.c glibc-2.26/sysdeps/i386/fpu/s_nexttoward.c
+--- glibc-org/sysdeps/i386/fpu/s_nexttoward.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/s_nexttoward.c 2017-10-22 17:02:23.592967253 +0000
+@@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: $";
+ double __nexttoward(double x, long double y)
+ {
+ int32_t hx,ix,iy;
+- u_int32_t lx,hy,ly,esy;
++ uint32_t lx,hy,ly,esy;
+
+ EXTRACT_WORDS(hx,lx,x);
+ GET_LDOUBLE_WORDS(esy,hy,ly,y);
+diff -purN glibc-org/sysdeps/i386/fpu/s_nexttowardf.c glibc-2.26/sysdeps/i386/fpu/s_nexttowardf.c
+--- glibc-org/sysdeps/i386/fpu/s_nexttowardf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/s_nexttowardf.c 2017-10-22 17:02:23.592967253 +0000
+@@ -26,7 +26,7 @@ static char rcsid[] = "$NetBSD: $";
+ float __nexttowardf(float x, long double y)
+ {
+ int32_t hx,ix,iy;
+- u_int32_t hy,ly,esy;
++ uint32_t hy,ly,esy;
+
+ GET_FLOAT_WORD(hx,x);
+ GET_LDOUBLE_WORDS(esy,hy,ly,y);
+diff -purN glibc-org/sysdeps/i386/fpu/w_sqrt.c glibc-2.26/sysdeps/i386/fpu/w_sqrt.c
+--- glibc-org/sysdeps/i386/fpu/w_sqrt.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/fpu/w_sqrt.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,9 @@
++/* The inline __ieee754_sqrt is not correctly rounding; it's OK for
++ most internal uses in glibc, but not for sqrt itself. */
++#define __ieee754_sqrt __avoid_ieee754_sqrt
++#include <math.h>
++#include <math_private.h>
++#undef __ieee754_sqrt
++extern double __ieee754_sqrt (double);
++#include <math-type-macros-double.h>
++#include <w_sqrt_template.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/e_logf.S glibc-2.26/sysdeps/i386/i686/fpu/e_logf.S
+--- glibc-org/sysdeps/i386/i686/fpu/e_logf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/e_logf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,30 +0,0 @@
+-/*
+- * Written by J.T. Conklin <jtc@netbsd.org>.
+- * Public domain.
+- * Adapted for float by Ulrich Drepper <drepper@cygnus.com>.
+- *
+- * Adapted for i686 instructions.
+- */
+-
+-#include <machine/asm.h>
+-
+-
+- .text
+-ENTRY(__ieee754_logf)
+- fldln2 // log(2)
+- flds 4(%esp) // x : log(2)
+- fucomi %st
+- jp 3f
+- fyl2x // log(x)
+- ret
+-
+-3: fstp %st(1)
+- ret
+-END (__ieee754_logf)
+-
+-ENTRY(__logf_finite)
+- fldln2 // log(2)
+- flds 4(%esp) // x : log(2)
+- fyl2x // log(x)
+- ret
+-END(__logf_finite)
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_exp2f.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_exp2f.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_exp2f.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_exp2f.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,37 @@
++/* Multiple versions of exp2f.
++ Copyright (C) 2017 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/>. */
++
++extern float __redirect_exp2f (float);
++
++#define SYMBOL_NAME exp2f
++#include "ifunc-sse2.h"
++
++libc_ifunc_redirected (__redirect_exp2f, __exp2f, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++# include <shlib-compat.h>
++versioned_symbol (libm, __exp2f, exp2f, GLIBC_2_27);
++#else
++weak_alias (__exp2f, exp2f)
++#endif
++
++strong_alias (__exp2f, __ieee754_exp2f)
++strong_alias (__exp2f, __exp2f_finite)
++
++#define __exp2f __exp2f_ia32
++#include <sysdeps/ieee754/flt-32/e_exp2f.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_exp2f-sse2.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_exp2f-sse2.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_exp2f-sse2.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_exp2f-sse2.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,3 @@
++#define __exp2f __exp2f_sse2
++
++#include <sysdeps/ieee754/flt-32/e_exp2f.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_expf.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_expf.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_expf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_expf.c 2017-10-22 17:02:23.592967253 +0000
+@@ -1,4 +1,4 @@
+-/* Multiple versions of expf
++/* Multiple versions of expf.
+ Copyright (C) 2012-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+@@ -16,22 +16,25 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+-#include <init-arch.h>
++extern float __redirect_expf (float);
+
+-extern double __ieee754_expf_sse2 (double);
+-extern double __ieee754_expf_ia32 (double);
++#define SYMBOL_NAME expf
++#include "ifunc-sse2.h"
+
+-double __ieee754_expf (double);
+-libm_ifunc (__ieee754_expf,
+- HAS_CPU_FEATURE (SSE2)
+- ? __ieee754_expf_sse2
+- : __ieee754_expf_ia32);
+-
+-extern double __expf_finite_sse2 (double);
+-extern double __expf_finite_ia32 (double);
+-
+-double __expf_finite (double);
+-libm_ifunc (__expf_finite,
+- HAS_CPU_FEATURE (SSE2)
+- ? __expf_finite_sse2
+- : __expf_finite_ia32);
++libc_ifunc_redirected (__redirect_expf, __expf, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (__expf_ia32, __GI___expf, __redirect_expf)
++ __attribute__ ((visibility ("hidden")));
++
++# include <shlib-compat.h>
++versioned_symbol (libm, __expf, expf, GLIBC_2_27);
++#else
++weak_alias (__expf, expf)
++#endif
++
++strong_alias (__expf, __ieee754_expf)
++strong_alias (__expf, __expf_finite)
++
++#define __expf __expf_ia32
++#include <sysdeps/ieee754/flt-32/e_expf.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_expf-ia32.S glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_expf-ia32.S
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_expf-ia32.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_expf-ia32.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,22 +0,0 @@
+-/*
+- Copyright (C) 2012-2017 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/>. */
+-
+-#define __ieee754_expf __ieee754_expf_ia32
+-#define __expf_finite __expf_finite_ia32
+-
+-#include <sysdeps/i386/fpu/e_expf.S>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,3 @@
++#define __expf __expf_sse2
++
++#include <sysdeps/ieee754/flt-32/e_expf.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,325 +0,0 @@
+-/* SSE2 version of __ieee754_expf and __expf_finite
+- Copyright (C) 2012-2017 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 <sysdep.h>
+-
+-/* Short algorithm description:
+- *
+- * Let K = 64 (table size).
+- * e^x = 2^(x/log(2)) = 2^n * T[j] * (1 + P(y))
+- * where
+- * x = m*log(2)/K + y, y in [0.0..log(2)/K]
+- * m = n*K + j, m,n,j - signed integer, j in [0..K-1]
+- * values of 2^(j/K) are tabulated as T[j].
+- *
+- * P(y) is a minimax polynomial approximation of expf(x)-1
+- * on small interval [0.0..log(2)/K].
+- *
+- * P(y) = P3*y*y*y*y + P2*y*y*y + P1*y*y + P0*y, calculated as
+- * z = y*y; P(y) = (P3*z + P1)*z + (P2*z + P0)*y
+- *
+- * Special cases:
+- * __ieee754_expf_sse2(NaN) = NaN
+- * __ieee754_expf_sse2(+INF) = +INF
+- * __ieee754_expf_sse2(-INF) = 0
+- * __ieee754_expf_sse2(x) = 1 for subnormals
+- * for finite argument, only __ieee754_expf_sse2(0)=1 is exact
+- * __ieee754_expf_sse2(x) overflows if x>700
+- * __ieee754_expf_sse2(x) underflows if x<-700
+- *
+- * Note:
+- * For |x|<700, __ieee754_expf_sse2 computes result in double precision,
+- * with accuracy a bit more than needed for expf, and does not round it
+- * to single precision.
+- */
+-
+-
+-#ifdef PIC
+-# define MO1(symbol) L(symbol)##@GOTOFF(%edx)
+-# define MO2(symbol,reg2,_scale) L(symbol)##@GOTOFF(%edx,reg2,_scale)
+-#else
+-# define MO1(symbol) L(symbol)
+-# define MO2(symbol,reg2,_scale) L(symbol)(,reg2,_scale)
+-#endif
+-
+- .text
+-ENTRY(__ieee754_expf_sse2)
+- /* Input: single precision x on stack at address 4(%esp) */
+-
+-#ifdef PIC
+- LOAD_PIC_REG(dx)
+-#endif
+-
+- cvtss2sd 4(%esp), %xmm1 /* Convert x to double precision */
+- mov 4(%esp), %ecx /* Copy x */
+- movsd MO1(DP_KLN2), %xmm2 /* DP K/log(2) */
+- movsd MO1(DP_P2), %xmm3 /* DP P2 */
+- movl %ecx, %eax /* x */
+- mulsd %xmm1, %xmm2 /* DP x*K/log(2) */
+- andl $0x7fffffff, %ecx /* |x| */
+- cmpl $0x442f0000, %ecx /* |x|<700 ? */
+- movsd MO1(DP_P3), %xmm4 /* DP P3 */
+- addsd MO1(DP_RS), %xmm2 /* DP x*K/log(2)+RS */
+- jae L(special_paths)
+-
+- /* Here if |x|<700 */
+- cmpl $0x31800000, %ecx /* |x|<2^(-28) ? */
+- jb L(small_arg)
+-
+- /* Main path: here if 2^(-28)<=|x|<700 */
+- cvtsd2ss %xmm2, %xmm2 /* SP x*K/log(2)+RS */
+- movd %xmm2, %eax /* bits of n*K+j with trash */
+- subss MO1(SP_RS), %xmm2 /* SP t=round(x*K/log(2)) */
+- movl %eax, %ecx /* n*K+j with trash */
+- cvtss2sd %xmm2, %xmm2 /* DP t */
+- andl $0x3f, %eax /* bits of j */
+- mulsd MO1(DP_NLN2K), %xmm2 /* DP -t*log(2)/K */
+- andl $0xffffffc0, %ecx /* bits of n */
+-#ifdef __AVX__
+- vaddsd %xmm1, %xmm2, %xmm0 /* DP y=x-t*log(2)/K */
+- vmulsd %xmm0, %xmm0, %xmm2 /* DP z=y*y */
+-#else
+- addsd %xmm1, %xmm2 /* DP y=x-t*log(2)/K */
+- movaps %xmm2, %xmm0 /* DP y */
+- mulsd %xmm2, %xmm2 /* DP z=y*y */
+-#endif
+- mulsd %xmm2, %xmm4 /* DP P3*z */
+- addl $0xffc0, %ecx /* bits of n + DP exponent bias */
+- mulsd %xmm2, %xmm3 /* DP P2*z */
+- shrl $2, %ecx /* High 2 bytes of DP 2^n */
+- pxor %xmm1, %xmm1 /* clear %xmm1 */
+- addsd MO1(DP_P1), %xmm4 /* DP P3*z+P1 */
+- addsd MO1(DP_P0), %xmm3 /* DP P2*z+P0 */
+- pinsrw $3, %ecx, %xmm1 /* DP 2^n */
+- mulsd %xmm2, %xmm4 /* DP (P3*z+P1)*z */
+- mulsd %xmm3, %xmm0 /* DP (P2*z+P0)*y */
+- addsd %xmm4, %xmm0 /* DP P(y) */
+- mulsd MO2(DP_T,%eax,8), %xmm0 /* DP P(y)*T[j] */
+- addsd MO2(DP_T,%eax,8), %xmm0 /* DP T[j]*(P(y)+1) */
+- mulsd %xmm1, %xmm0 /* DP result=2^n*(T[j]*(P(y)+1)) */
+- cvtsd2ss %xmm0, %xmm1
+-
+- lea -4(%esp), %esp /* Borrow 4 bytes of stack frame */
+- movss %xmm1, 0(%esp) /* Move result from sse... */
+- flds 0(%esp) /* ...to FPU. */
+- lea 4(%esp), %esp /* Return back 4 bytes of stack frame */
+- ret
+-
+- .p2align 4
+-L(small_arg):
+- /* Here if 0<=|x|<2^(-28) */
+- movss 4(%esp), %xmm0 /* load x */
+- addss MO1(SP_ONE), %xmm0 /* 1.0 + x */
+- /* Return 1.0 with inexact raised, except for x==0 */
+- jmp L(epilogue)
+-
+- .p2align 4
+-L(special_paths):
+- /* Here if x is NaN, or Inf, or finite |x|>=700 */
+- movss 4(%esp), %xmm0 /* load x */
+-
+- cmpl $0x7f800000, %ecx /* |x| is finite ? */
+- jae L(arg_inf_or_nan)
+-
+- /* Here if finite |x|>=700 */
+- testl $0x80000000, %eax /* sign of x nonzero ? */
+- je L(res_overflow)
+-
+- /* Here if finite x<=-700 */
+- movss MO1(SP_SMALL), %xmm0 /* load small value 2^(-100) */
+- mulss %xmm0, %xmm0 /* Return underflowed result (zero or subnormal) */
+- jmp L(epilogue)
+-
+- .p2align 4
+-L(res_overflow):
+- /* Here if finite x>=700 */
+- movss MO1(SP_LARGE), %xmm0 /* load large value 2^100 */
+- mulss %xmm0, %xmm0 /* Return overflowed result (Inf or max normal) */
+- jmp L(epilogue)
+-
+- .p2align 4
+-L(arg_inf_or_nan):
+- /* Here if |x| is Inf or NAN */
+- jne L(arg_nan) /* |x| is Inf ? */
+-
+- /* Here if |x| is Inf */
+- shrl $31, %eax /* Get sign bit of x */
+- movss MO2(SP_INF_0,%eax,4), %xmm0/* return zero or Inf, depending on sign of x */
+- jmp L(epilogue)
+-
+- .p2align 4
+-L(arg_nan):
+- /* Here if |x| is NaN */
+- addss %xmm0, %xmm0 /* Return x+x (raise invalid) */
+-
+- .p2align 4
+-L(epilogue):
+- lea -4(%esp), %esp /* Borrow 4 bytes of stack frame */
+- movss %xmm0, 0(%esp) /* Move result from sse... */
+- flds 0(%esp) /* ...to FPU. */
+- lea 4(%esp), %esp /* Return back 4 bytes of stack frame */
+- ret
+-END(__ieee754_expf_sse2)
+-
+- .section .rodata, "a"
+- .p2align 3
+-L(DP_T): /* table of double precision values 2^(j/K) for j=[0..K-1] */
+- .long 0x00000000, 0x3ff00000
+- .long 0x3e778061, 0x3ff02c9a
+- .long 0xd3158574, 0x3ff059b0
+- .long 0x18759bc8, 0x3ff08745
+- .long 0x6cf9890f, 0x3ff0b558
+- .long 0x32d3d1a2, 0x3ff0e3ec
+- .long 0xd0125b51, 0x3ff11301
+- .long 0xaea92de0, 0x3ff1429a
+- .long 0x3c7d517b, 0x3ff172b8
+- .long 0xeb6fcb75, 0x3ff1a35b
+- .long 0x3168b9aa, 0x3ff1d487
+- .long 0x88628cd6, 0x3ff2063b
+- .long 0x6e756238, 0x3ff2387a
+- .long 0x65e27cdd, 0x3ff26b45
+- .long 0xf51fdee1, 0x3ff29e9d
+- .long 0xa6e4030b, 0x3ff2d285
+- .long 0x0a31b715, 0x3ff306fe
+- .long 0xb26416ff, 0x3ff33c08
+- .long 0x373aa9cb, 0x3ff371a7
+- .long 0x34e59ff7, 0x3ff3a7db
+- .long 0x4c123422, 0x3ff3dea6
+- .long 0x21f72e2a, 0x3ff4160a
+- .long 0x6061892d, 0x3ff44e08
+- .long 0xb5c13cd0, 0x3ff486a2
+- .long 0xd5362a27, 0x3ff4bfda
+- .long 0x769d2ca7, 0x3ff4f9b2
+- .long 0x569d4f82, 0x3ff5342b
+- .long 0x36b527da, 0x3ff56f47
+- .long 0xdd485429, 0x3ff5ab07
+- .long 0x15ad2148, 0x3ff5e76f
+- .long 0xb03a5585, 0x3ff6247e
+- .long 0x82552225, 0x3ff66238
+- .long 0x667f3bcd, 0x3ff6a09e
+- .long 0x3c651a2f, 0x3ff6dfb2
+- .long 0xe8ec5f74, 0x3ff71f75
+- .long 0x564267c9, 0x3ff75feb
+- .long 0x73eb0187, 0x3ff7a114
+- .long 0x36cf4e62, 0x3ff7e2f3
+- .long 0x994cce13, 0x3ff82589
+- .long 0x9b4492ed, 0x3ff868d9
+- .long 0x422aa0db, 0x3ff8ace5
+- .long 0x99157736, 0x3ff8f1ae
+- .long 0xb0cdc5e5, 0x3ff93737
+- .long 0x9fde4e50, 0x3ff97d82
+- .long 0x82a3f090, 0x3ff9c491
+- .long 0x7b5de565, 0x3ffa0c66
+- .long 0xb23e255d, 0x3ffa5503
+- .long 0x5579fdbf, 0x3ffa9e6b
+- .long 0x995ad3ad, 0x3ffae89f
+- .long 0xb84f15fb, 0x3ffb33a2
+- .long 0xf2fb5e47, 0x3ffb7f76
+- .long 0x904bc1d2, 0x3ffbcc1e
+- .long 0xdd85529c, 0x3ffc199b
+- .long 0x2e57d14b, 0x3ffc67f1
+- .long 0xdcef9069, 0x3ffcb720
+- .long 0x4a07897c, 0x3ffd072d
+- .long 0xdcfba487, 0x3ffd5818
+- .long 0x03db3285, 0x3ffda9e6
+- .long 0x337b9b5f, 0x3ffdfc97
+- .long 0xe78b3ff6, 0x3ffe502e
+- .long 0xa2a490da, 0x3ffea4af
+- .long 0xee615a27, 0x3ffefa1b
+- .long 0x5b6e4540, 0x3fff5076
+- .long 0x819e90d8, 0x3fffa7c1
+- .type L(DP_T), @object
+- ASM_SIZE_DIRECTIVE(L(DP_T))
+-
+- .section .rodata.cst8,"aM",@progbits,8
+- .p2align 3
+-L(DP_KLN2): /* double precision K/log(2) */
+- .long 0x652b82fe, 0x40571547
+- .type L(DP_KLN2), @object
+- ASM_SIZE_DIRECTIVE(L(DP_KLN2))
+-
+- .p2align 3
+-L(DP_NLN2K): /* double precision -log(2)/K */
+- .long 0xfefa39ef, 0xbf862e42
+- .type L(DP_NLN2K), @object
+- ASM_SIZE_DIRECTIVE(L(DP_NLN2K))
+-
+- .p2align 3
+-L(DP_RS): /* double precision 2^23+2^22 */
+- .long 0x00000000, 0x41680000
+- .type L(DP_RS), @object
+- ASM_SIZE_DIRECTIVE(L(DP_RS))
+-
+- .p2align 3
+-L(DP_P3): /* double precision polynomial coefficient P3 */
+- .long 0xeb78fa85, 0x3fa56420
+- .type L(DP_P3), @object
+- ASM_SIZE_DIRECTIVE(L(DP_P3))
+-
+- .p2align 3
+-L(DP_P1): /* double precision polynomial coefficient P1 */
+- .long 0x008d6118, 0x3fe00000
+- .type L(DP_P1), @object
+- ASM_SIZE_DIRECTIVE(L(DP_P1))
+-
+- .p2align 3
+-L(DP_P2): /* double precision polynomial coefficient P2 */
+- .long 0xda752d4f, 0x3fc55550
+- .type L(DP_P2), @object
+- ASM_SIZE_DIRECTIVE(L(DP_P2))
+-
+- .p2align 3
+-L(DP_P0): /* double precision polynomial coefficient P0 */
+- .long 0xffffe7c6, 0x3fefffff
+- .type L(DP_P0), @object
+- ASM_SIZE_DIRECTIVE(L(DP_P0))
+-
+- .p2align 2
+-L(SP_INF_0):
+- .long 0x7f800000 /* single precision Inf */
+- .long 0 /* single precision zero */
+- .type L(SP_INF_0), @object
+- ASM_SIZE_DIRECTIVE(L(SP_INF_0))
+-
+- .section .rodata.cst4,"aM",@progbits,4
+- .p2align 2
+-L(SP_RS): /* single precision 2^23+2^22 */
+- .long 0x4b400000
+- .type L(SP_RS), @object
+- ASM_SIZE_DIRECTIVE(L(SP_RS))
+-
+- .p2align 2
+-L(SP_SMALL): /* single precision small value 2^(-100) */
+- .long 0x0d800000
+- .type L(SP_SMALL), @object
+- ASM_SIZE_DIRECTIVE(L(SP_SMALL))
+-
+- .p2align 2
+-L(SP_LARGE): /* single precision large value 2^100 */
+- .long 0x71800000
+- .type L(SP_LARGE), @object
+- ASM_SIZE_DIRECTIVE(L(SP_LARGE))
+-
+- .p2align 2
+-L(SP_ONE): /* single precision 1.0 */
+- .long 0x3f800000
+- .type L(SP_ONE), @object
+- ASM_SIZE_DIRECTIVE(L(SP_ONE))
+-
+-strong_alias (__ieee754_expf_sse2, __expf_finite_sse2)
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_log2f.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_log2f.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_log2f.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_log2f.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,40 @@
++/* Multiple versions of log2f.
++ Copyright (C) 2017 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/>. */
++
++extern float __redirect_log2f (float);
++
++#define SYMBOL_NAME log2f
++#include "ifunc-sse2.h"
++
++libc_ifunc_redirected (__redirect_log2f, __log2f, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (__log2f_ia32, __GI___log2f, __redirect_log2f)
++ __attribute__ ((visibility ("hidden")));
++
++# include <shlib-compat.h>
++versioned_symbol (libm, __log2f, log2f, GLIBC_2_27);
++#else
++weak_alias (__log2f, log2f)
++#endif
++
++strong_alias (__log2f, __ieee754_log2f)
++strong_alias (__log2f, __log2f_finite)
++
++#define __log2f __log2f_ia32
++#include <sysdeps/ieee754/flt-32/e_log2f.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_log2f-sse2.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_log2f-sse2.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_log2f-sse2.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_log2f-sse2.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,3 @@
++#define __log2f __log2f_sse2
++
++#include <sysdeps/ieee754/flt-32/e_log2f.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_logf.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_logf.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_logf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_logf.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,40 @@
++/* Multiple versions of logf.
++ Copyright (C) 2017 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/>. */
++
++extern float __redirect_logf (float);
++
++#define SYMBOL_NAME logf
++#include "ifunc-sse2.h"
++
++libc_ifunc_redirected (__redirect_logf, __logf, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (__logf_ia32, __GI___logf, __redirect_logf)
++ __attribute__ ((visibility ("hidden")));
++
++# include <shlib-compat.h>
++versioned_symbol (libm, __logf, logf, GLIBC_2_27);
++#else
++weak_alias (__logf, logf)
++#endif
++
++strong_alias (__logf, __ieee754_logf)
++strong_alias (__logf, __logf_finite)
++
++#define __logf __logf_ia32
++#include <sysdeps/ieee754/flt-32/e_logf.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_logf-sse2.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_logf-sse2.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_logf-sse2.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_logf-sse2.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,3 @@
++#define __logf __logf_sse2
++
++#include <sysdeps/ieee754/flt-32/e_logf.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_powf.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_powf.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_powf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_powf.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,43 @@
++/* Multiple versions of powf.
++ Copyright (C) 2017 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/>. */
++
++#define powf __redirect_powf
++#define __DECL_SIMD___redirect_powf
++#include <math.h>
++#undef powf
++
++#define SYMBOL_NAME powf
++#include "ifunc-sse2.h"
++
++libc_ifunc_redirected (__redirect_powf, __powf, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (__powf_ia32, __GI___powf, __redirect_powf)
++ __attribute__ ((visibility ("hidden")));
++
++# include <shlib-compat.h>
++versioned_symbol (libm, __powf, powf, GLIBC_2_27);
++#else
++weak_alias (__powf, powf)
++#endif
++
++strong_alias (__powf, __ieee754_powf)
++strong_alias (__powf, __powf_finite)
++
++#define __powf __powf_ia32
++#include <sysdeps/ieee754/flt-32/e_powf.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/e_powf-sse2.c glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_powf-sse2.c
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/e_powf-sse2.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/e_powf-sse2.c 2017-10-22 17:02:23.592967253 +0000
+@@ -0,0 +1,3 @@
++#define __powf __powf_sse2
++
++#include <sysdeps/ieee754/flt-32/e_powf.c>
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps glibc-2.26/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps 2017-10-22 17:02:23.592967253 +0000
+@@ -58,7 +58,7 @@ double: 1
+ float128: 2
+ idouble: 1
+ ifloat128: 2
+-ildouble: 4
++ildouble: 5
+ ldouble: 3
+
+ Function: "asin":
+@@ -1154,8 +1154,8 @@ float128: 4
+ idouble: 3
+ ifloat: 3
+ ifloat128: 4
+-ildouble: 7
+-ldouble: 7
++ildouble: 8
++ldouble: 8
+
+ Function: Imaginary part of "clog10_upward":
+ double: 1
+@@ -1921,20 +1921,26 @@ ildouble: 1
+ ldouble: 1
+
+ Function: "exp2_upward":
++float: 1
+ float128: 2
++ifloat: 1
+ ifloat128: 2
+ ildouble: 1
+ ldouble: 1
+
+ Function: "exp_downward":
+ double: 1
++float: 1
+ idouble: 1
++ifloat: 1
+ ildouble: 1
+ ldouble: 1
+
+ Function: "exp_towardzero":
+ double: 1
++float: 1
+ idouble: 1
++ifloat: 1
+ ildouble: 2
+ ldouble: 2
+
+@@ -1994,9 +2000,9 @@ ldouble: 4
+
+ Function: "gamma_downward":
+ double: 4
+-float: 4
++float: 5
+ idouble: 4
+-ifloat: 4
++ifloat: 5
+ ildouble: 7
+ ldouble: 7
+
+@@ -2013,8 +2019,8 @@ double: 3
+ float: 4
+ idouble: 3
+ ifloat: 4
+-ildouble: 5
+-ldouble: 5
++ildouble: 6
++ldouble: 6
+
+ Function: "hypot":
+ double: 1
+@@ -2180,10 +2186,10 @@ ldouble: 4
+
+ Function: "lgamma_downward":
+ double: 4
+-float: 4
++float: 5
+ float128: 8
+ idouble: 4
+-ifloat: 4
++ifloat: 5
+ ifloat128: 8
+ ildouble: 7
+ ldouble: 7
+@@ -2205,8 +2211,8 @@ float128: 8
+ idouble: 3
+ ifloat: 4
+ ifloat128: 8
+-ildouble: 5
+-ldouble: 5
++ildouble: 6
++ldouble: 6
+
+ Function: "log":
+ double: 1
+@@ -2294,8 +2300,10 @@ ldouble: 3
+
+ Function: "log2":
+ double: 1
++float: 1
+ float128: 2
+ idouble: 1
++ifloat: 1
+ ifloat128: 2
+ ildouble: 1
+ ldouble: 1
+@@ -2360,56 +2368,32 @@ ifloat128: 2
+ ildouble: 1
+ ldouble: 1
+
+-Function: "pow10":
+-double: 1
+-idouble: 1
+-ildouble: 1
+-ldouble: 1
+-
+-Function: "pow10_downward":
+-double: 1
+-float: 1
+-idouble: 1
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+-Function: "pow10_towardzero":
+-double: 1
+-float: 1
+-idouble: 1
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+-Function: "pow10_upward":
+-double: 1
+-float: 1
+-idouble: 1
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+ Function: "pow_downward":
+ double: 1
++float: 1
+ float128: 2
+ idouble: 1
++ifloat: 1
+ ifloat128: 2
+ ildouble: 4
+ ldouble: 4
+
+ Function: "pow_towardzero":
+ double: 1
++float: 1
+ float128: 2
+ idouble: 1
++ifloat: 1
+ ifloat128: 2
+ ildouble: 4
+ ldouble: 4
+
+ Function: "pow_upward":
+ double: 1
++float: 1
+ float128: 2
+ idouble: 1
++ifloat: 1
+ ifloat128: 2
+ ildouble: 4
+ ldouble: 4
+@@ -2599,30 +2583,30 @@ ldouble: 5
+
+ Function: "tgamma_downward":
+ double: 3
+-float: 4
++float: 5
+ float128: 5
+ idouble: 3
+-ifloat: 4
++ifloat: 5
+ ifloat128: 5
+ ildouble: 5
+ ldouble: 5
+
+ Function: "tgamma_towardzero":
+ double: 4
+-float: 4
++float: 5
+ float128: 5
+ idouble: 4
+-ifloat: 4
++ifloat: 5
+ ifloat128: 5
+ ildouble: 5
+ ldouble: 5
+
+ Function: "tgamma_upward":
+ double: 4
+-float: 4
++float: 6
+ float128: 4
+ idouble: 4
+-ifloat: 4
++ifloat: 6
+ ifloat128: 4
+ ildouble: 5
+ ldouble: 5
+@@ -2649,10 +2633,10 @@ ldouble: 5
+
+ Function: "y0_towardzero":
+ double: 2
+-float: 2
++float: 3
+ float128: 3
+ idouble: 2
+-ifloat: 2
++ifloat: 3
+ ifloat128: 3
+ ildouble: 5
+ ldouble: 5
+diff -purN glibc-org/sysdeps/i386/i686/fpu/multiarch/Makefile glibc-2.26/sysdeps/i386/i686/fpu/multiarch/Makefile
+--- glibc-org/sysdeps/i386/i686/fpu/multiarch/Makefile 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/fpu/multiarch/Makefile 2017-10-22 17:02:23.592967253 +0000
+@@ -1,4 +1,10 @@
+ ifeq ($(subdir),math)
+-libm-sysdep_routines += e_expf-sse2 e_expf-ia32 s_sinf-sse2 s_cosf-sse2 \
+- s_sincosf-sse2
++libm-sysdep_routines += e_exp2f-sse2 e_expf-sse2 e_logf-sse2 e_log2f-sse2 \
++ e_powf-sse2 s_sinf-sse2 s_cosf-sse2 s_sincosf-sse2
++
++CFLAGS-e_exp2f-sse2.c = -msse2 -mfpmath=sse
++CFLAGS-e_expf-sse2.c = -msse2 -mfpmath=sse
++CFLAGS-e_log2f-sse2.c = -msse2 -mfpmath=sse
++CFLAGS-e_logf-sse2.c = -msse2 -mfpmath=sse
++CFLAGS-e_powf-sse2.c = -msse2 -mfpmath=sse
+ endif
+diff -purN glibc-org/sysdeps/i386/i686/multiarch/ifunc-sse2-bsf.h glibc-2.26/sysdeps/i386/i686/multiarch/ifunc-sse2-bsf.h
+--- glibc-org/sysdeps/i386/i686/multiarch/ifunc-sse2-bsf.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/multiarch/ifunc-sse2-bsf.h 2017-10-22 23:42:15.244096466 +0000
+@@ -0,0 +1,40 @@
++/* Common definition for ifunc selections optimized with SSE2 and BSF.
++ All versions must be listed in ifunc-impl-list.c.
++ Copyright (C) 2017 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 <init-arch.h>
++
++extern __typeof (REDIRECT_NAME) OPTIMIZE (ia32) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2_bsf) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_CPU_P (cpu_features, SSE2))
++ {
++ if (CPU_FEATURES_ARCH_P (cpu_features, Slow_BSF))
++ return OPTIMIZE (sse2);
++
++ return OPTIMIZE (sse2_bsf);
++ }
++
++ return OPTIMIZE (ia32);
++}
+diff -purN glibc-org/sysdeps/i386/i686/multiarch/ifunc-sse2.h glibc-2.26/sysdeps/i386/i686/multiarch/ifunc-sse2.h
+--- glibc-org/sysdeps/i386/i686/multiarch/ifunc-sse2.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/multiarch/ifunc-sse2.h 2017-10-22 23:42:15.244096466 +0000
+@@ -0,0 +1,34 @@
++/* Common definition for ifunc selections optimized with SSE2.
++ All versions must be listed in ifunc-impl-list.c.
++ Copyright (C) 2017 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 <init-arch.h>
++
++extern __typeof (REDIRECT_NAME) OPTIMIZE (ia32) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_CPU_P (cpu_features, SSE2))
++ return OPTIMIZE (sse2);
++
++ return OPTIMIZE (ia32);
++}
+diff -purN glibc-org/sysdeps/i386/i686/multiarch/ifunc-sse2-ssse3.h glibc-2.26/sysdeps/i386/i686/multiarch/ifunc-sse2-ssse3.h
+--- glibc-org/sysdeps/i386/i686/multiarch/ifunc-sse2-ssse3.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/multiarch/ifunc-sse2-ssse3.h 2017-10-22 23:42:15.244096466 +0000
+@@ -0,0 +1,40 @@
++/* Common definition for ifunc selections optimized with SSE2 and
++ SSSE3.
++ All versions must be listed in ifunc-impl-list.c.
++ Copyright (C) 2017 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 <init-arch.h>
++
++extern __typeof (REDIRECT_NAME) OPTIMIZE (ia32) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (ssse3) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_CPU_P (cpu_features, SSE2)
++ && CPU_FEATURES_ARCH_P (cpu_features, Fast_Rep_String))
++ return OPTIMIZE (sse2);
++
++ if (CPU_FEATURES_CPU_P (cpu_features, SSSE3))
++ return OPTIMIZE (ssse3);
++
++ return OPTIMIZE (ia32);
++}
+diff -purN glibc-org/sysdeps/i386/i686/multiarch/ifunc-sse4_2.h glibc-2.26/sysdeps/i386/i686/multiarch/ifunc-sse4_2.h
+--- glibc-org/sysdeps/i386/i686/multiarch/ifunc-sse4_2.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/i386/i686/multiarch/ifunc-sse4_2.h 2017-10-22 23:42:15.244096466 +0000
+@@ -0,0 +1,34 @@
++/* Common definition for ifunc selections optimized with SSE4_2.
++ All versions must be listed in ifunc-impl-list.c.
++ Copyright (C) 2017 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 <init-arch.h>
++
++extern __typeof (REDIRECT_NAME) OPTIMIZE (ia32) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse42) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_CPU_P (cpu_features, SSE4_2))
++ return OPTIMIZE (sse42);
++
++ return OPTIMIZE (ia32);
++}
+diff -purN glibc-org/sysdeps/ieee754/bits/huge_valf.h glibc-2.26/sysdeps/ieee754/bits/huge_valf.h
+--- glibc-org/sysdeps/ieee754/bits/huge_valf.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/bits/huge_valf.h 1970-01-01 00:00:00.000000000 +0000
+@@ -1,51 +0,0 @@
+-/* `HUGE_VALF' constant for IEEE 754 machines (where it is infinity).
+- Used by <stdlib.h> and <math.h> functions for overflow.
+- Copyright (C) 1992-2017 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/>. */
+-
+-#ifndef _MATH_H
+-# error "Never use <bits/huge_valf.h> directly; include <math.h> instead."
+-#endif
+-
+-/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
+-
+-#if __GNUC_PREREQ(3,3)
+-# define HUGE_VALF (__builtin_huge_valf())
+-#elif __GNUC_PREREQ(2,96)
+-# define HUGE_VALF (__extension__ 0x1.0p255f)
+-#elif defined __GNUC__
+-
+-# define HUGE_VALF \
+- (__extension__ \
+- ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
+- { __l: 0x7f800000UL }).__d)
+-
+-#else /* not GCC */
+-
+-typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
+-
+-# if __BYTE_ORDER == __BIG_ENDIAN
+-# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
+-# endif
+-# if __BYTE_ORDER == __LITTLE_ENDIAN
+-# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
+-# endif
+-
+-static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
+-# define HUGE_VALF (__huge_valf.__f)
+-
+-#endif /* GCC. */
+diff -purN glibc-org/sysdeps/ieee754/bits/huge_val.h glibc-2.26/sysdeps/ieee754/bits/huge_val.h
+--- glibc-org/sysdeps/ieee754/bits/huge_val.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/bits/huge_val.h 1970-01-01 00:00:00.000000000 +0000
+@@ -1,53 +0,0 @@
+-/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
+- Used by <stdlib.h> and <math.h> functions for overflow.
+- Copyright (C) 1992-2017 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/>. */
+-
+-#ifndef _MATH_H
+-# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+-#endif
+-
+-/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
+-
+-#if __GNUC_PREREQ(3,3)
+-# define HUGE_VAL (__builtin_huge_val())
+-#elif __GNUC_PREREQ(2,96)
+-# define HUGE_VAL (__extension__ 0x1.0p2047)
+-#elif defined __GNUC__
+-
+-# define HUGE_VAL \
+- (__extension__ \
+- ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
+- { __l: 0x7ff0000000000000ULL }).__d)
+-
+-#else /* not GCC */
+-
+-# include <endian.h>
+-
+-typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
+-
+-# if __BYTE_ORDER == __BIG_ENDIAN
+-# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
+-# endif
+-# if __BYTE_ORDER == __LITTLE_ENDIAN
+-# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
+-# endif
+-
+-static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+-# define HUGE_VAL (__huge_val.__d)
+-
+-#endif /* GCC. */
+diff -purN glibc-org/sysdeps/ieee754/bits/inf.h glibc-2.26/sysdeps/ieee754/bits/inf.h
+--- glibc-org/sysdeps/ieee754/bits/inf.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/bits/inf.h 1970-01-01 00:00:00.000000000 +0000
+@@ -1,29 +0,0 @@
+-/* `INFINITY' constant for IEEE 754 machines.
+- Copyright (C) 2004-2017 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/>. */
+-
+-#ifndef _MATH_H
+-# error "Never use <bits/inf.h> directly; include <math.h> instead."
+-#endif
+-
+-/* IEEE positive infinity. */
+-
+-#if __GNUC_PREREQ(3,3)
+-# define INFINITY (__builtin_inff())
+-#else
+-# define INFINITY HUGE_VALF
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/bits/nan.h glibc-2.26/sysdeps/ieee754/bits/nan.h
+--- glibc-org/sysdeps/ieee754/bits/nan.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/bits/nan.h 1970-01-01 00:00:00.000000000 +0000
+@@ -1,52 +0,0 @@
+-/* `NAN' constant for IEEE 754 machines.
+- Copyright (C) 1992-2017 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/>. */
+-
+-#ifndef _MATH_H
+-# error "Never use <bits/nan.h> directly; include <math.h> instead."
+-#endif
+-
+-
+-/* IEEE Not A Number. */
+-
+-#if __GNUC_PREREQ(3,3)
+-
+-# define NAN (__builtin_nanf (""))
+-
+-#elif defined __GNUC__
+-
+-# define NAN \
+- (__extension__ \
+- ((union { unsigned __l __attribute__ ((__mode__ (__SI__))); float __d; }) \
+- { __l: 0x7fc00000UL }).__d)
+-
+-#else
+-
+-# include <endian.h>
+-
+-# if __BYTE_ORDER == __BIG_ENDIAN
+-# define __qnan_bytes { 0x7f, 0xc0, 0, 0 }
+-# endif
+-# if __BYTE_ORDER == __LITTLE_ENDIAN
+-# define __qnan_bytes { 0, 0, 0xc0, 0x7f }
+-# endif
+-
+-static union { unsigned char __c[4]; float __d; } __qnan_union
+- __attribute__ ((__unused__)) = { __qnan_bytes };
+-# define NAN (__qnan_union.__d)
+-
+-#endif /* GCC. */
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_acosh.c glibc-2.26/sysdeps/ieee754/dbl-64/e_acosh.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_acosh.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_acosh.c 2017-10-22 17:02:23.596967253 +0000
+@@ -36,7 +36,7 @@ __ieee754_acosh (double x)
+ {
+ double t;
+ int32_t hx;
+- u_int32_t lx;
++ uint32_t lx;
+ EXTRACT_WORDS (hx, lx, x);
+ if (hx < 0x3ff00000) /* x < 1 */
+ {
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_cosh.c glibc-2.26/sysdeps/ieee754/dbl-64/e_cosh.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_cosh.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_cosh.c 2017-10-22 17:02:23.596967253 +0000
+@@ -41,7 +41,7 @@ __ieee754_cosh (double x)
+ {
+ double t, w;
+ int32_t ix;
+- u_int32_t lx;
++ uint32_t lx;
+
+ /* High word of |x|. */
+ GET_HIGH_WORD (ix, x);
+@@ -71,7 +71,7 @@ __ieee754_cosh (double x)
+
+ /* |x| in [log(maxdouble), overflowthresold] */
+ GET_LOW_WORD (lx, x);
+- if (ix < 0x408633ce || ((ix == 0x408633ce) && (lx <= (u_int32_t) 0x8fb9f87d)))
++ if (ix < 0x408633ce || ((ix == 0x408633ce) && (lx <= (uint32_t) 0x8fb9f87d)))
+ {
+ w = __ieee754_exp (half * fabs (x));
+ t = half * w;
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_fmod.c glibc-2.26/sysdeps/ieee754/dbl-64/e_fmod.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_fmod.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_fmod.c 2017-10-22 17:02:23.596967253 +0000
+@@ -24,7 +24,7 @@ double
+ __ieee754_fmod (double x, double y)
+ {
+ int32_t n, hx, hy, hz, ix, iy, sx, i;
+- u_int32_t lx, ly, lz;
++ uint32_t lx, ly, lz;
+
+ EXTRACT_WORDS (hx, lx, x);
+ EXTRACT_WORDS (hy, ly, y);
+@@ -41,7 +41,7 @@ __ieee754_fmod (double x, double y)
+ if ((hx < hy) || (lx < ly))
+ return x; /* |x|<|y| return x */
+ if (lx == ly)
+- return Zero[(u_int32_t) sx >> 31]; /* |x|=|y| return x*0*/
++ return Zero[(uint32_t) sx >> 31]; /* |x|=|y| return x*0*/
+ }
+
+ /* determine ix = ilogb(x) */
+@@ -125,7 +125,7 @@ __ieee754_fmod (double x, double y)
+ else
+ {
+ if ((hz | lz) == 0) /* return sign(x)*0 */
+- return Zero[(u_int32_t) sx >> 31];
++ return Zero[(uint32_t) sx >> 31];
+ hx = hz + hz + (lz >> 31); lx = lz + lz;
+ }
+ }
+@@ -138,7 +138,7 @@ __ieee754_fmod (double x, double y)
+
+ /* convert back to floating value and restore the sign */
+ if ((hx | lx) == 0) /* return sign(x)*0 */
+- return Zero[(u_int32_t) sx >> 31];
++ return Zero[(uint32_t) sx >> 31];
+ while (hx < 0x00100000) /* normalize x */
+ {
+ hx = hx + hx + (lx >> 31); lx = lx + lx;
+@@ -154,7 +154,7 @@ __ieee754_fmod (double x, double y)
+ n = -1022 - iy;
+ if (n <= 20)
+ {
+- lx = (lx >> n) | ((u_int32_t) hx << (32 - n));
++ lx = (lx >> n) | ((uint32_t) hx << (32 - n));
+ hx >>= n;
+ }
+ else if (n <= 31)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_gamma_r.c glibc-2.26/sysdeps/ieee754/dbl-64/e_gamma_r.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_gamma_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_gamma_r.c 2017-10-22 17:02:23.596967253 +0000
+@@ -114,7 +114,7 @@ double
+ __ieee754_gamma_r (double x, int *signgamp)
+ {
+ int32_t hx;
+- u_int32_t lx;
++ uint32_t lx;
+ double ret;
+
+ EXTRACT_WORDS (hx, lx, x);
+@@ -126,7 +126,7 @@ __ieee754_gamma_r (double x, int *signga
+ return 1.0 / x;
+ }
+ if (__builtin_expect (hx < 0, 0)
+- && (u_int32_t) hx < 0xfff00000 && __rint (x) == x)
++ && (uint32_t) hx < 0xfff00000 && __rint (x) == x)
+ {
+ /* Return value for integer x < 0 is NaN with invalid exception. */
+ *signgamp = 0;
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_hypot.c glibc-2.26/sysdeps/ieee754/dbl-64/e_hypot.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_hypot.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_hypot.c 2017-10-22 17:02:23.596967253 +0000
+@@ -74,7 +74,7 @@ __ieee754_hypot (double x, double y)
+ {
+ if (ha >= 0x7ff00000) /* Inf or NaN */
+ {
+- u_int32_t low;
++ uint32_t low;
+ w = a + b; /* for sNaN */
+ if (issignaling (a) || issignaling (b))
+ return w;
+@@ -95,7 +95,7 @@ __ieee754_hypot (double x, double y)
+ {
+ if (hb <= 0x000fffff) /* subnormal b or 0 */
+ {
+- u_int32_t low;
++ uint32_t low;
+ GET_LOW_WORD (low, b);
+ if ((hb | low) == 0)
+ return a;
+@@ -147,7 +147,7 @@ __ieee754_hypot (double x, double y)
+ }
+ if (k != 0)
+ {
+- u_int32_t high;
++ uint32_t high;
+ t1 = 1.0;
+ GET_HIGH_WORD (high, t1);
+ SET_HIGH_WORD (t1, high + (k << 20));
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_jn.c glibc-2.26/sysdeps/ieee754/dbl-64/e_jn.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_jn.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_jn.c 2017-10-22 17:02:23.597967253 +0000
+@@ -61,7 +61,7 @@ __ieee754_jn (int n, double x)
+ EXTRACT_WORDS (hx, lx, x);
+ ix = 0x7fffffff & hx;
+ /* if J(n,NaN) is NaN */
+- if (__glibc_unlikely ((ix | ((u_int32_t) (lx | -lx)) >> 31) > 0x7ff00000))
++ if (__glibc_unlikely ((ix | ((uint32_t) (lx | -lx)) >> 31) > 0x7ff00000))
+ return x + x;
+ if (n < 0)
+ {
+@@ -266,13 +266,8 @@ __ieee754_yn (int n, double x)
+ EXTRACT_WORDS (hx, lx, x);
+ ix = 0x7fffffff & hx;
+ /* if Y(n,NaN) is NaN */
+- if (__glibc_unlikely ((ix | ((u_int32_t) (lx | -lx)) >> 31) > 0x7ff00000))
++ if (__glibc_unlikely ((ix | ((uint32_t) (lx | -lx)) >> 31) > 0x7ff00000))
+ return x + x;
+- if (__glibc_unlikely ((ix | lx) == 0))
+- return -HUGE_VAL + x;
+- /* -inf and overflow exception. */;
+- if (__glibc_unlikely (hx < 0))
+- return zero / (zero * x);
+ sign = 1;
+ if (n < 0)
+ {
+@@ -281,6 +276,11 @@ __ieee754_yn (int n, double x)
+ }
+ if (n == 0)
+ return (__ieee754_y0 (x));
++ if (__glibc_unlikely ((ix | lx) == 0))
++ return -sign / zero;
++ /* -inf and overflow exception. */;
++ if (__glibc_unlikely (hx < 0))
++ return zero / (zero * x);
+ {
+ SET_RESTORE_ROUND (FE_TONEAREST);
+ if (n == 1)
+@@ -318,7 +318,7 @@ __ieee754_yn (int n, double x)
+ }
+ else
+ {
+- u_int32_t high;
++ uint32_t high;
+ a = __ieee754_y0 (x);
+ b = __ieee754_y1 (x);
+ /* quit if b is -inf */
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_lgamma_r.c glibc-2.26/sysdeps/ieee754/dbl-64/e_lgamma_r.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_lgamma_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_lgamma_r.c 2017-10-22 17:02:23.597967253 +0000
+@@ -225,7 +225,7 @@ __ieee754_lgamma_r(double x, int *signga
+ if(hx<0) {
+ if(__builtin_expect(ix>=0x43300000, 0))
+ /* |x|>=2**52, must be -integer */
+- return __fabs (x)/zero;
++ return fabs (x)/zero;
+ if (x < -2.0 && x > -28.0)
+ return __lgamma_neg (x, signgamp);
+ t = sin_pi(x);
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_log10.c glibc-2.26/sysdeps/ieee754/dbl-64/e_log10.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_log10.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_log10.c 2017-10-22 17:02:23.597967253 +0000
+@@ -57,7 +57,7 @@ __ieee754_log10 (double x)
+ {
+ double y, z;
+ int32_t i, k, hx;
+- u_int32_t lx;
++ uint32_t lx;
+
+ EXTRACT_WORDS (hx, lx, x);
+
+@@ -65,7 +65,7 @@ __ieee754_log10 (double x)
+ if (hx < 0x00100000)
+ { /* x < 2**-1022 */
+ if (__glibc_unlikely (((hx & 0x7fffffff) | lx) == 0))
+- return -two54 / __fabs (x); /* log(+-0)=-inf */
++ return -two54 / fabs (x); /* log(+-0)=-inf */
+ if (__glibc_unlikely (hx < 0))
+ return (x - x) / (x - x); /* log(-#) = NaN */
+ k -= 54;
+@@ -75,7 +75,7 @@ __ieee754_log10 (double x)
+ if (__glibc_unlikely (hx >= 0x7ff00000))
+ return x + x;
+ k += (hx >> 20) - 1023;
+- i = ((u_int32_t) k & 0x80000000) >> 31;
++ i = ((uint32_t) k & 0x80000000) >> 31;
+ hx = (hx & 0x000fffff) | ((0x3ff - i) << 20);
+ y = (double) (k + i);
+ if (FIX_INT_FP_CONVERT_ZERO && y == 0.0)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_log2.c glibc-2.26/sysdeps/ieee754/dbl-64/e_log2.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_log2.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_log2.c 2017-10-22 17:02:23.597967253 +0000
+@@ -75,7 +75,7 @@ __ieee754_log2 (double x)
+ {
+ double hfsq, f, s, z, R, w, t1, t2, dk;
+ int32_t k, hx, i, j;
+- u_int32_t lx;
++ uint32_t lx;
+
+ EXTRACT_WORDS (hx, lx, x);
+
+@@ -83,7 +83,7 @@ __ieee754_log2 (double x)
+ if (hx < 0x00100000)
+ { /* x < 2**-1022 */
+ if (__glibc_unlikely (((hx & 0x7fffffff) | lx) == 0))
+- return -two54 / __fabs (x); /* log(+-0)=-inf */
++ return -two54 / fabs (x); /* log(+-0)=-inf */
+ if (__glibc_unlikely (hx < 0))
+ return (x - x) / (x - x); /* log(-#) = NaN */
+ k -= 54;
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_rem_pio2.c glibc-2.26/sysdeps/ieee754/dbl-64/e_rem_pio2.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_rem_pio2.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_rem_pio2.c 2017-10-22 17:02:23.597967253 +0000
+@@ -74,7 +74,7 @@ __ieee754_rem_pio2 (double x, double *y)
+ double z, w, t, r, fn;
+ double tx[3];
+ int32_t e0, i, j, nx, n, ix, hx;
+- u_int32_t low;
++ uint32_t low;
+
+ GET_HIGH_WORD (hx, x); /* high word of x */
+ ix = hx & 0x7fffffff;
+@@ -130,7 +130,7 @@ __ieee754_rem_pio2 (double x, double *y)
+ }
+ else
+ {
+- u_int32_t high;
++ uint32_t high;
+ j = ix >> 20;
+ y[0] = r - w;
+ GET_HIGH_WORD (high, y[0]);
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/e_sinh.c glibc-2.26/sysdeps/ieee754/dbl-64/e_sinh.c
+--- glibc-org/sysdeps/ieee754/dbl-64/e_sinh.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/e_sinh.c 2017-10-22 17:02:23.597967253 +0000
+@@ -43,7 +43,7 @@ __ieee754_sinh (double x)
+ {
+ double t, w, h;
+ int32_t ix, jx;
+- u_int32_t lx;
++ uint32_t lx;
+
+ /* High word of |x|. */
+ GET_HIGH_WORD (jx, x);
+@@ -77,7 +77,7 @@ __ieee754_sinh (double x)
+
+ /* |x| in [log(maxdouble), overflowthresold] */
+ GET_LOW_WORD (lx, x);
+- if (ix < 0x408633ce || ((ix == 0x408633ce) && (lx <= (u_int32_t) 0x8fb9f87d)))
++ if (ix < 0x408633ce || ((ix == 0x408633ce) && (lx <= (uint32_t) 0x8fb9f87d)))
+ {
+ w = __ieee754_exp (0.5 * fabs (x));
+ t = h * w;
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/Makefile glibc-2.26/sysdeps/ieee754/dbl-64/Makefile
+--- glibc-org/sysdeps/ieee754/dbl-64/Makefile 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/Makefile 2017-10-22 17:02:23.596967253 +0000
+@@ -1,6 +1,6 @@
+ ifeq ($(subdir),math)
+ # branred depends on precise IEEE double rounding
+-CFLAGS-branred.c = $(config-cflags-nofma)
+-CFLAGS-e_sqrt.c = $(config-cflags-nofma)
+-CFLAGS-e_pow.c = $(config-cflags-nofma)
++CFLAGS-branred.c += $(config-cflags-nofma)
++CFLAGS-e_sqrt.c += $(config-cflags-nofma)
++CFLAGS-e_pow.c += $(config-cflags-nofma)
+ endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_asinh.c glibc-2.26/sysdeps/ieee754/dbl-64/s_asinh.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_asinh.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_asinh.c 2017-10-22 17:02:23.597967253 +0000
+@@ -24,6 +24,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ static const double
+ one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
+@@ -65,8 +66,4 @@ __asinh (double x)
+ }
+ return __copysign (w, x);
+ }
+-weak_alias (__asinh, asinh)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__asinh, __asinhl)
+-weak_alias (__asinh, asinhl)
+-#endif
++libm_alias_double (__asinh, asinh)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_atan.c glibc-2.26/sysdeps/ieee754/dbl-64/s_atan.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_atan.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_atan.c 2017-10-22 17:02:23.597967253 +0000
+@@ -43,6 +43,7 @@
+ #include "atnat.h"
+ #include <fenv.h>
+ #include <float.h>
++#include <libm-alias-double.h>
+ #include <math.h>
+ #include <math_private.h>
+ #include <stap-probe.h>
+@@ -61,7 +62,7 @@ __signArctan (double x, double y)
+ /* An ultimate atan() routine. Given an IEEE double machine number x, */
+ /* routine computes the correctly rounded (to nearest) value of atan(x). */
+ double
+-atan (double x)
++__atan (double x)
+ {
+ double cor, s1, ss1, s2, ss2, t1, t2, t3, t7, t8, t9, t10, u, u2, u3,
+ v, vv, w, ww, y, yy, z, zz;
+@@ -323,6 +324,6 @@ atanMp (double x, const int pr[])
+ return y1; /*if impossible to do exact computing */
+ }
+
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (atan, atanl)
++#ifndef __atan
++libm_alias_double (__atan, atan)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_cbrt.c glibc-2.26/sysdeps/ieee754/dbl-64/s_cbrt.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_cbrt.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_cbrt.c 2017-10-22 17:02:23.597967253 +0000
+@@ -20,6 +20,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+
+ #define CBRT2 1.2599210498948731648 /* 2^(1/3) */
+@@ -69,8 +70,4 @@ __cbrt (double x)
+
+ return __ldexp (x > 0.0 ? ym : -ym, xe / 3);
+ }
+-weak_alias (__cbrt, cbrt)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__cbrt, __cbrtl)
+-weak_alias (__cbrt, cbrtl)
+-#endif
++libm_alias_double (__cbrt, cbrt)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_ceil.c glibc-2.26/sysdeps/ieee754/dbl-64/s_ceil.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_ceil.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_ceil.c 2017-10-22 17:02:23.597967253 +0000
+@@ -19,12 +19,13 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ double
+ __ceil (double x)
+ {
+ int32_t i0, i1, j0;
+- u_int32_t i, j;
++ uint32_t i, j;
+ EXTRACT_WORDS (i0, i1, x);
+ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
+ if (j0 < 20)
+@@ -60,7 +61,7 @@ __ceil (double x)
+ }
+ else
+ {
+- i = ((u_int32_t) (0xffffffff)) >> (j0 - 20);
++ i = ((uint32_t) (0xffffffff)) >> (j0 - 20);
+ if ((i1 & i) == 0)
+ return x; /* x is integral */
+ if (i0 > 0)
+@@ -81,9 +82,5 @@ __ceil (double x)
+ return x;
+ }
+ #ifndef __ceil
+-weak_alias (__ceil, ceil)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__ceil, __ceill)
+-weak_alias (__ceil, ceill)
+-# endif
++libm_alias_double (__ceil, ceil)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_copysign.c glibc-2.26/sysdeps/ieee754/dbl-64/s_copysign.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_copysign.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_copysign.c 2017-10-22 17:02:23.597967253 +0000
+@@ -22,18 +22,15 @@ static char rcsid[] = "$NetBSD: s_copysi
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ double
+ __copysign (double x, double y)
+ {
+- u_int32_t hx, hy;
++ uint32_t hx, hy;
+ GET_HIGH_WORD (hx, x);
+ GET_HIGH_WORD (hy, y);
+ SET_HIGH_WORD (x, (hx & 0x7fffffff) | (hy & 0x80000000));
+ return x;
+ }
+-weak_alias (__copysign, copysign)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__copysign, __copysignl)
+-weak_alias (__copysign, copysignl)
+-#endif
++libm_alias_double (__copysign, copysign)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_erf.c glibc-2.26/sysdeps/ieee754/dbl-64/s_erf.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_erf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_erf.c 2017-10-22 17:02:23.597967253 +0000
+@@ -116,6 +116,7 @@ static char rcsid[] = "$NetBSD: s_erf.c,
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <fix-int-fp-convert-zero.h>
+
+ static const double
+@@ -201,7 +202,7 @@ __erf (double x)
+ ix = hx & 0x7fffffff;
+ if (ix >= 0x7ff00000) /* erf(nan)=nan */
+ {
+- i = ((u_int32_t) hx >> 31) << 1;
++ i = ((uint32_t) hx >> 31) << 1;
+ return (double) (1 - i) + one / x; /* erf(+-inf)=+-1 */
+ }
+
+@@ -294,11 +295,7 @@ __erf (double x)
+ else
+ return r / x - one;
+ }
+-weak_alias (__erf, erf)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__erf, __erfl)
+-weak_alias (__erf, erfl)
+-#endif
++libm_alias_double (__erf, erf)
+
+ double
+ __erfc (double x)
+@@ -309,7 +306,7 @@ __erfc (double x)
+ ix = hx & 0x7fffffff;
+ if (ix >= 0x7ff00000) /* erfc(nan)=nan */
+ { /* erfc(+-inf)=0,2 */
+- double ret = (double) (((u_int32_t) hx >> 31) << 1) + one / x;
++ double ret = (double) (((uint32_t) hx >> 31) << 1) + one / x;
+ if (FIX_INT_FP_CONVERT_ZERO && ret == 0.0)
+ return 0.0;
+ return ret;
+@@ -421,8 +418,4 @@ __erfc (double x)
+ return two - tiny;
+ }
+ }
+-weak_alias (__erfc, erfc)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__erfc, __erfcl)
+-weak_alias (__erfc, erfcl)
+-#endif
++libm_alias_double (__erfc, erfc)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_expm1.c glibc-2.26/sysdeps/ieee754/dbl-64/s_expm1.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_expm1.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_expm1.c 2017-10-22 17:02:23.597967253 +0000
+@@ -112,6 +112,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #define one Q[0]
+ static const double
+ huge = 1.0e+300,
+@@ -132,7 +133,7 @@ __expm1 (double x)
+ {
+ double y, hi, lo, c, t, e, hxs, hfx, r1, h2, h4, R1, R2, R3;
+ int32_t k, xsb;
+- u_int32_t hx;
++ uint32_t hx;
+
+ GET_HIGH_WORD (hx, x);
+ xsb = hx & 0x80000000; /* sign bit of x */
+@@ -149,7 +150,7 @@ __expm1 (double x)
+ {
+ if (hx >= 0x7ff00000)
+ {
+- u_int32_t low;
++ uint32_t low;
+ GET_LOW_WORD (low, x);
+ if (((hx & 0xfffff) | low) != 0)
+ return x + x; /* NaN */
+@@ -228,7 +229,7 @@ __expm1 (double x)
+ }
+ if (k <= -2 || k > 56) /* suffice to return exp(x)-1 */
+ {
+- u_int32_t high;
++ uint32_t high;
+ y = one - (e - x);
+ GET_HIGH_WORD (high, y);
+ SET_HIGH_WORD (y, high + (k << 20)); /* add k to y's exponent */
+@@ -237,7 +238,7 @@ __expm1 (double x)
+ t = one;
+ if (k < 20)
+ {
+- u_int32_t high;
++ uint32_t high;
+ SET_HIGH_WORD (t, 0x3ff00000 - (0x200000 >> k)); /* t=1-2^-k */
+ y = t - (e - x);
+ GET_HIGH_WORD (high, y);
+@@ -245,7 +246,7 @@ __expm1 (double x)
+ }
+ else
+ {
+- u_int32_t high;
++ uint32_t high;
+ SET_HIGH_WORD (t, ((0x3ff - k) << 20)); /* 2^-k */
+ y = x - (e + t);
+ y += one;
+@@ -255,8 +256,4 @@ __expm1 (double x)
+ }
+ return y;
+ }
+-weak_alias (__expm1, expm1)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__expm1, __expm1l)
+-weak_alias (__expm1, expm1l)
+-#endif
++libm_alias_double (__expm1, expm1)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_fabs.c glibc-2.26/sysdeps/ieee754/dbl-64/s_fabs.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_fabs.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_fabs.c 2017-10-22 17:02:23.597967253 +0000
+@@ -19,14 +19,11 @@ static char rcsid[] = "$NetBSD: s_fabs.c
+ */
+
+ #include <math.h>
++#include <libm-alias-double.h>
+
+ double
+ __fabs (double x)
+ {
+ return __builtin_fabs (x);
+ }
+-weak_alias (__fabs, fabs)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__fabs, __fabsl)
+-weak_alias (__fabs, fabsl)
+-#endif
++libm_alias_double (__fabs, fabs)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_finite.c glibc-2.26/sysdeps/ieee754/dbl-64/s_finite.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_finite.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_finite.c 2017-10-22 17:02:23.597967253 +0000
+@@ -33,7 +33,7 @@ int FINITE(double x)
+ {
+ int32_t hx;
+ GET_HIGH_WORD (hx, x);
+- return (int) ((u_int32_t) ((hx & 0x7ff00000) - 0x7ff00000) >> 31);
++ return (int) ((uint32_t) ((hx & 0x7ff00000) - 0x7ff00000) >> 31);
+ }
+ hidden_def (__finite)
+ weak_alias (__finite, finite)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_floor.c glibc-2.26/sysdeps/ieee754/dbl-64/s_floor.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_floor.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_floor.c 2017-10-22 17:02:23.597967253 +0000
+@@ -19,12 +19,13 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ double
+ __floor (double x)
+ {
+ int32_t i0, i1, j0;
+- u_int32_t i, j;
++ uint32_t i, j;
+ EXTRACT_WORDS (i0, i1, x);
+ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
+ if (j0 < 20)
+@@ -60,7 +61,7 @@ __floor (double x)
+ }
+ else
+ {
+- i = ((u_int32_t) (0xffffffff)) >> (j0 - 20);
++ i = ((uint32_t) (0xffffffff)) >> (j0 - 20);
+ if ((i1 & i) == 0)
+ return x; /* x is integral */
+ if (i0 < 0)
+@@ -81,9 +82,5 @@ __floor (double x)
+ return x;
+ }
+ #ifndef __floor
+-weak_alias (__floor, floor)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__floor, __floorl)
+-weak_alias (__floor, floorl)
+-# endif
++libm_alias_double (__floor, floor)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_fma.c glibc-2.26/sysdeps/ieee754/dbl-64/s_fma.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_fma.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_fma.c 2017-10-22 17:02:23.597967253 +0000
+@@ -22,6 +22,7 @@
+ #include <fenv.h>
+ #include <ieee754.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <tininess.h>
+
+ /* This implementation uses rounding to odd to avoid problems with
+@@ -292,10 +293,5 @@ __fma (double x, double y, double z)
+ }
+ }
+ #ifndef __fma
+-weak_alias (__fma, fma)
+-#endif
+-
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__fma, __fmal)
+-weak_alias (__fmal, fmal)
++libm_alias_double (__fma, fma)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_fmaf.c glibc-2.26/sysdeps/ieee754/dbl-64/s_fmaf.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_fmaf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_fmaf.c 2017-10-22 17:02:23.597967253 +0000
+@@ -21,6 +21,7 @@
+ #include <fenv.h>
+ #include <ieee754.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ /* This implementation relies on double being more than twice as
+ precise as float and uses rounding to odd in order to avoid problems
+@@ -60,5 +61,5 @@ __fmaf (float x, float y, float z)
+ return (float) u.d;
+ }
+ #ifndef __fmaf
+-weak_alias (__fmaf, fmaf)
++libm_alias_float (__fma, fma)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_fpclassify.c glibc-2.26/sysdeps/ieee754/dbl-64/s_fpclassify.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_fpclassify.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_fpclassify.c 2017-10-22 17:02:23.597967253 +0000
+@@ -25,7 +25,7 @@
+ int
+ __fpclassify (double x)
+ {
+- u_int32_t hx, lx;
++ uint32_t hx, lx;
+ int retval = FP_NORMAL;
+
+ EXTRACT_WORDS (hx, lx, x);
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_frexp.c glibc-2.26/sysdeps/ieee754/dbl-64/s_frexp.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_frexp.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_frexp.c 2017-10-22 17:02:23.597967253 +0000
+@@ -26,6 +26,7 @@ static char rcsid[] = "$NetBSD: s_frexp.
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ static const double
+ two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */
+@@ -51,8 +52,4 @@ __frexp (double x, int *eptr)
+ SET_HIGH_WORD (x, hx);
+ return x;
+ }
+-weak_alias (__frexp, frexp)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__frexp, __frexpl)
+-weak_alias (__frexp, frexpl)
+-#endif
++libm_alias_double (__frexp, frexp)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_fromfp.c glibc-2.26/sysdeps/ieee754/dbl-64/s_fromfp.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_fromfp.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_fromfp.c 2017-10-22 17:02:23.597967253 +0000
+@@ -1,7 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 0
+-#define FUNC fromfp
++#define FUNC __fromfp
+ #include <s_fromfp_main.c>
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (fromfp, fromfpl)
+-#endif
++libm_alias_double (__fromfp, fromfp)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_fromfp_main.c glibc-2.26/sysdeps/ieee754/dbl-64/s_fromfp_main.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_fromfp_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_fromfp_main.c 2017-10-22 17:02:23.597967253 +0000
+@@ -20,6 +20,7 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <stdbool.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_fromfpx.c glibc-2.26/sysdeps/ieee754/dbl-64/s_fromfpx.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_fromfpx.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_fromfpx.c 2017-10-22 17:02:23.597967253 +0000
+@@ -1,7 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 1
+-#define FUNC fromfpx
++#define FUNC __fromfpx
+ #include <s_fromfp_main.c>
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (fromfpx, fromfpxl)
+-#endif
++libm_alias_double (__fromfpx, fromfpx)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_getpayload.c glibc-2.26/sysdeps/ieee754/dbl-64/s_getpayload.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_getpayload.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_getpayload.c 2017-10-22 17:02:23.597967253 +0000
+@@ -19,10 +19,11 @@
+ #include <fix-int-fp-convert-zero.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+ double
+-getpayload (const double *x)
++__getpayload (const double *x)
+ {
+ uint32_t hx, lx;
+ EXTRACT_WORDS (hx, lx, *x);
+@@ -32,6 +33,4 @@ getpayload (const double *x)
+ return 0.0f;
+ return (double) ix;
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (getpayload, getpayloadl)
+-#endif
++libm_alias_double (__getpayload, getpayload)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/sincos32.h glibc-2.26/sysdeps/ieee754/dbl-64/sincos32.h
+--- glibc-org/sysdeps/ieee754/dbl-64/sincos32.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/sincos32.h 2017-10-22 17:02:23.598967253 +0000
+@@ -25,7 +25,7 @@
+ /******************************************************************/
+
+ #ifndef SINCOS32_H
+-#define SINCCOS32_H
++#define SINCOS32_H
+
+ #ifdef BIG_ENDI
+ static const number
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_isnan.c glibc-2.26/sysdeps/ieee754/dbl-64/s_isnan.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_isnan.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_isnan.c 2017-10-22 17:02:23.597967253 +0000
+@@ -30,9 +30,9 @@ __isnan (double x)
+ int32_t hx, lx;
+ EXTRACT_WORDS (hx, lx, x);
+ hx &= 0x7fffffff;
+- hx |= (u_int32_t) (lx | (-lx)) >> 31;
++ hx |= (uint32_t) (lx | (-lx)) >> 31;
+ hx = 0x7ff00000 - hx;
+- return (int) (((u_int32_t) hx) >> 31);
++ return (int) (((uint32_t) hx) >> 31);
+ }
+ hidden_def (__isnan)
+ weak_alias (__isnan, isnan)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_issignaling.c glibc-2.26/sysdeps/ieee754/dbl-64/s_issignaling.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_issignaling.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_issignaling.c 2017-10-22 17:02:23.597967253 +0000
+@@ -24,14 +24,14 @@ int
+ __issignaling (double x)
+ {
+ #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+- u_int32_t hxi;
++ uint32_t hxi;
+ GET_HIGH_WORD (hxi, x);
+ /* We only have to care about the high-order bit of x's significand, because
+ having it set (sNaN) already makes the significand different from that
+ used to designate infinity. */
+ return (hxi & 0x7ff80000) == 0x7ff80000;
+ #else
+- u_int32_t hxi, lxi;
++ uint32_t hxi, lxi;
+ EXTRACT_WORDS (hxi, lxi, x);
+ /* To keep the following comparison simple, toggle the quiet/signaling bit,
+ so that it is set for sNaNs. This is inverse to IEEE 754-2008 (as well as
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_llrint.c glibc-2.26/sysdeps/ieee754/dbl-64/s_llrint.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_llrint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_llrint.c 2017-10-22 17:02:23.597967253 +0000
+@@ -23,6 +23,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+ static const double two52[2] =
+@@ -36,7 +37,7 @@ long long int
+ __llrint (double x)
+ {
+ int32_t j0;
+- u_int32_t i1, i0;
++ uint32_t i1, i0;
+ long long int result;
+ double w;
+ double t;
+@@ -96,8 +97,4 @@ __llrint (double x)
+ return sx ? -result : result;
+ }
+
+-weak_alias (__llrint, llrint)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__llrint, __llrintl)
+-weak_alias (__llrint, llrintl)
+-#endif
++libm_alias_double (__llrint, llrint)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_llround.c glibc-2.26/sysdeps/ieee754/dbl-64/s_llround.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_llround.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_llround.c 2017-10-22 17:02:23.597967253 +0000
+@@ -22,6 +22,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+
+@@ -29,7 +30,7 @@ long long int
+ __llround (double x)
+ {
+ int32_t j0;
+- u_int32_t i1, i0;
++ uint32_t i1, i0;
+ long long int result;
+ int sign;
+
+@@ -56,7 +57,7 @@ __llround (double x)
+ result = (((long long int) i0 << 32) | i1) << (j0 - 52);
+ else
+ {
+- u_int32_t j = i1 + (0x80000000 >> (j0 - 20));
++ uint32_t j = i1 + (0x80000000 >> (j0 - 20));
+ if (j < i1)
+ ++i0;
+
+@@ -84,8 +85,4 @@ __llround (double x)
+ return sign * result;
+ }
+
+-weak_alias (__llround, llround)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__llround, __llroundl)
+-weak_alias (__llround, llroundl)
+-#endif
++libm_alias_double (__llround, llround)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_logb.c glibc-2.26/sysdeps/ieee754/dbl-64/s_logb.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_logb.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_logb.c 2017-10-22 17:02:23.597967253 +0000
+@@ -18,6 +18,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <fix-int-fp-convert-zero.h>
+
+ double
+@@ -46,7 +47,6 @@ __logb (double x)
+ return 0.0;
+ return (double) (rix - 1023);
+ }
+-weak_alias (__logb, logb)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__logb, __logbl) weak_alias (__logb, logbl)
++#ifndef __logb
++libm_alias_double (__logb, logb)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_lrint.c glibc-2.26/sysdeps/ieee754/dbl-64/s_lrint.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_lrint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_lrint.c 2017-10-22 17:02:23.597967253 +0000
+@@ -23,6 +23,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+ static const double two52[2] =
+@@ -36,7 +37,7 @@ long int
+ __lrint (double x)
+ {
+ int32_t j0;
+- u_int32_t i0, i1;
++ uint32_t i0, i1;
+ double w;
+ double t;
+ long int result;
+@@ -120,8 +121,4 @@ __lrint (double x)
+ return sx ? -result : result;
+ }
+
+-weak_alias (__lrint, lrint)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__lrint, __lrintl)
+-weak_alias (__lrint, lrintl)
+-#endif
++libm_alias_double (__lrint, lrint)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_lround.c glibc-2.26/sysdeps/ieee754/dbl-64/s_lround.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_lround.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_lround.c 2017-10-22 17:02:23.597967253 +0000
+@@ -22,6 +22,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+
+@@ -29,7 +30,7 @@ long int
+ __lround (double x)
+ {
+ int32_t j0;
+- u_int32_t i1, i0;
++ uint32_t i1, i0;
+ long int result;
+ int sign;
+
+@@ -56,7 +57,7 @@ __lround (double x)
+ result = ((long int) i0 << (j0 - 20)) | ((long int) i1 << (j0 - 52));
+ else
+ {
+- u_int32_t j = i1 + (0x80000000 >> (j0 - 20));
++ uint32_t j = i1 + (0x80000000 >> (j0 - 20));
+ if (j < i1)
+ ++i0;
+
+@@ -106,8 +107,4 @@ __lround (double x)
+ return sign * result;
+ }
+
+-weak_alias (__lround, lround)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__lround, __lroundl)
+-weak_alias (__lround, lroundl)
+-#endif
++libm_alias_double (__lround, lround)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_modf.c glibc-2.26/sysdeps/ieee754/dbl-64/s_modf.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_modf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_modf.c 2017-10-22 17:02:23.597967253 +0000
+@@ -21,6 +21,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ static const double one = 1.0;
+
+@@ -28,7 +29,7 @@ double
+ __modf (double x, double *iptr)
+ {
+ int32_t i0, i1, j0;
+- u_int32_t i;
++ uint32_t i;
+ EXTRACT_WORDS (i0, i1, x);
+ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; /* exponent of x */
+ if (j0 < 20) /* integer part in high x */
+@@ -65,7 +66,7 @@ __modf (double x, double *iptr)
+ }
+ else /* fraction part in low x */
+ {
+- i = ((u_int32_t) (0xffffffff)) >> (j0 - 20);
++ i = ((uint32_t) (0xffffffff)) >> (j0 - 20);
+ if ((i1 & i) == 0) /* x is integral */
+ {
+ *iptr = x;
+@@ -79,8 +80,6 @@ __modf (double x, double *iptr)
+ }
+ }
+ }
+-weak_alias (__modf, modf)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__modf, __modfl)
+-weak_alias (__modf, modfl)
++#ifndef __modf
++libm_alias_double (__modf, modf)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_nearbyint.c glibc-2.26/sysdeps/ieee754/dbl-64/s_nearbyint.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_nearbyint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_nearbyint.c 2017-10-22 17:02:23.597967253 +0000
+@@ -27,6 +27,7 @@ static char rcsid[] = "$NetBSD: s_rint.c
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ static const double
+ TWO52[2] = {
+@@ -48,7 +49,7 @@ __nearbyint (double x)
+ if (j0 < 0)
+ {
+ libc_feholdexcept (&env);
+- w = TWO52[sx] + x;
++ w = TWO52[sx] + math_opt_barrier (x);
+ t = w - TWO52[sx];
+ math_force_eval (t);
+ libc_fesetenv (&env);
+@@ -65,14 +66,10 @@ __nearbyint (double x)
+ return x; /* x is integral */
+ }
+ libc_feholdexcept (&env);
+- w = TWO52[sx] + x;
++ w = TWO52[sx] + math_opt_barrier (x);
+ t = w - TWO52[sx];
+ math_force_eval (t);
+ libc_fesetenv (&env);
+ return t;
+ }
+-weak_alias (__nearbyint, nearbyint)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__nearbyint, __nearbyintl)
+-weak_alias (__nearbyint, nearbyintl)
+-#endif
++libm_alias_double (__nearbyint, nearbyint)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_nextup.c glibc-2.26/sysdeps/ieee754/dbl-64/s_nextup.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_nextup.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_nextup.c 2017-10-22 17:02:23.597967253 +0000
+@@ -18,13 +18,14 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ /* Return the least floating-point number greater than X. */
+ double
+ __nextup (double x)
+ {
+ int32_t hx, ix;
+- u_int32_t lx;
++ uint32_t lx;
+
+ EXTRACT_WORDS (hx, lx, x);
+ ix = hx & 0x7fffffff;
+@@ -51,8 +52,4 @@ __nextup (double x)
+ return x;
+ }
+
+-weak_alias (__nextup, nextup)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__nextup, __nextupl)
+-weak_alias (__nextup, nextupl)
+-#endif
++libm_alias_double (__nextup, nextup)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_remquo.c glibc-2.26/sysdeps/ieee754/dbl-64/s_remquo.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_remquo.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_remquo.c 2017-10-22 17:02:23.597967253 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+
+ static const double zero = 0.0;
+@@ -29,7 +30,7 @@ double
+ __remquo (double x, double y, int *quo)
+ {
+ int32_t hx, hy;
+- u_int32_t sx, lx, ly;
++ uint32_t sx, lx, ly;
+ int cquo, qs;
+
+ EXTRACT_WORDS (hx, lx, x);
+@@ -108,8 +109,4 @@ __remquo (double x, double y, int *quo)
+ x = -x;
+ return x;
+ }
+-weak_alias (__remquo, remquo)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__remquo, __remquol)
+-weak_alias (__remquo, remquol)
+-#endif
++libm_alias_double (__remquo, remquo)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_rint.c glibc-2.26/sysdeps/ieee754/dbl-64/s_rint.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_rint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_rint.c 2017-10-22 17:02:23.598967253 +0000
+@@ -22,6 +22,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ static const double
+ TWO52[2] = {
+@@ -59,9 +60,5 @@ __rint (double x)
+ return w - TWO52[sx];
+ }
+ #ifndef __rint
+-weak_alias (__rint, rint)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__rint, __rintl)
+-weak_alias (__rint, rintl)
+-# endif
++libm_alias_double (__rint, rint)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_round.c glibc-2.26/sysdeps/ieee754/dbl-64/s_round.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_round.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_round.c 2017-10-22 17:02:23.598967253 +0000
+@@ -20,13 +20,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+
+ double
+ __round (double x)
+ {
+ int32_t i0, j0;
+- u_int32_t i1;
++ uint32_t i1;
+
+ EXTRACT_WORDS (i0, i1, x);
+ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
+@@ -41,7 +42,7 @@ __round (double x)
+ }
+ else
+ {
+- u_int32_t i = 0x000fffff >> j0;
++ uint32_t i = 0x000fffff >> j0;
+ if (((i0 & i) | i1) == 0)
+ /* X is integral. */
+ return x;
+@@ -61,12 +62,12 @@ __round (double x)
+ }
+ else
+ {
+- u_int32_t i = 0xffffffff >> (j0 - 20);
++ uint32_t i = 0xffffffff >> (j0 - 20);
+ if ((i1 & i) == 0)
+ /* X is integral. */
+ return x;
+
+- u_int32_t j = i1 + (1 << (51 - j0));
++ uint32_t j = i1 + (1 << (51 - j0));
+ if (j < i1)
+ i0 += 1;
+ i1 = j;
+@@ -76,8 +77,4 @@ __round (double x)
+ INSERT_WORDS (x, i0, i1);
+ return x;
+ }
+-weak_alias (__round, round)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__round, __roundl)
+-weak_alias (__round, roundl)
+-#endif
++libm_alias_double (__round, round)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_roundeven.c glibc-2.26/sysdeps/ieee754/dbl-64/s_roundeven.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_roundeven.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_roundeven.c 2017-10-22 17:02:23.598967253 +0000
+@@ -19,6 +19,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+ #define BIAS 0x3ff
+@@ -26,7 +27,7 @@
+ #define MAX_EXP (2 * BIAS + 1)
+
+ double
+-roundeven (double x)
++__roundeven (double x)
+ {
+ uint32_t hx, lx, uhx;
+ EXTRACT_WORDS (hx, lx, x);
+@@ -100,7 +101,5 @@ roundeven (double x)
+ INSERT_WORDS (x, hx, lx);
+ return x;
+ }
+-hidden_def (roundeven)
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (roundeven, roundevenl)
+-#endif
++hidden_def (__roundeven)
++libm_alias_double (__roundeven, roundeven)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_setpayload.c glibc-2.26/sysdeps/ieee754/dbl-64/s_setpayload.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_setpayload.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_setpayload.c 2017-10-22 17:02:23.598967253 +0000
+@@ -1,6 +1,4 @@
+ #define SIG 0
+-#define FUNC setpayload
++#define FUNC __setpayload
+ #include <s_setpayload_main.c>
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (setpayload, setpayloadl)
+-#endif
++libm_alias_double (__setpayload, setpayload)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_setpayload_main.c glibc-2.26/sysdeps/ieee754/dbl-64/s_setpayload_main.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_setpayload_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_setpayload_main.c 2017-10-22 17:02:23.598967253 +0000
+@@ -18,6 +18,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_setpayloadsig.c glibc-2.26/sysdeps/ieee754/dbl-64/s_setpayloadsig.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_setpayloadsig.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_setpayloadsig.c 2017-10-22 17:02:23.598967253 +0000
+@@ -1,6 +1,4 @@
+ #define SIG 1
+-#define FUNC setpayloadsig
++#define FUNC __setpayloadsig
+ #include <s_setpayload_main.c>
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (setpayloadsig, setpayloadsigl)
+-#endif
++libm_alias_double (__setpayloadsig, setpayloadsig)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_sin.c glibc-2.26/sysdeps/ieee754/dbl-64/s_sin.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_sin.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_sin.c 2017-10-22 17:02:23.598967253 +0000
+@@ -52,6 +52,7 @@
+ #include "MathLib.h"
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <fenv.h>
+
+ /* Helper macros to compute sin of the input values. */
+@@ -912,16 +913,8 @@ cslow2 (double x)
+ }
+
+ #ifndef __cos
+-weak_alias (__cos, cos)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__cos, __cosl)
+-weak_alias (__cos, cosl)
+-# endif
++libm_alias_double (__cos, cos)
+ #endif
+ #ifndef __sin
+-weak_alias (__sin, sin)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__sin, __sinl)
+-weak_alias (__sin, sinl)
+-# endif
++libm_alias_double (__sin, sin)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_sincos.c glibc-2.26/sysdeps/ieee754/dbl-64/s_sincos.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_sincos.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_sincos.c 2017-10-22 17:02:23.598967253 +0000
+@@ -21,6 +21,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ #define __sin __sin_local
+ #define __cos __cos_local
+@@ -106,8 +107,4 @@ __sincos (double x, double *sinx, double
+
+ *sinx = *cosx = x / x;
+ }
+-weak_alias (__sincos, sincos)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__sincos, __sincosl)
+-weak_alias (__sincos, sincosl)
+-#endif
++libm_alias_double (__sincos, sincos)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_tan.c glibc-2.26/sysdeps/ieee754/dbl-64/s_tan.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_tan.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_tan.c 2017-10-22 17:02:23.598967253 +0000
+@@ -41,6 +41,7 @@
+ #include "MathLib.h"
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <fenv.h>
+ #include <stap-probe.h>
+
+@@ -53,7 +54,7 @@ void __mptan (double, mp_no *, int);
+
+ double
+ SECTION
+-tan (double x)
++__tan (double x)
+ {
+ #include "utan.h"
+ #include "utan.tbl"
+@@ -843,6 +844,6 @@ tanMp (double x)
+ return y;
+ }
+
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (tan, tanl)
++#ifndef __tan
++libm_alias_double (__tan, tan)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_tanh.c glibc-2.26/sysdeps/ieee754/dbl-64/s_tanh.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_tanh.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_tanh.c 2017-10-22 17:02:23.598967253 +0000
+@@ -41,6 +41,7 @@ static char rcsid[] = "$NetBSD: s_tanh.c
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ static const double one = 1.0, two = 2.0, tiny = 1.0e-300;
+
+@@ -91,8 +92,4 @@ __tanh (double x)
+ }
+ return (jx >= 0) ? z : -z;
+ }
+-weak_alias (__tanh, tanh)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__tanh, __tanhl)
+-weak_alias (__tanh, tanhl)
+-#endif
++libm_alias_double (__tanh, tanh)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_totalorder.c glibc-2.26/sysdeps/ieee754/dbl-64/s_totalorder.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_totalorder.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_totalorder.c 2017-10-22 17:02:23.598967253 +0000
+@@ -18,11 +18,12 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+ int
+-totalorder (double x, double y)
++__totalorder (double x, double y)
+ {
+ int32_t hx, hy;
+ uint32_t lx, ly;
+@@ -49,6 +50,4 @@ totalorder (double x, double y)
+ ly ^= hy_sign;
+ return hx < hy || (hx == hy && lx <= ly);
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (totalorder, totalorderl)
+-#endif
++libm_alias_double (__totalorder, totalorder)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_totalordermag.c glibc-2.26/sysdeps/ieee754/dbl-64/s_totalordermag.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_totalordermag.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_totalordermag.c 2017-10-22 17:02:23.598967253 +0000
+@@ -18,11 +18,12 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+ int
+-totalordermag (double x, double y)
++__totalordermag (double x, double y)
+ {
+ uint32_t hx, hy;
+ uint32_t lx, ly;
+@@ -44,6 +45,4 @@ totalordermag (double x, double y)
+ #endif
+ return hx < hy || (hx == hy && lx <= ly);
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (totalordermag, totalordermagl)
+-#endif
++libm_alias_double (__totalordermag, totalordermag)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_trunc.c glibc-2.26/sysdeps/ieee754/dbl-64/s_trunc.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_trunc.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_trunc.c 2017-10-22 17:02:23.598967253 +0000
+@@ -20,13 +20,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+
+ double
+ __trunc (double x)
+ {
+ int32_t i0, j0;
+- u_int32_t i1;
++ uint32_t i1;
+ int sx;
+
+ EXTRACT_WORDS (i0, i1, x);
+@@ -54,9 +55,5 @@ __trunc (double x)
+ return x;
+ }
+ #ifndef __trunc
+-weak_alias (__trunc, trunc)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__trunc, __truncl)
+-weak_alias (__trunc, truncl)
+-# endif
++libm_alias_double (__trunc, trunc)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_ufromfp.c glibc-2.26/sysdeps/ieee754/dbl-64/s_ufromfp.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_ufromfp.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_ufromfp.c 2017-10-22 17:02:23.598967253 +0000
+@@ -1,7 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 0
+-#define FUNC ufromfp
++#define FUNC __ufromfp
+ #include <s_fromfp_main.c>
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (ufromfp, ufromfpl)
+-#endif
++libm_alias_double (__ufromfp, ufromfp)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/s_ufromfpx.c glibc-2.26/sysdeps/ieee754/dbl-64/s_ufromfpx.c
+--- glibc-org/sysdeps/ieee754/dbl-64/s_ufromfpx.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/s_ufromfpx.c 2017-10-22 17:02:23.598967253 +0000
+@@ -1,7 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 1
+-#define FUNC ufromfpx
++#define FUNC __ufromfpx
+ #include <s_fromfp_main.c>
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (ufromfpx, ufromfpxl)
+-#endif
++libm_alias_double (__ufromfpx, ufromfpx)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/w_exp_compat.c glibc-2.26/sysdeps/ieee754/dbl-64/w_exp_compat.c
+--- glibc-org/sysdeps/ieee754/dbl-64/w_exp_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/w_exp_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+-
+- 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>
+-
+-/* wrapper exp */
+-double
+-__exp (double x)
+-{
+- double z = __ieee754_exp (x);
+- if (__builtin_expect (!isfinite (z) || z == 0, 0)
+- && isfinite (x) && _LIB_VERSION != _IEEE_)
+- return __kernel_standard (x, x, 6 + !!signbit (x));
+-
+- return z;
+-}
+-hidden_def (__exp)
+-weak_alias (__exp, exp)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__exp, __expl)
+-weak_alias (__exp, expl)
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/e_log10.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/e_log10.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/e_log10.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/e_log10.c 2017-10-22 17:02:23.598967253 +0000
+@@ -65,7 +65,7 @@ __ieee754_log10 (double x)
+ if (hx < INT64_C(0x0010000000000000))
+ { /* x < 2**-1022 */
+ if (__glibc_unlikely ((hx & UINT64_C(0x7fffffffffffffff)) == 0))
+- return -two54 / (x - x); /* log(+-0)=-inf */
++ return -two54 / fabs (x); /* log(+-0)=-inf */
+ if (__glibc_unlikely (hx < 0))
+ return (x - x) / (x - x); /* log(-#) = NaN */
+ k -= 54;
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c 2017-10-22 17:02:23.598967253 +0000
+@@ -81,7 +81,7 @@ __ieee754_log2 (double x)
+ if (hx < INT64_C(0x0010000000000000))
+ { /* x < 2**-1022 */
+ if (__glibc_unlikely ((hx & UINT64_C(0x7fffffffffffffff)) == 0))
+- return -two54 / (x - x); /* log(+-0)=-inf */
++ return -two54 / fabs (x); /* log(+-0)=-inf */
+ if (__glibc_unlikely (hx < 0))
+ return (x - x) / (x - x); /* log(-#) = NaN */
+ k -= 54;
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c 2017-10-22 17:02:23.598967253 +0000
+@@ -19,6 +19,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ double
+ __ceil(double x)
+@@ -46,9 +47,5 @@ __ceil(double x)
+ return x;
+ }
+ #ifndef __ceil
+-weak_alias (__ceil, ceil)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__ceil, __ceill)
+-weak_alias (__ceil, ceill)
+-# endif
++libm_alias_double (__ceil, ceil)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c 2017-10-22 17:02:23.598967253 +0000
+@@ -33,6 +33,7 @@
+ #include <math.h>
+ #include <math_private.h>
+ #include <stdint.h>
++#include <libm-alias-double.h>
+
+ /*
+ * floor(x)
+@@ -66,9 +67,5 @@ __floor (double x)
+ return x;
+ }
+ #ifndef __floor
+-weak_alias (__floor, floor)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__floor, __floorl)
+-weak_alias (__floor, floorl)
+-# endif
++libm_alias_double (__floor, floor)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c 2017-10-22 17:02:23.598967253 +0000
+@@ -19,6 +19,7 @@
+ #include <inttypes.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ /*
+ * for non-zero, finite x
+@@ -62,8 +63,4 @@ __frexp (double x, int *eptr)
+ *eptr = e;
+ return x;
+ }
+-weak_alias (__frexp, frexp)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__frexp, __frexpl)
+-weak_alias (__frexp, frexpl)
+-#endif
++libm_alias_double (__frexp, frexp)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c 2017-10-22 17:02:23.598967253 +0000
+@@ -18,16 +18,15 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+ double
+-getpayload (const double *x)
++__getpayload (const double *x)
+ {
+ uint64_t ix;
+ EXTRACT_WORDS64 (ix, *x);
+ ix &= 0x7ffffffffffffULL;
+ return (double) ix;
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (getpayload, getpayloadl)
+-#endif
++libm_alias_double (__getpayload, getpayload)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_issignaling.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_issignaling.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_issignaling.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_issignaling.c 2017-10-22 17:02:23.598967253 +0000
+@@ -23,7 +23,7 @@
+ int
+ __issignaling (double x)
+ {
+- u_int64_t xi;
++ uint64_t xi;
+ EXTRACT_WORDS64 (xi, x);
+ #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+ /* We only have to care about the high-order bit of x's significand, because
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c 2017-10-22 17:02:23.598967253 +0000
+@@ -24,6 +24,7 @@
+ #include <sysdep.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+
+ long long int
+@@ -63,20 +64,12 @@ __llround (double x)
+ return sign * result;
+ }
+
+-weak_alias (__llround, llround)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__llround, __llroundl)
+-weak_alias (__llround, llroundl)
+-#endif
++libm_alias_double (__llround, llround)
+
+ /* long has the same width as long long on LP64 machines, so use an alias. */
+ #undef lround
+ #undef __lround
+ #ifdef _LP64
+ strong_alias (__llround, __lround)
+-weak_alias (__llround, lround)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__llround, __lroundl)
+-weak_alias (__llround, lroundl)
+-# endif
++libm_alias_double (__lround, lround)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c 2017-10-22 17:02:23.598967253 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+
+ double
+@@ -41,8 +42,6 @@ __logb (double x)
+ }
+ return (double) (ex - 1023);
+ }
+-weak_alias (__logb, logb)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__logb, __logbl)
+-weak_alias (__logb, logbl)
++#ifndef __logb
++libm_alias_double (__logb, logb)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c 2017-10-22 17:02:23.598967253 +0000
+@@ -21,6 +21,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ /* For LP64, lround is an alias for llround. */
+ #ifndef _LP64
+@@ -80,10 +81,6 @@ __lround (double x)
+ return sign * result;
+ }
+
+-weak_alias (__lround, lround)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__lround, __lroundl)
+-weak_alias (__lround, lroundl)
+-# endif
++libm_alias_double (__lround, lround)
+
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_modf.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_modf.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_modf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_modf.c 2017-10-22 17:02:23.598967253 +0000
+@@ -22,6 +22,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+ static const double one = 1.0;
+@@ -59,8 +60,6 @@ __modf(double x, double *iptr)
+ return x;
+ }
+ }
+-weak_alias (__modf, modf)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__modf, __modfl)
+-weak_alias (__modf, modfl)
++#ifndef __modf
++libm_alias_double (__modf, modf)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c 2017-10-22 17:02:23.598967253 +0000
+@@ -23,6 +23,7 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ static const double
+ TWO52[2]={
+@@ -42,9 +43,9 @@ __nearbyint(double x)
+ if(__builtin_expect(j0<52, 1)) {
+ if(j0<0) {
+ libc_feholdexcept (&env);
+- double w = TWO52[sx]+x;
++ double w = TWO52[sx] + math_opt_barrier (x);
+ double t = w-TWO52[sx];
+- math_opt_barrier(t);
++ math_force_eval (t);
+ libc_fesetenv (&env);
+ return __copysign (t, x);
+ }
+@@ -53,14 +54,10 @@ __nearbyint(double x)
+ else return x; /* x is integral */
+ }
+ libc_feholdexcept (&env);
+- double w = TWO52[sx]+x;
++ double w = TWO52[sx] + math_opt_barrier (x);
+ double t = w-TWO52[sx];
+- math_opt_barrier (t);
++ math_force_eval (t);
+ libc_fesetenv (&env);
+ return t;
+ }
+-weak_alias (__nearbyint, nearbyint)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__nearbyint, __nearbyintl)
+-weak_alias (__nearbyint, nearbyintl)
+-#endif
++libm_alias_double (__nearbyint, nearbyint)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c 2017-10-22 17:02:23.598967253 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+ static const double zero = 0.0;
+@@ -107,8 +108,4 @@ __remquo (double x, double y, int *quo)
+ x = -x;
+ return x;
+ }
+-weak_alias (__remquo, remquo)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__remquo, __remquol)
+-weak_alias (__remquo, remquol)
+-#endif
++libm_alias_double (__remquo, remquo)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c 2017-10-22 17:02:23.598967253 +0000
+@@ -21,6 +21,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ static const double
+ TWO52[2]={
+@@ -52,9 +53,5 @@ __rint(double x)
+ return w-TWO52[sx];
+ }
+ #ifndef __rint
+-weak_alias (__rint, rint)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__rint, __rintl)
+-weak_alias (__rint, rintl)
+-# endif
++libm_alias_double (__rint, rint)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c 2017-10-22 17:02:23.598967253 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+
+@@ -61,8 +62,4 @@ __round (double x)
+ INSERT_WORDS64 (x, i0);
+ return x;
+ }
+-weak_alias (__round, round)
+-#ifdef NO_LONG_DOUBLE
+-strong_alias (__round, __roundl)
+-weak_alias (__round, roundl)
+-#endif
++libm_alias_double (__round, round)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c 2017-10-22 17:02:23.598967253 +0000
+@@ -19,6 +19,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+ #define BIAS 0x3ff
+@@ -26,7 +27,7 @@
+ #define MAX_EXP (2 * BIAS + 1)
+
+ double
+-roundeven (double x)
++__roundeven (double x)
+ {
+ uint64_t ix, ux;
+ EXTRACT_WORDS64 (ix, x);
+@@ -66,7 +67,5 @@ roundeven (double x)
+ INSERT_WORDS64 (x, ix);
+ return x;
+ }
+-hidden_def (roundeven)
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (roundeven, roundevenl)
+-#endif
++hidden_def (__roundeven)
++libm_alias_double (__roundeven, roundeven)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c 2017-10-22 17:02:23.598967253 +0000
+@@ -18,6 +18,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c 2017-10-22 17:02:23.598967253 +0000
+@@ -19,10 +19,11 @@
+ #include <math.h>
+ #include <math_private.h>
+ #include <nan-high-order-bit.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+ int
+-totalorder (double x, double y)
++__totalorder (double x, double y)
+ {
+ int64_t ix, iy;
+ EXTRACT_WORDS64 (ix, x);
+@@ -45,6 +46,4 @@ totalorder (double x, double y)
+ iy ^= iy_sign >> 1;
+ return ix <= iy;
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (totalorder, totalorderl)
+-#endif
++libm_alias_double (__totalorder, totalorder)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c 2017-10-22 17:02:23.598967253 +0000
+@@ -19,10 +19,11 @@
+ #include <math.h>
+ #include <math_private.h>
+ #include <nan-high-order-bit.h>
++#include <libm-alias-double.h>
+ #include <stdint.h>
+
+ int
+-totalordermag (double x, double y)
++__totalordermag (double x, double y)
+ {
+ uint64_t ix, iy;
+ EXTRACT_WORDS64 (ix, x);
+@@ -42,6 +43,4 @@ totalordermag (double x, double y)
+ #endif
+ return ix <= iy;
+ }
+-#ifdef NO_LONG_DOUBLE
+-weak_alias (totalordermag, totalordermagl)
+-#endif
++libm_alias_double (__totalordermag, totalordermag)
+diff -purN glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c
+--- glibc-org/sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c 2017-10-22 17:02:23.598967253 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+
+ double
+@@ -49,9 +50,5 @@ __trunc (double x)
+ return x;
+ }
+ #ifndef __trunc
+-weak_alias (__trunc, trunc)
+-# ifdef NO_LONG_DOUBLE
+-strong_alias (__trunc, __truncl)
+-weak_alias (__trunc, truncl)
+-# endif
++libm_alias_double (__trunc, trunc)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/float128/float128_private.h glibc-2.26/sysdeps/ieee754/float128/float128_private.h
+--- glibc-org/sysdeps/ieee754/float128/float128_private.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/float128_private.h 2017-10-22 17:02:23.598967253 +0000
+@@ -116,6 +116,12 @@
+ #define M_SQRT1_2l M_SQRT1_2f128
+
+
++#include <libm-alias-ldouble.h>
++#include <libm-alias-float128.h>
++#undef libm_alias_ldouble_r
++#define libm_alias_ldouble_r(from, to, r) libm_alias_float128_r (from, to, r)
++
++
+ /* IEEE function renames. */
+ #define __ieee754_acoshl __ieee754_acoshf128
+ #define __ieee754_acosl __ieee754_acosf128
+@@ -199,6 +205,7 @@
+ #define __fpclassifyl __fpclassifyf128
+ #define __frexpl __frexpf128
+ #define __gammal_r_finite __gammaf128_r_finite
++#define __getpayloadl __getpayloadf128
+ #define __isinfl __isinff128
+ #define __isnanl __isnanf128
+ #define __issignalingl __issignalingf128
+@@ -217,6 +224,7 @@
+ #define __nextupl __nextupf128
+ #define __remquol __remquof128
+ #define __rintl __rintf128
++#define __roundevenl __roundevenf128
+ #define __roundl __roundf128
+ #define __scalblnl __scalblnf128
+ #define __scalbnl __scalbnf128
+@@ -226,6 +234,8 @@
+ #define __sqrtl __sqrtf128
+ #define __tanhl __tanhf128
+ #define __tanl __tanf128
++#define __totalorderl __totalorderf128
++#define __totalordermagl __totalordermagf128
+ #define __truncl __truncf128
+ #define __x2y2m1l __x2y2m1f128
+
+diff -purN glibc-org/sysdeps/ieee754/float128/s_fromfpf128.c glibc-2.26/sysdeps/ieee754/float128/s_fromfpf128.c
+--- glibc-org/sysdeps/ieee754/float128/s_fromfpf128.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/s_fromfpf128.c 2017-10-22 17:02:23.598967253 +0000
+@@ -1,5 +1,6 @@
+ #define UNSIGNED 0
+ #define INEXACT 0
+-#define FUNC fromfpf128
++#define FUNC __fromfpf128
+ #include <float128_private.h>
+ #include "../ldbl-128/s_fromfpl_main.c"
++weak_alias (__fromfpf128, fromfpf128)
+diff -purN glibc-org/sysdeps/ieee754/float128/s_fromfpxf128.c glibc-2.26/sysdeps/ieee754/float128/s_fromfpxf128.c
+--- glibc-org/sysdeps/ieee754/float128/s_fromfpxf128.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/s_fromfpxf128.c 2017-10-22 17:02:23.598967253 +0000
+@@ -1,5 +1,6 @@
+ #define UNSIGNED 0
+ #define INEXACT 1
+-#define FUNC fromfpxf128
++#define FUNC __fromfpxf128
+ #include <float128_private.h>
+ #include "../ldbl-128/s_fromfpl_main.c"
++weak_alias (__fromfpxf128, fromfpxf128)
+diff -purN glibc-org/sysdeps/ieee754/float128/s_setpayloadf128.c glibc-2.26/sysdeps/ieee754/float128/s_setpayloadf128.c
+--- glibc-org/sysdeps/ieee754/float128/s_setpayloadf128.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/s_setpayloadf128.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,4 +1,5 @@
+ #include <float128_private.h>
+ #define SIG 0
+-#define FUNC setpayloadf128
++#define FUNC __setpayloadf128
+ #include "../ldbl-128/s_setpayloadl_main.c"
++weak_alias (__setpayloadf128, setpayloadf128)
+diff -purN glibc-org/sysdeps/ieee754/float128/s_setpayloadsigf128.c glibc-2.26/sysdeps/ieee754/float128/s_setpayloadsigf128.c
+--- glibc-org/sysdeps/ieee754/float128/s_setpayloadsigf128.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/s_setpayloadsigf128.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,4 +1,5 @@
+ #include <float128_private.h>
+ #define SIG 1
+-#define FUNC setpayloadsigf128
++#define FUNC __setpayloadsigf128
+ #include "../ldbl-128/s_setpayloadl_main.c"
++weak_alias (__setpayloadsigf128, setpayloadsigf128)
+diff -purN glibc-org/sysdeps/ieee754/float128/s_ufromfpf128.c glibc-2.26/sysdeps/ieee754/float128/s_ufromfpf128.c
+--- glibc-org/sysdeps/ieee754/float128/s_ufromfpf128.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/s_ufromfpf128.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,5 +1,6 @@
+ #define UNSIGNED 1
+ #define INEXACT 0
+-#define FUNC ufromfpf128
++#define FUNC __ufromfpf128
+ #include <float128_private.h>
+ #include "../ldbl-128/s_fromfpl_main.c"
++weak_alias (__ufromfpf128, ufromfpf128)
+diff -purN glibc-org/sysdeps/ieee754/float128/s_ufromfpxf128.c glibc-2.26/sysdeps/ieee754/float128/s_ufromfpxf128.c
+--- glibc-org/sysdeps/ieee754/float128/s_ufromfpxf128.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/s_ufromfpxf128.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,5 +1,6 @@
+ #define UNSIGNED 1
+ #define INEXACT 1
+-#define FUNC ufromfpxf128
++#define FUNC __ufromfpxf128
+ #include <float128_private.h>
+ #include "../ldbl-128/s_fromfpl_main.c"
++weak_alias (__ufromfpxf128, ufromfpxf128)
+diff -purN glibc-org/sysdeps/ieee754/float128/Versions glibc-2.26/sysdeps/ieee754/float128/Versions
+--- glibc-org/sysdeps/ieee754/float128/Versions 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/Versions 2017-10-22 17:02:23.598967253 +0000
+@@ -6,11 +6,6 @@ libc {
+ FLOAT128_VERSION {
+ __strtof128_internal;
+ __wcstof128_internal;
+- strfromf128;
+- strtof128;
+- strtof128_l;
+- wcstof128;
+- wcstof128_l;
+ }
+ GLIBC_PRIVATE {
+ # For __nanf128.
+@@ -52,109 +47,5 @@ libm {
+ __y0f128_finite;
+ __y1f128_finite;
+ __ynf128_finite;
+- acosf128;
+- acoshf128;
+- asinf128;
+- asinhf128;
+- atan2f128;
+- atanf128;
+- atanhf128;
+- cabsf128;
+- cacosf128;
+- cacoshf128;
+- canonicalizef128;
+- cargf128;
+- casinf128;
+- casinhf128;
+- catanf128;
+- catanhf128;
+- cbrtf128;
+- ccosf128;
+- ccoshf128;
+- ceilf128;
+- cexpf128;
+- cimagf128;
+- clog10f128;
+- clogf128;
+- conjf128;
+- copysignf128;
+- cosf128;
+- coshf128;
+- cpowf128;
+- cprojf128;
+- crealf128;
+- csinf128;
+- csinhf128;
+- csqrtf128;
+- ctanf128;
+- ctanhf128;
+- erfcf128;
+- erff128;
+- exp10f128;
+- exp2f128;
+- expf128;
+- expm1f128;
+- fabsf128;
+- fdimf128;
+- floorf128;
+- fmaf128;
+- fmaxf128;
+- fmaxmagf128;
+- fminf128;
+- fminmagf128;
+- fmodf128;
+- frexpf128;
+- fromfpf128;
+- fromfpxf128;
+- getpayloadf128;
+- hypotf128;
+- ilogbf128;
+- j0f128;
+- j1f128;
+- jnf128;
+- ldexpf128;
+- lgammaf128;
+- lgammaf128_r;
+- llogbf128;
+- llrintf128;
+- llroundf128;
+- log10f128;
+- log1pf128;
+- log2f128;
+- logbf128;
+- logf128;
+- lrintf128;
+- lroundf128;
+- modff128;
+- nanf128;
+- nearbyintf128;
+- nextafterf128;
+- nextdownf128;
+- nextupf128;
+- powf128;
+- remainderf128;
+- remquof128;
+- rintf128;
+- roundevenf128;
+- roundf128;
+- scalblnf128;
+- scalbnf128;
+- setpayloadf128;
+- setpayloadsigf128;
+- sincosf128;
+- sinf128;
+- sinhf128;
+- sqrtf128;
+- tanf128;
+- tanhf128;
+- tgammaf128;
+- totalorderf128;
+- totalordermagf128;
+- truncf128;
+- ufromfpf128;
+- ufromfpxf128;
+- y0f128;
+- y1f128;
+- ynf128;
+ }
+ }
+diff -purN glibc-org/sysdeps/ieee754/float128/wcstof128.c glibc-2.26/sysdeps/ieee754/float128/wcstof128.c
+--- glibc-org/sysdeps/ieee754/float128/wcstof128.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/wcstof128.c 2017-10-22 17:02:23.599967253 +0000
+@@ -24,7 +24,4 @@
+ /* Bring in _Float128 typedef if needed. */
+ #include <bits/floatn.h>
+
+-extern _Float128 ____wcstof128_l_internal (const wchar_t *, wchar_t **, int,
+- locale_t);
+-
+ #include "strtof128.c"
+diff -purN glibc-org/sysdeps/ieee754/float128/wcstof128_l.c glibc-2.26/sysdeps/ieee754/float128/wcstof128_l.c
+--- glibc-org/sysdeps/ieee754/float128/wcstof128_l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/float128/wcstof128_l.c 2017-10-22 17:02:23.599967253 +0000
+@@ -24,7 +24,4 @@
+
+ #include <bits/floatn.h>
+
+-extern _Float128 ____wcstof128_l_internal (const wchar_t *, wchar_t **, int,
+- locale_t);
+-
+ #include "strtof128_l.c"
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_atan2f.c glibc-2.26/sysdeps/ieee754/flt-32/e_atan2f.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_atan2f.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_atan2f.c 2017-10-22 17:02:23.599967253 +0000
+@@ -81,7 +81,7 @@ __ieee754_atan2f (float y, float x)
+ switch (m) {
+ case 0: return z ; /* atan(+,+) */
+ case 1: {
+- u_int32_t zh;
++ uint32_t zh;
+ GET_FLOAT_WORD(zh,z);
+ SET_FLOAT_WORD(z,zh ^ 0x80000000);
+ }
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_exp2f.c glibc-2.26/sysdeps/ieee754/flt-32/e_exp2f.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_exp2f.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_exp2f.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,7 +1,6 @@
+-/* Single-precision floating point 2^x.
+- Copyright (C) 1997-2017 Free Software Foundation, Inc.
++/* Single-precision 2^x function.
++ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+- Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+@@ -17,116 +16,80 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+-/* The basic design here is from
+- Shmuel Gal and Boris Bachelis, "An Accurate Elementary Mathematical
+- Library for the IEEE Floating Point Standard", ACM Trans. Math. Soft.,
+- 17 (1), March 1991, pp. 26-45.
+- It has been slightly modified to compute 2^x instead of e^x, and for
+- single-precision.
+- */
+-#ifndef _GNU_SOURCE
+-# define _GNU_SOURCE
+-#endif
+-#include <stdlib.h>
+-#include <float.h>
+-#include <ieee754.h>
+ #include <math.h>
+-#include <fenv.h>
+-#include <inttypes.h>
+-#include <math_private.h>
+-
+-#include "t_exp2f.h"
++#include <stdint.h>
++#include <shlib-compat.h>
++#include <libm-alias-float.h>
++#include "math_config.h"
++
++/*
++EXP2F_TABLE_BITS = 5
++EXP2F_POLY_ORDER = 3
++
++ULP error: 0.502 (nearest rounding.)
++Relative error: 1.69 * 2^-34 in [-1/64, 1/64] (before rounding.)
++Wrong count: 168353 (all nearest rounding wrong results with fma.)
++Non-nearest ULP error: 1 (rounded ULP error)
++*/
++
++#define N (1 << EXP2F_TABLE_BITS)
++#define T __exp2f_data.tab
++#define C __exp2f_data.poly
++#define SHIFT __exp2f_data.shift_scaled
+
+-static const float TWOM100 = 7.88860905e-31;
+-static const float TWO127 = 1.7014118346e+38;
++static inline uint32_t
++top12 (float x)
++{
++ return asuint (x) >> 20;
++}
+
+ float
+-__ieee754_exp2f (float x)
++__exp2f (float x)
+ {
+- static const float himark = (float) FLT_MAX_EXP;
+- static const float lomark = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
+-
+- /* Check for usual case. */
+- if (isless (x, himark) && isgreaterequal (x, lomark))
++ uint32_t abstop;
++ uint64_t ki, t;
++ /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */
++ double_t kd, xd, z, r, r2, y, s;
++
++ xd = (double_t) x;
++ abstop = top12 (x) & 0x7ff;
++ if (__glibc_unlikely (abstop >= top12 (128.0f)))
+ {
+- static const float THREEp14 = 49152.0;
+- int tval, unsafe;
+- float rx, x22, result;
+- union ieee754_float ex2_u, scale_u;
+-
+- if (fabsf (x) < FLT_EPSILON / 4.0f)
+- return 1.0f + x;
+-
+- {
+- SET_RESTORE_ROUND_NOEXF (FE_TONEAREST);
+-
+- /* 1. Argument reduction.
+- Choose integers ex, -128 <= t < 128, and some real
+- -1/512 <= x1 <= 1/512 so that
+- x = ex + t/512 + x1.
+-
+- First, calculate rx = ex + t/256. */
+- rx = x + THREEp14;
+- rx -= THREEp14;
+- x -= rx; /* Compute x=x1. */
+- /* Compute tval = (ex*256 + t)+128.
+- Now, t = (tval mod 256)-128 and ex=tval/256 [that's mod, NOT %;
+- and /-round-to-nearest not the usual c integer /]. */
+- tval = (int) (rx * 256.0f + 128.0f);
+-
+- /* 2. Adjust for accurate table entry.
+- Find e so that
+- x = ex + t/256 + e + x2
+- where -7e-4 < e < 7e-4, and
+- (float)(2^(t/256+e))
+- is accurate to one part in 2^-64. */
+-
+- /* 'tval & 255' is the same as 'tval%256' except that it's always
+- positive.
+- Compute x = x2. */
+- x -= __exp2f_deltatable[tval & 255];
+-
+- /* 3. Compute ex2 = 2^(t/255+e+ex). */
+- ex2_u.f = __exp2f_atable[tval & 255];
+- tval >>= 8;
+- /* x2 is an integer multiple of 2^-30; avoid intermediate
+- underflow from the calculation of x22 * x. */
+- unsafe = abs(tval) >= -FLT_MIN_EXP - 32;
+- ex2_u.ieee.exponent += tval >> unsafe;
+- scale_u.f = 1.0;
+- scale_u.ieee.exponent += tval - (tval >> unsafe);
+-
+- /* 4. Approximate 2^x2 - 1, using a second-degree polynomial,
+- with maximum error in [-2^-9 - 2^-14, 2^-9 + 2^-14]
+- less than 1.3e-10. */
+-
+- x22 = (.24022656679f * x + .69314736128f) * ex2_u.f;
+- }
+-
+- /* 5. Return (2^x2-1) * 2^(t/512+e+ex) + 2^(t/512+e+ex). */
+- result = x22 * x + ex2_u.f;
+-
+- if (!unsafe)
+- return result;
+- else
+- {
+- result *= scale_u.f;
+- math_check_force_underflow_nonneg (result);
+- return result;
+- }
+- }
+- /* Exceptional cases: */
+- else if (isless (x, himark))
+- {
+- if (isinf (x))
+- /* e^-inf == 0, with no error. */
+- return 0;
+- else
+- /* Underflow */
+- return TWOM100 * TWOM100;
++ /* |x| >= 128 or x is nan. */
++ if (asuint (x) == asuint (-INFINITY))
++ return 0.0f;
++ if (abstop >= top12 (INFINITY))
++ return x + x;
++ if (x > 0.0f)
++ return __math_oflowf (0);
++ if (x <= -150.0f)
++ return __math_uflowf (0);
++#if WANT_ERRNO_UFLOW
++ if (x < -149.0f)
++ return __math_may_uflowf (0);
++#endif
+ }
+- else
+- /* Return x, if x is a NaN or Inf; or overflow, otherwise. */
+- return TWO127*x;
++
++ /* x = k/N + r with r in [-1/(2N), 1/(2N)] and int k. */
++ kd = math_narrow_eval ((double) (xd + SHIFT)); /* Needs to be double. */
++ ki = asuint64 (kd);
++ kd -= SHIFT; /* k/N for int k. */
++ r = xd - kd;
++
++ /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */
++ t = T[ki % N];
++ t += ki << (52 - EXP2F_TABLE_BITS);
++ s = asdouble (t);
++ z = C[0] * r + C[1];
++ r2 = r * r;
++ y = C[2] * r + 1;
++ y = z * r2 + y;
++ y = y * s;
++ return (float) y;
+ }
+-strong_alias (__ieee754_exp2f, __exp2f_finite)
++#ifndef __exp2f
++strong_alias (__exp2f, __ieee754_exp2f)
++strong_alias (__exp2f, __exp2f_finite)
++versioned_symbol (libm, __exp2f, exp2f, GLIBC_2_27);
++libm_alias_float_other (__exp2, exp2)
++#endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_exp2f_data.c glibc-2.26/sysdeps/ieee754/flt-32/e_exp2f_data.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_exp2f_data.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_exp2f_data.c 2017-10-22 17:02:23.599967253 +0000
+@@ -0,0 +1,44 @@
++/* Shared data between expf, exp2f and powf.
++ Copyright (C) 2017 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_config.h"
++
++#define N (1 << EXP2F_TABLE_BITS)
++
++const struct exp2f_data __exp2f_data = {
++ /* tab[i] = uint(2^(i/N)) - (i << 52-BITS)
++ used for computing 2^(k/N) for an int |k| < 150 N as
++ double(tab[k%N] + (k << 52-BITS)) */
++ .tab = {
++0x3ff0000000000000, 0x3fefd9b0d3158574, 0x3fefb5586cf9890f, 0x3fef9301d0125b51,
++0x3fef72b83c7d517b, 0x3fef54873168b9aa, 0x3fef387a6e756238, 0x3fef1e9df51fdee1,
++0x3fef06fe0a31b715, 0x3feef1a7373aa9cb, 0x3feedea64c123422, 0x3feece086061892d,
++0x3feebfdad5362a27, 0x3feeb42b569d4f82, 0x3feeab07dd485429, 0x3feea47eb03a5585,
++0x3feea09e667f3bcd, 0x3fee9f75e8ec5f74, 0x3feea11473eb0187, 0x3feea589994cce13,
++0x3feeace5422aa0db, 0x3feeb737b0cdc5e5, 0x3feec49182a3f090, 0x3feed503b23e255d,
++0x3feee89f995ad3ad, 0x3feeff76f2fb5e47, 0x3fef199bdd85529c, 0x3fef3720dcef9069,
++0x3fef5818dcfba487, 0x3fef7c97337b9b5f, 0x3fefa4afa2a490da, 0x3fefd0765b6e4540,
++ },
++ .shift_scaled = 0x1.8p+52 / N,
++ .poly = { 0x1.c6af84b912394p-5, 0x1.ebfce50fac4f3p-3, 0x1.62e42ff0c52d6p-1 },
++ .shift = 0x1.8p+52,
++ .invln2_scaled = 0x1.71547652b82fep+0 * N,
++ .poly_scaled = {
++0x1.c6af84b912394p-5/N/N/N, 0x1.ebfce50fac4f3p-3/N/N, 0x1.62e42ff0c52d6p-1/N
++ },
++};
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_expf.c glibc-2.26/sysdeps/ieee754/flt-32/e_expf.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_expf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_expf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,7 +1,6 @@
+-/* Single-precision floating point e^x.
+- Copyright (C) 1997-2017 Free Software Foundation, Inc.
++/* Single-precision e^x function.
++ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+- Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+@@ -17,117 +16,101 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+-/* How this works:
++#ifdef __expf
++# undef libm_hidden_proto
++# define libm_hidden_proto(ignored)
++#endif
+
+- The input value, x, is written as
+-
+- x = n * ln(2) + t/512 + delta[t] + x;
+-
+- where:
+- - n is an integer, 127 >= n >= -150;
+- - t is an integer, 177 >= t >= -177
+- - delta is based on a table entry, delta[t] < 2^-28
+- - x is whatever is left, |x| < 2^-10
+-
+- Then e^x is approximated as
+-
+- e^x = 2^n ( e^(t/512 + delta[t])
+- + ( e^(t/512 + delta[t])
+- * ( p(x + delta[t] + n * ln(2)) - delta ) ) )
+-
+- where
+- - p(x) is a polynomial approximating e(x)-1;
+- - e^(t/512 + delta[t]) is obtained from a table.
+-
+- The table used is the same one as for the double precision version;
+- since we have the table, we might as well use it.
+-
+- It turns out to be faster to do calculations in double precision than
+- to perform an 'accurate table method' expf, because of the range reduction
+- overhead (compare exp2f).
+- */
+-#include <float.h>
+-#include <ieee754.h>
+ #include <math.h>
+-#include <fenv.h>
+-#include <inttypes.h>
+-#include <math_private.h>
+-
+-extern const float __exp_deltatable[178];
+-extern const double __exp_atable[355] /* __attribute__((mode(DF))) */;
++#include <stdint.h>
++#include <shlib-compat.h>
++#include <libm-alias-float.h>
++#include "math_config.h"
++
++/*
++EXP2F_TABLE_BITS = 5
++EXP2F_POLY_ORDER = 3
++
++ULP error: 0.502 (nearest rounding.)
++Relative error: 1.69 * 2^-34 in [-ln2/64, ln2/64] (before rounding.)
++Wrong count: 170635 (all nearest rounding wrong results with fma.)
++Non-nearest ULP error: 1 (rounded ULP error)
++*/
++
++#define N (1 << EXP2F_TABLE_BITS)
++#define InvLn2N __exp2f_data.invln2_scaled
++#define T __exp2f_data.tab
++#define C __exp2f_data.poly_scaled
+
+-static const float TWOM100 = 7.88860905e-31;
+-static const float TWO127 = 1.7014118346e+38;
++static inline uint32_t
++top12 (float x)
++{
++ return asuint (x) >> 20;
++}
+
+ float
+-__ieee754_expf (float x)
++__expf (float x)
+ {
+- static const float himark = 88.72283935546875;
+- static const float lomark = -103.972084045410;
+- /* Check for usual case. */
+- if (isless (x, himark) && isgreater (x, lomark))
+- {
+- static const float THREEp42 = 13194139533312.0;
+- static const float THREEp22 = 12582912.0;
+- /* 1/ln(2). */
+-#undef M_1_LN2
+- static const float M_1_LN2 = 1.44269502163f;
+- /* ln(2) */
+-#undef M_LN2
+- static const double M_LN2 = .6931471805599452862;
+-
+- int tval;
+- double x22, t, result, dx;
+- float n, delta;
+- union ieee754_double ex2_u;
+-
+- {
+- SET_RESTORE_ROUND_NOEXF (FE_TONEAREST);
+-
+- /* Calculate n. */
+- n = x * M_1_LN2 + THREEp22;
+- n -= THREEp22;
+- dx = x - n*M_LN2;
+-
+- /* Calculate t/512. */
+- t = dx + THREEp42;
+- t -= THREEp42;
+- dx -= t;
+-
+- /* Compute tval = t. */
+- tval = (int) (t * 512.0);
+-
+- if (t >= 0)
+- delta = - __exp_deltatable[tval];
+- else
+- delta = __exp_deltatable[-tval];
+-
+- /* Compute ex2 = 2^n e^(t/512+delta[t]). */
+- ex2_u.d = __exp_atable[tval+177];
+- ex2_u.ieee.exponent += (int) n;
+-
+- /* Approximate e^(dx+delta) - 1, using a second-degree polynomial,
+- with maximum error in [-2^-10-2^-28,2^-10+2^-28]
+- less than 5e-11. */
+- x22 = (0.5000000496709180453 * dx + 1.0000001192102037084) * dx + delta;
+- }
+-
+- /* Return result. */
+- result = x22 * ex2_u.d + ex2_u.d;
+- return (float) result;
+- }
+- /* Exceptional cases: */
+- else if (isless (x, himark))
++ uint32_t abstop;
++ uint64_t ki, t;
++ /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */
++ double_t kd, xd, z, r, r2, y, s;
++
++ xd = (double_t) x;
++ abstop = top12 (x) & 0x7ff;
++ if (__glibc_unlikely (abstop >= top12 (88.0f)))
+ {
+- if (isinf (x))
+- /* e^-inf == 0, with no error. */
+- return 0;
+- else
+- /* Underflow */
+- return TWOM100 * TWOM100;
++ /* |x| >= 88 or x is nan. */
++ if (asuint (x) == asuint (-INFINITY))
++ return 0.0f;
++ if (abstop >= top12 (INFINITY))
++ return x + x;
++ if (x > 0x1.62e42ep6f) /* x > log(0x1p128) ~= 88.72 */
++ return __math_oflowf (0);
++ if (x < -0x1.9fe368p6f) /* x < log(0x1p-150) ~= -103.97 */
++ return __math_uflowf (0);
++#if WANT_ERRNO_UFLOW
++ if (x < -0x1.9d1d9ep6f) /* x < log(0x1p-149) ~= -103.28 */
++ return __math_may_uflowf (0);
++#endif
+ }
+- else
+- /* Return x, if x is a NaN or Inf; or overflow, otherwise. */
+- return TWO127*x;
++
++ /* x*N/Ln2 = k + r with r in [-1/2, 1/2] and int k. */
++ z = InvLn2N * xd;
++
++ /* Round and convert z to int, the result is in [-150*N, 128*N] and
++ ideally ties-to-even rule is used, otherwise the magnitude of r
++ can be bigger which gives larger approximation error. */
++#if TOINT_INTRINSICS
++ kd = roundtoint (z);
++ ki = converttoint (z);
++#elif TOINT_RINT
++ kd = rint (z);
++ ki = (long) kd;
++#elif TOINT_SHIFT
++# define SHIFT __exp2f_data.shift
++ kd = math_narrow_eval ((double) (z + SHIFT)); /* Needs to be double. */
++ ki = asuint64 (kd);
++ kd -= SHIFT;
++#endif
++ r = z - kd;
++
++ /* exp(x) = 2^(k/N) * 2^(r/N) ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */
++ t = T[ki % N];
++ t += ki << (52 - EXP2F_TABLE_BITS);
++ s = asdouble (t);
++ z = C[0] * r + C[1];
++ r2 = r * r;
++ y = C[2] * r + 1;
++ y = z * r2 + y;
++ y = y * s;
++ return (float) y;
+ }
+-strong_alias (__ieee754_expf, __expf_finite)
++
++#ifndef __expf
++hidden_def (__expf)
++strong_alias (__expf, __ieee754_expf)
++strong_alias (__expf, __expf_finite)
++versioned_symbol (libm, __expf, expf, GLIBC_2_27);
++libm_alias_float_other (__exp, exp)
++#endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_fmodf.c glibc-2.26/sysdeps/ieee754/flt-32/e_fmodf.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_fmodf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_fmodf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -41,7 +41,7 @@ __ieee754_fmodf (float x, float y)
+ return (x*y)/(x*y);
+ if(hx<hy) return x; /* |x|<|y| return x */
+ if(hx==hy)
+- return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/
++ return Zero[(uint32_t)sx>>31]; /* |x|=|y| return x*0*/
+
+ /* determine ix = ilogb(x) */
+ if(hx<0x00800000) { /* subnormal x */
+@@ -74,7 +74,7 @@ __ieee754_fmodf (float x, float y)
+ if(hz<0){hx = hx+hx;}
+ else {
+ if(hz==0) /* return sign(x)*0 */
+- return Zero[(u_int32_t)sx>>31];
++ return Zero[(uint32_t)sx>>31];
+ hx = hz+hz;
+ }
+ }
+@@ -83,7 +83,7 @@ __ieee754_fmodf (float x, float y)
+
+ /* convert back to floating value and restore the sign */
+ if(hx==0) /* return sign(x)*0 */
+- return Zero[(u_int32_t)sx>>31];
++ return Zero[(uint32_t)sx>>31];
+ while(hx<0x00800000) { /* normalize x */
+ hx = hx+hx;
+ iy -= 1;
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_gammaf_r.c glibc-2.26/sysdeps/ieee754/flt-32/e_gammaf_r.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_gammaf_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_gammaf_r.c 2017-10-22 17:02:23.599967253 +0000
+@@ -118,7 +118,7 @@ __ieee754_gammaf_r (float x, int *signga
+ return 1.0 / x;
+ }
+ if (__builtin_expect (hx < 0, 0)
+- && (u_int32_t) hx < 0xff800000 && __rintf (x) == x)
++ && (uint32_t) hx < 0xff800000 && __rintf (x) == x)
+ {
+ /* Return value for integer x < 0 is NaN with invalid exception. */
+ *signgamp = 0;
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_jnf.c glibc-2.26/sysdeps/ieee754/flt-32/e_jnf.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_jnf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_jnf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -186,7 +186,7 @@ __ieee754_ynf(int n, float x)
+ float ret;
+ {
+ int32_t i,hx,ix;
+- u_int32_t ib;
++ uint32_t ib;
+ int32_t sign;
+ float a, b, temp;
+
+@@ -194,15 +194,15 @@ __ieee754_ynf(int n, float x)
+ ix = 0x7fffffff&hx;
+ /* if Y(n,NaN) is NaN */
+ if(__builtin_expect(ix>0x7f800000, 0)) return x+x;
+- if(__builtin_expect(ix==0, 0))
+- return -HUGE_VALF+x; /* -inf and overflow exception. */
+- if(__builtin_expect(hx<0, 0)) return zero/(zero*x);
+ sign = 1;
+ if(n<0){
+ n = -n;
+ sign = 1 - ((n&1)<<1);
+ }
+ if(n==0) return(__ieee754_y0f(x));
++ if(__builtin_expect(ix==0, 0))
++ return -sign/zero;
++ if(__builtin_expect(hx<0, 0)) return zero/(zero*x);
+ SET_RESTORE_ROUNDF (FE_TONEAREST);
+ if(n==1) {
+ ret = sign*__ieee754_y1f(x);
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_lgammaf_r.c glibc-2.26/sysdeps/ieee754/flt-32/e_lgammaf_r.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_lgammaf_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_lgammaf_r.c 2017-10-22 17:02:23.599967253 +0000
+@@ -160,7 +160,7 @@ __ieee754_lgammaf_r(float x, int *signga
+ }
+ if(hx<0) {
+ if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */
+- return __fabsf (x)/zero;
++ return fabsf (x)/zero;
+ if (ix > 0x40000000 /* X < 2.0f. */
+ && ix < 0x41700000 /* X > -15.0f. */)
+ return __lgamma_negf (x, signgamp);
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_log10f.c glibc-2.26/sysdeps/ieee754/flt-32/e_log10f.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_log10f.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_log10f.c 2017-10-22 17:02:23.599967253 +0000
+@@ -34,7 +34,7 @@ __ieee754_log10f(float x)
+ k=0;
+ if (hx < 0x00800000) { /* x < 2**-126 */
+ if (__builtin_expect((hx&0x7fffffff)==0, 0))
+- return -two25/__fabsf (x); /* log(+-0)=-inf */
++ return -two25/fabsf (x); /* log(+-0)=-inf */
+ if (__builtin_expect(hx<0, 0))
+ return (x-x)/(x-x); /* log(-#) = NaN */
+ k -= 25; x *= two25; /* subnormal number, scale up x */
+@@ -42,7 +42,7 @@ __ieee754_log10f(float x)
+ }
+ if (__builtin_expect(hx >= 0x7f800000, 0)) return x+x;
+ k += (hx>>23)-127;
+- i = ((u_int32_t)k&0x80000000)>>31;
++ i = ((uint32_t)k&0x80000000)>>31;
+ hx = (hx&0x007fffff)|((0x7f-i)<<23);
+ y = (float)(k+i);
+ if (FIX_INT_FP_CONVERT_ZERO && y == 0.0f)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_log2f.c glibc-2.26/sysdeps/ieee754/flt-32/e_log2f.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_log2f.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_log2f.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,86 +1,95 @@
+-/* e_logf.c -- float version of e_log.c.
+- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+- * adapted for log2 by Ulrich Drepper <drepper@cygnus.com>
+- */
+-
+-/*
+- * ====================================================
+- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+- *
+- * Developed at SunPro, a Sun Microsystems, Inc. business.
+- * Permission to use, copy, modify, and distribute this
+- * software is freely granted, provided that this notice
+- * is preserved.
+- * ====================================================
+- */
+-
++/* Single-precision log2 function.
++ Copyright (C) 2017 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 <fix-int-fp-convert-zero.h>
++#include <stdint.h>
++#include <shlib-compat.h>
++#include <libm-alias-float.h>
++#include "math_config.h"
+
+-static const float
+-ln2 = 0.69314718055994530942,
+-two25 = 3.355443200e+07, /* 0x4c000000 */
+-Lg1 = 6.6666668653e-01, /* 3F2AAAAB */
+-Lg2 = 4.0000000596e-01, /* 3ECCCCCD */
+-Lg3 = 2.8571429849e-01, /* 3E924925 */
+-Lg4 = 2.2222198546e-01, /* 3E638E29 */
+-Lg5 = 1.8183572590e-01, /* 3E3A3325 */
+-Lg6 = 1.5313838422e-01, /* 3E1CD04F */
+-Lg7 = 1.4798198640e-01; /* 3E178897 */
++/*
++LOG2F_TABLE_BITS = 4
++LOG2F_POLY_ORDER = 4
+
+-static const float zero = 0.0;
++ULP error: 0.752 (nearest rounding.)
++Relative error: 1.9 * 2^-26 (before rounding.)
++*/
++
++#define N (1 << LOG2F_TABLE_BITS)
++#define T __log2f_data.tab
++#define A __log2f_data.poly
++#define OFF 0x3f330000
+
+ float
+-__ieee754_log2f(float x)
++__log2f (float x)
+ {
+- float hfsq,f,s,z,R,w,t1,t2,dk;
+- int32_t k,ix,i,j;
+-
+- GET_FLOAT_WORD(ix,x);
+-
+- k=0;
+- if (ix < 0x00800000) { /* x < 2**-126 */
+- if (__builtin_expect((ix&0x7fffffff)==0, 0))
+- return -two25/__fabsf (x); /* log(+-0)=-inf */
+- if (__builtin_expect(ix<0, 0))
+- return (x-x)/(x-x); /* log(-#) = NaN */
+- k -= 25; x *= two25; /* subnormal number, scale up x */
+- GET_FLOAT_WORD(ix,x);
+- }
+- if (__builtin_expect(ix >= 0x7f800000, 0)) return x+x;
+- k += (ix>>23)-127;
+- ix &= 0x007fffff;
+- i = (ix+(0x95f64<<3))&0x800000;
+- SET_FLOAT_WORD(x,ix|(i^0x3f800000)); /* normalize x or x/2 */
+- k += (i>>23);
+- dk = (float)k;
+- f = x-(float)1.0;
+- if((0x007fffff&(15+ix))<16) { /* |f| < 2**-20 */
+- if(f==zero)
+- {
+- if (FIX_INT_FP_CONVERT_ZERO && dk == 0.0f)
+- dk = 0.0f;
+- return dk;
+- }
+- R = f*f*((float)0.5-(float)0.33333333333333333*f);
+- return dk-(R-f)/ln2;
+- }
+- s = f/((float)2.0+f);
+- z = s*s;
+- i = ix-(0x6147a<<3);
+- w = z*z;
+- j = (0x6b851<<3)-ix;
+- t1= w*(Lg2+w*(Lg4+w*Lg6));
+- t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
+- i |= j;
+- R = t2+t1;
+- if(i>0) {
+- hfsq=(float)0.5*f*f;
+- return dk-((hfsq-(s*(hfsq+R)))-f)/ln2;
+- } else {
+- return dk-((s*(f-R))-f)/ln2;
+- }
++ /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */
++ double_t z, r, r2, p, y, y0, invc, logc;
++ uint32_t ix, iz, top, tmp;
++ int k, i;
++
++ ix = asuint (x);
++#if WANT_ROUNDING
++ /* Fix sign of zero with downward rounding when x==1. */
++ if (__glibc_unlikely (ix == 0x3f800000))
++ return 0;
++#endif
++ if (__glibc_unlikely (ix - 0x00800000 >= 0x7f800000 - 0x00800000))
++ {
++ /* x < 0x1p-126 or inf or nan. */
++ if (ix * 2 == 0)
++ return __math_divzerof (1);
++ if (ix == 0x7f800000) /* log2(inf) == inf. */
++ return x;
++ if ((ix & 0x80000000) || ix * 2 >= 0xff000000)
++ return __math_invalidf (x);
++ /* x is subnormal, normalize it. */
++ ix = asuint (x * 0x1p23f);
++ ix -= 23 << 23;
++ }
++
++ /* x = 2^k z; where z is in range [OFF,2*OFF] and exact.
++ The range is split into N subintervals.
++ The ith subinterval contains z and c is near its center. */
++ tmp = ix - OFF;
++ i = (tmp >> (23 - LOG2F_TABLE_BITS)) % N;
++ top = tmp & 0xff800000;
++ iz = ix - top;
++ k = (int32_t) tmp >> 23; /* arithmetic shift */
++ invc = T[i].invc;
++ logc = T[i].logc;
++ z = (double_t) asfloat (iz);
++
++ /* log2(x) = log1p(z/c-1)/ln2 + log2(c) + k */
++ r = z * invc - 1;
++ y0 = logc + (double_t) k;
++
++ /* Pipelined polynomial evaluation to approximate log1p(r)/ln2. */
++ r2 = r * r;
++ y = A[1] * r + A[2];
++ y = A[0] * r2 + y;
++ p = A[3] * r + y0;
++ y = y * r2 + p;
++ return (float) y;
+ }
+-strong_alias (__ieee754_log2f, __log2f_finite)
++#ifndef __log2f
++strong_alias (__log2f, __ieee754_log2f)
++strong_alias (__log2f, __log2f_finite)
++versioned_symbol (libm, __log2f, log2f, GLIBC_2_27);
++libm_alias_float_other (__log2, log2)
++#endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_log2f_data.c glibc-2.26/sysdeps/ieee754/flt-32/e_log2f_data.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_log2f_data.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_log2f_data.c 2017-10-22 17:02:23.599967253 +0000
+@@ -0,0 +1,44 @@
++/* Data definition for log2f.
++ Copyright (C) 2017 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_config.h"
++
++const struct log2f_data __log2f_data = {
++ .tab = {
++ { 0x1.661ec79f8f3bep+0, -0x1.efec65b963019p-2 },
++ { 0x1.571ed4aaf883dp+0, -0x1.b0b6832d4fca4p-2 },
++ { 0x1.49539f0f010bp+0, -0x1.7418b0a1fb77bp-2 },
++ { 0x1.3c995b0b80385p+0, -0x1.39de91a6dcf7bp-2 },
++ { 0x1.30d190c8864a5p+0, -0x1.01d9bf3f2b631p-2 },
++ { 0x1.25e227b0b8eap+0, -0x1.97c1d1b3b7afp-3 },
++ { 0x1.1bb4a4a1a343fp+0, -0x1.2f9e393af3c9fp-3 },
++ { 0x1.12358f08ae5bap+0, -0x1.960cbbf788d5cp-4 },
++ { 0x1.0953f419900a7p+0, -0x1.a6f9db6475fcep-5 },
++ { 0x1p+0, 0x0p+0 },
++ { 0x1.e608cfd9a47acp-1, 0x1.338ca9f24f53dp-4 },
++ { 0x1.ca4b31f026aap-1, 0x1.476a9543891bap-3 },
++ { 0x1.b2036576afce6p-1, 0x1.e840b4ac4e4d2p-3 },
++ { 0x1.9c2d163a1aa2dp-1, 0x1.40645f0c6651cp-2 },
++ { 0x1.886e6037841edp-1, 0x1.88e9c2c1b9ff8p-2 },
++ { 0x1.767dcf5534862p-1, 0x1.ce0a44eb17bccp-2 },
++ },
++ .poly = {
++ -0x1.712b6f70a7e4dp-2, 0x1.ecabf496832ep-2, -0x1.715479ffae3dep-1,
++ 0x1.715475f35c8b8p0,
++ }
++};
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_logf.c glibc-2.26/sysdeps/ieee754/flt-32/e_logf.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_logf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_logf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,85 +1,94 @@
+-/* e_logf.c -- float version of e_log.c.
+- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+- */
+-
+-/*
+- * ====================================================
+- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+- *
+- * Developed at SunPro, a Sun Microsystems, Inc. business.
+- * Permission to use, copy, modify, and distribute this
+- * software is freely granted, provided that this notice
+- * is preserved.
+- * ====================================================
+- */
++/* Single-precision log function.
++ Copyright (C) 2017 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>
++#include <shlib-compat.h>
++#include <libm-alias-float.h>
++#include "math_config.h"
+
+-static const float
+-ln2_hi = 6.9313812256e-01, /* 0x3f317180 */
+-ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */
+-two25 = 3.355443200e+07, /* 0x4c000000 */
+-Lg1 = 6.6666668653e-01, /* 3F2AAAAB */
+-Lg2 = 4.0000000596e-01, /* 3ECCCCCD */
+-Lg3 = 2.8571429849e-01, /* 3E924925 */
+-Lg4 = 2.2222198546e-01, /* 3E638E29 */
+-Lg5 = 1.8183572590e-01, /* 3E3A3325 */
+-Lg6 = 1.5313838422e-01, /* 3E1CD04F */
+-Lg7 = 1.4798198640e-01; /* 3E178897 */
++/*
++LOGF_TABLE_BITS = 4
++LOGF_POLY_ORDER = 4
+
+-static const float zero = 0.0;
++ULP error: 0.818 (nearest rounding.)
++Relative error: 1.957 * 2^-26 (before rounding.)
++*/
++
++#define T __logf_data.tab
++#define A __logf_data.poly
++#define Ln2 __logf_data.ln2
++#define N (1 << LOGF_TABLE_BITS)
++#define OFF 0x3f330000
+
+ float
+-__ieee754_logf(float x)
++__logf (float x)
+ {
+- float hfsq,f,s,z,R,w,t1,t2,dk;
+- int32_t k,ix,i,j;
+-
+- GET_FLOAT_WORD(ix,x);
+-
+- k=0;
+- if (ix < 0x00800000) { /* x < 2**-126 */
+- if (__builtin_expect((ix&0x7fffffff)==0, 0))
+- return -two25/zero; /* log(+-0)=-inf */
+- if (__builtin_expect(ix<0, 0))
+- return (x-x)/(x-x); /* log(-#) = NaN */
+- k -= 25; x *= two25; /* subnormal number, scale up x */
+- GET_FLOAT_WORD(ix,x);
+- }
+- if (__builtin_expect(ix >= 0x7f800000, 0)) return x+x;
+- k += (ix>>23)-127;
+- ix &= 0x007fffff;
+- i = (ix+(0x95f64<<3))&0x800000;
+- SET_FLOAT_WORD(x,ix|(i^0x3f800000)); /* normalize x or x/2 */
+- k += (i>>23);
+- f = x-(float)1.0;
+- if((0x007fffff&(15+ix))<16) { /* |f| < 2**-20 */
+- if(f==zero) {
+- if(k==0) return zero; else {dk=(float)k;
+- return dk*ln2_hi+dk*ln2_lo;}
+- }
+- R = f*f*((float)0.5-(float)0.33333333333333333*f);
+- if(k==0) return f-R; else {dk=(float)k;
+- return dk*ln2_hi-((R-dk*ln2_lo)-f);}
+- }
+- s = f/((float)2.0+f);
+- dk = (float)k;
+- z = s*s;
+- i = ix-(0x6147a<<3);
+- w = z*z;
+- j = (0x6b851<<3)-ix;
+- t1= w*(Lg2+w*(Lg4+w*Lg6));
+- t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
+- i |= j;
+- R = t2+t1;
+- if(i>0) {
+- hfsq=(float)0.5*f*f;
+- if(k==0) return f-(hfsq-s*(hfsq+R)); else
+- return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f);
+- } else {
+- if(k==0) return f-s*(f-R); else
+- return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f);
+- }
++ /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */
++ double_t z, r, r2, y, y0, invc, logc;
++ uint32_t ix, iz, tmp;
++ int k, i;
++
++ ix = asuint (x);
++#if WANT_ROUNDING
++ /* Fix sign of zero with downward rounding when x==1. */
++ if (__glibc_unlikely (ix == 0x3f800000))
++ return 0;
++#endif
++ if (__glibc_unlikely (ix - 0x00800000 >= 0x7f800000 - 0x00800000))
++ {
++ /* x < 0x1p-126 or inf or nan. */
++ if (ix * 2 == 0)
++ return __math_divzerof (1);
++ if (ix == 0x7f800000) /* log(inf) == inf. */
++ return x;
++ if ((ix & 0x80000000) || ix * 2 >= 0xff000000)
++ return __math_invalidf (x);
++ /* x is subnormal, normalize it. */
++ ix = asuint (x * 0x1p23f);
++ ix -= 23 << 23;
++ }
++
++ /* x = 2^k z; where z is in range [OFF,2*OFF] and exact.
++ The range is split into N subintervals.
++ The ith subinterval contains z and c is near its center. */
++ tmp = ix - OFF;
++ i = (tmp >> (23 - LOGF_TABLE_BITS)) % N;
++ k = (int32_t) tmp >> 23; /* arithmetic shift */
++ iz = ix - (tmp & 0x1ff << 23);
++ invc = T[i].invc;
++ logc = T[i].logc;
++ z = (double_t) asfloat (iz);
++
++ /* log(x) = log1p(z/c-1) + log(c) + k*Ln2 */
++ r = z * invc - 1;
++ y0 = logc + (double_t) k * Ln2;
++
++ /* Pipelined polynomial evaluation to approximate log1p(r). */
++ r2 = r * r;
++ y = A[1] * r + A[2];
++ y = A[0] * r2 + y;
++ y = y * r2 + (y0 + r);
++ return (float) y;
+ }
+-strong_alias (__ieee754_logf, __logf_finite)
++#ifndef __logf
++strong_alias (__logf, __ieee754_logf)
++strong_alias (__logf, __logf_finite)
++versioned_symbol (libm, __logf, logf, GLIBC_2_27);
++libm_alias_float_other (__log, log)
++#endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_logf_data.c glibc-2.26/sysdeps/ieee754/flt-32/e_logf_data.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_logf_data.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_logf_data.c 2017-10-22 17:02:23.599967253 +0000
+@@ -0,0 +1,44 @@
++/* Data definition for logf.
++ Copyright (C) 2017 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_config.h"
++
++const struct logf_data __logf_data = {
++ .tab = {
++ { 0x1.661ec79f8f3bep+0, -0x1.57bf7808caadep-2 },
++ { 0x1.571ed4aaf883dp+0, -0x1.2bef0a7c06ddbp-2 },
++ { 0x1.49539f0f010bp+0, -0x1.01eae7f513a67p-2 },
++ { 0x1.3c995b0b80385p+0, -0x1.b31d8a68224e9p-3 },
++ { 0x1.30d190c8864a5p+0, -0x1.6574f0ac07758p-3 },
++ { 0x1.25e227b0b8eap+0, -0x1.1aa2bc79c81p-3 },
++ { 0x1.1bb4a4a1a343fp+0, -0x1.a4e76ce8c0e5ep-4 },
++ { 0x1.12358f08ae5bap+0, -0x1.1973c5a611cccp-4 },
++ { 0x1.0953f419900a7p+0, -0x1.252f438e10c1ep-5 },
++ { 0x1p+0, 0x0p+0 },
++ { 0x1.e608cfd9a47acp-1, 0x1.aa5aa5df25984p-5 },
++ { 0x1.ca4b31f026aap-1, 0x1.c5e53aa362eb4p-4 },
++ { 0x1.b2036576afce6p-1, 0x1.526e57720db08p-3 },
++ { 0x1.9c2d163a1aa2dp-1, 0x1.bc2860d22477p-3 },
++ { 0x1.886e6037841edp-1, 0x1.1058bc8a07ee1p-2 },
++ { 0x1.767dcf5534862p-1, 0x1.4043057b6ee09p-2 },
++ },
++ .ln2 = 0x1.62e42fefa39efp-1,
++ .poly = {
++ -0x1.00ea348b88334p-2, 0x1.5575b0be00b6ap-2, -0x1.ffffef20a4123p-2,
++ }
++};
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_powf.c glibc-2.26/sysdeps/ieee754/flt-32/e_powf.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_powf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_powf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,7 +1,5 @@
+-/* e_powf.c -- float version of e_pow.c.
+- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+- */
+-/* Copyright (C) 2017 Free Software Foundation, Inc.
++/* Single-precision pow function.
++ Copyright (C) 2017 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
+@@ -18,210 +16,209 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+-/*
+- * ====================================================
+- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+- *
+- * Developed at SunPro, a Sun Microsystems, Inc. business.
+- * Permission to use, copy, modify, and distribute this
+- * software is freely granted, provided that this notice
+- * is preserved.
+- * ====================================================
+- */
+-
+ #include <math.h>
+-#include <math_private.h>
++#include <stdint.h>
++#include <shlib-compat.h>
++#include <libm-alias-float.h>
++#include "math_config.h"
+
+-static const float huge = 1.0e+30, tiny = 1.0e-30;
++/*
++POWF_LOG2_POLY_ORDER = 5
++EXP2F_TABLE_BITS = 5
+
+-static const float
+-bp[] = {1.0, 1.5,},
+-zero = 0.0,
+-one = 1.0,
+-two = 2.0,
+-two24 = 16777216.0, /* 0x4b800000 */
+- /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
+-L1 = 6.0000002384e-01, /* 0x3f19999a */
+-L2 = 4.2857143283e-01, /* 0x3edb6db7 */
+-L3 = 3.3333334327e-01, /* 0x3eaaaaab */
+-L4 = 2.7272811532e-01, /* 0x3e8ba305 */
+-L5 = 2.3066075146e-01, /* 0x3e6c3255 */
+-L6 = 2.0697501302e-01, /* 0x3e53f142 */
+-P1 = 1.6666667163e-01, /* 0x3e2aaaab */
+-P2 = -2.7777778450e-03, /* 0xbb360b61 */
+-P3 = 6.6137559770e-05, /* 0x388ab355 */
+-P4 = -1.6533901999e-06, /* 0xb5ddea0e */
+-P5 = 4.1381369442e-08, /* 0x3331bb4c */
+-ovt = 4.2995665694e-08; /* -(128-log2(ovfl+.5ulp)) */
+-
+-static const double
+- dp[] = { 0.0, 0x1.2b803473f7ad1p-1, }, /* log2(1.5) */
+- lg2 = M_LN2,
+- cp = 2.0/3.0/M_LN2,
+- invln2 = 1.0/M_LN2;
++ULP error: 0.82 (~ 0.5 + relerr*2^24)
++relerr: 1.27 * 2^-26 (Relative error ~= 128*Ln2*relerr_log2 + relerr_exp2)
++relerr_log2: 1.83 * 2^-33 (Relative error of logx.)
++relerr_exp2: 1.69 * 2^-34 (Relative error of exp2(ylogx).)
++*/
++
++#define N (1 << POWF_LOG2_TABLE_BITS)
++#define T __powf_log2_data.tab
++#define A __powf_log2_data.poly
++#define OFF 0x3f330000
++
++/* Subnormal input is normalized so ix has negative biased exponent.
++ Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set. */
++static inline double_t
++log2_inline (uint32_t ix)
++{
++ /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */
++ double_t z, r, r2, r4, p, q, y, y0, invc, logc;
++ uint32_t iz, top, tmp;
++ int k, i;
++
++ /* x = 2^k z; where z is in range [OFF,2*OFF] and exact.
++ The range is split into N subintervals.
++ The ith subinterval contains z and c is near its center. */
++ tmp = ix - OFF;
++ i = (tmp >> (23 - POWF_LOG2_TABLE_BITS)) % N;
++ top = tmp & 0xff800000;
++ iz = ix - top;
++ k = (int32_t) top >> (23 - POWF_SCALE_BITS); /* arithmetic shift */
++ invc = T[i].invc;
++ logc = T[i].logc;
++ z = (double_t) asfloat (iz);
++
++ /* log2(x) = log1p(z/c-1)/ln2 + log2(c) + k */
++ r = z * invc - 1;
++ y0 = logc + (double_t) k;
++
++ /* Pipelined polynomial evaluation to approximate log1p(r)/ln2. */
++ r2 = r * r;
++ y = A[0] * r + A[1];
++ p = A[2] * r + A[3];
++ r4 = r2 * r2;
++ q = A[4] * r + y0;
++ q = p * r2 + q;
++ y = y * r4 + q;
++ return y;
++}
+
+-float
+-__ieee754_powf(float x, float y)
++#undef N
++#undef T
++#define N (1 << EXP2F_TABLE_BITS)
++#define T __exp2f_data.tab
++#define SIGN_BIAS (1 << (EXP2F_TABLE_BITS + 11))
++
++/* The output of log2 and thus the input of exp2 is either scaled by N
++ (in case of fast toint intrinsics) or not. The unscaled xd must be
++ in [-1021,1023], sign_bias sets the sign of the result. */
++static inline double_t
++exp2_inline (double_t xd, unsigned long sign_bias)
+ {
+- float z, ax, s;
+- double d1, d2;
+- int32_t i,j,k,yisint,n;
+- int32_t hx,hy,ix,iy;
+-
+- GET_FLOAT_WORD(hy,y);
+- iy = hy&0x7fffffff;
+-
+- /* y==zero: x**0 = 1 */
+- if(iy==0 && !issignaling (x)) return one;
+-
+- /* x==+-1 */
+- if(x == 1.0 && !issignaling (y)) return one;
+- if(x == -1.0 && isinf(y)) return one;
+-
+- GET_FLOAT_WORD(hx,x);
+- ix = hx&0x7fffffff;
+-
+- /* +-NaN return x+y */
+- if(__builtin_expect(ix > 0x7f800000 ||
+- iy > 0x7f800000, 0))
+- return x+y;
+-
+- /* special value of y */
+- if (__builtin_expect(iy==0x7f800000, 0)) { /* y is +-inf */
+- if (ix==0x3f800000)
+- return y - y; /* inf**+-1 is NaN */
+- else if (ix > 0x3f800000)/* (|x|>1)**+-inf = inf,0 */
+- return (hy>=0)? y: zero;
+- else /* (|x|<1)**-,+inf = inf,0 */
+- return (hy<0)?-y: zero;
+- }
+- if(iy==0x3f800000) { /* y is +-1 */
+- if(hy<0) return one/x; else return x;
+- }
+- if(hy==0x40000000) return x*x; /* y is 2 */
+- if(hy==0x3f000000) { /* y is 0.5 */
+- if(__builtin_expect(hx>=0, 1)) /* x >= +0 */
+- return __ieee754_sqrtf(x);
+- }
++ uint64_t ki, ski, t;
++ /* double_t for better performance on targets with FLT_EVAL_METHOD==2. */
++ double_t kd, z, r, r2, y, s;
++
++#if TOINT_INTRINSICS
++# define C __exp2f_data.poly_scaled
++ /* N*x = k + r with r in [-1/2, 1/2] */
++ kd = roundtoint (xd); /* k */
++ ki = converttoint (xd);
++#else
++# define C __exp2f_data.poly
++# define SHIFT __exp2f_data.shift_scaled
++ /* x = k/N + r with r in [-1/(2N), 1/(2N)] */
++ kd = (double) (xd + SHIFT); /* Rounding to double precision is required. */
++ ki = asuint64 (kd);
++ kd -= SHIFT; /* k/N */
++#endif
++ r = xd - kd;
++
++ /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */
++ t = T[ki % N];
++ ski = ki + sign_bias;
++ t += ski << (52 - EXP2F_TABLE_BITS);
++ s = asdouble (t);
++ z = C[0] * r + C[1];
++ r2 = r * r;
++ y = C[2] * r + 1;
++ y = z * r2 + y;
++ y = y * s;
++ return y;
++}
+
+- /* determine if y is an odd int when x < 0
+- * yisint = 0 ... y is not an integer
+- * yisint = 1 ... y is an odd int
+- * yisint = 2 ... y is an even int
+- */
+- yisint = 0;
+- if(hx<0) {
+- if(iy>=0x4b800000) yisint = 2; /* even integer y */
+- else if(iy>=0x3f800000) {
+- k = (iy>>23)-0x7f; /* exponent */
+- j = iy>>(23-k);
+- if((j<<(23-k))==iy) yisint = 2-(j&1);
+- }
+- }
++/* Returns 0 if not int, 1 if odd int, 2 if even int. */
++static inline int
++checkint (uint32_t iy)
++{
++ int e = iy >> 23 & 0xff;
++ if (e < 0x7f)
++ return 0;
++ if (e > 0x7f + 23)
++ return 2;
++ if (iy & ((1 << (0x7f + 23 - e)) - 1))
++ return 0;
++ if (iy & (1 << (0x7f + 23 - e)))
++ return 1;
++ return 2;
++}
+
+- ax = fabsf(x);
+- /* special value of x */
+- if(__builtin_expect(ix==0x7f800000||ix==0||ix==0x3f800000, 0)){
+- z = ax; /*x is +-0,+-inf,+-1*/
+- if(hy<0) z = one/z; /* z = (1/|x|) */
+- if(hx<0) {
+- if(((ix-0x3f800000)|yisint)==0) {
+- z = (z-z)/(z-z); /* (-1)**non-int is NaN */
+- } else if(yisint==1)
+- z = -z; /* (x<0)**odd = -(|x|**odd) */
+- }
+- return z;
+- }
++static inline int
++zeroinfnan (uint32_t ix)
++{
++ return 2 * ix - 1 >= 2u * 0x7f800000 - 1;
++}
+
+- /* (x<0)**(non-int) is NaN */
+- if(__builtin_expect(((((u_int32_t)hx>>31)-1)|yisint)==0, 0))
+- return (x-x)/(x-x);
+-
+- /* |y| is huge */
+- if(__builtin_expect(iy>0x4d000000, 0)) { /* if |y| > 2**27 */
+- /* over/underflow if x is not close to one */
+- if(ix<0x3f7ffff8) return (hy<0)? huge*huge:tiny*tiny;
+- if(ix>0x3f800007) return (hy>0)? huge*huge:tiny*tiny;
+- /* now |1-x| is tiny <= 2**-20, suffice to compute
+- log(x) by x-x^2/2+x^3/3-x^4/4 */
+- d2 = ax-1; /* d2 has 20 trailing zeros. */
+- d2 = d2 * invln2 -
+- (d2 * d2) * (0.5 - d2 * (0.333333333333 - d2 * 0.25)) * invln2;
+- } else {
+- /* Avoid internal underflow for tiny y. The exact value
+- of y does not matter if |y| <= 2**-32. */
+- if (iy < 0x2f800000)
+- SET_FLOAT_WORD (y, (hy & 0x80000000) | 0x2f800000);
+- n = 0;
+- /* take care subnormal number */
+- if(ix<0x00800000)
+- {ax *= two24; n -= 24; GET_FLOAT_WORD(ix,ax); }
+- n += ((ix)>>23)-0x7f;
+- j = ix&0x007fffff;
+- /* determine interval */
+- ix = j|0x3f800000; /* normalize ix */
+- if(j<=0x1cc471) k=0; /* |x|<sqrt(3/2) */
+- else if(j<0x5db3d7) k=1; /* |x|<sqrt(3) */
+- else {k=0;n+=1;ix -= 0x00800000;}
+- SET_FLOAT_WORD(ax,ix);
+-
+- /* compute d1 = (x-1)/(x+1) or (x-1.5)/(x+1.5) */
+- d1 = (ax-(double)bp[k])/(ax+(double)bp[k]);
+- /* compute d2 = log(ax) */
+- d2 = d1 * d1;
+- d2 = 3.0 + d2 + d2*d2*(L1+d2*(L2+d2*(L3+d2*(L4+d2*(L5+d2*L6)))));
+- /* 2/(3log2)*(d2+...) */
+- d2 = d1*d2*cp;
+- /* log2(ax) = (d2+..)*2/(3*log2) */
+- d2 = d2+dp[k]+(double)n;
+- }
++float
++__powf (float x, float y)
++{
++ unsigned long sign_bias = 0;
++ uint32_t ix, iy;
+
+- s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
+- if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0)
+- s = -one; /* (-ve)**(odd int) */
+-
+- /* compute y * d2 */
+- d1 = y * d2;
+- z = d1;
+- GET_FLOAT_WORD(j,z);
+- if (__builtin_expect(j>0x43000000, 0)) /* if z > 128 */
+- return s*huge*huge; /* overflow */
+- else if (__builtin_expect(j==0x43000000, 0)) { /* if z == 128 */
+- if(ovt>(z-d1)) return s*huge*huge; /* overflow */
+- }
+- else if (__builtin_expect((j&0x7fffffff)>0x43160000, 0))/* z <= -150 */
+- return s*tiny*tiny; /* underflow */
+- else if (__builtin_expect((u_int32_t) j==0xc3160000, 0)){/* z == -150*/
+- if(0.0<=(z-d1)) return s*tiny*tiny; /* underflow */
+- }
+- /*
+- * compute 2**d1
+- */
+- i = j&0x7fffffff;
+- k = (i>>23)-0x7f;
+- n = 0;
+- if(i>0x3f000000) { /* if |z| > 0.5, set n = [z+0.5] */
+- n = j+(0x00800000>>(k+1));
+- k = ((n&0x7fffffff)>>23)-0x7f; /* new k for n */
+- SET_FLOAT_WORD(z,n&~(0x007fffff>>k));
+- n = ((n&0x007fffff)|0x00800000)>>(23-k);
+- if(j<0) n = -n;
+- d1 -= z;
+- }
+- d1 = d1 * lg2;
+- d2 = d1*d1;
+- d2 = d1 - d2*(P1+d2*(P2+d2*(P3+d2*(P4+d2*P5))));
+- d2 = (d1*d2)/(d2-two);
+- z = one - (d2-d1);
+- GET_FLOAT_WORD(j,z);
+- j += (n<<23);
+- if((j>>23)<=0) /* subnormal output */
+- {
+- z = __scalbnf (z, n);
+- float force_underflow = z * z;
+- math_force_eval (force_underflow);
+- }
+- else SET_FLOAT_WORD(z,j);
+- return s*z;
++ ix = asuint (x);
++ iy = asuint (y);
++ if (__glibc_unlikely (ix - 0x00800000 >= 0x7f800000 - 0x00800000
++ || zeroinfnan (iy)))
++ {
++ /* Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan). */
++ if (__glibc_unlikely (zeroinfnan (iy)))
++ {
++ if (2 * iy == 0)
++ return issignalingf_inline (x) ? x + y : 1.0f;
++ if (ix == 0x3f800000)
++ return issignalingf_inline (y) ? x + y : 1.0f;
++ if (2 * ix > 2u * 0x7f800000 || 2 * iy > 2u * 0x7f800000)
++ return x + y;
++ if (2 * ix == 2 * 0x3f800000)
++ return 1.0f;
++ if ((2 * ix < 2 * 0x3f800000) == !(iy & 0x80000000))
++ return 0.0f; /* |x|<1 && y==inf or |x|>1 && y==-inf. */
++ return y * y;
++ }
++ if (__glibc_unlikely (zeroinfnan (ix)))
++ {
++ float_t x2 = x * x;
++ if (ix & 0x80000000 && checkint (iy) == 1)
++ {
++ x2 = -x2;
++ sign_bias = 1;
++ }
++#if WANT_ERRNO
++ if (2 * ix == 0 && iy & 0x80000000)
++ return __math_divzerof (sign_bias);
++#endif
++ return iy & 0x80000000 ? 1 / x2 : x2;
++ }
++ /* x and y are non-zero finite. */
++ if (ix & 0x80000000)
++ {
++ /* Finite x < 0. */
++ int yint = checkint (iy);
++ if (yint == 0)
++ return __math_invalidf (x);
++ if (yint == 1)
++ sign_bias = SIGN_BIAS;
++ ix &= 0x7fffffff;
++ }
++ if (ix < 0x00800000)
++ {
++ /* Normalize subnormal x so exponent becomes negative. */
++ ix = asuint (x * 0x1p23f);
++ ix &= 0x7fffffff;
++ ix -= 23 << 23;
++ }
++ }
++ double_t logx = log2_inline (ix);
++ double_t ylogx = y * logx; /* Note: cannot overflow, y is single prec. */
++ if (__glibc_unlikely ((asuint64 (ylogx) >> 47 & 0xffff)
++ >= asuint64 (126.0 * POWF_SCALE) >> 47))
++ {
++ /* |y*log(x)| >= 126. */
++ if (ylogx > 0x1.fffffffd1d571p+6 * POWF_SCALE)
++ return __math_oflowf (sign_bias);
++ if (ylogx <= -150.0 * POWF_SCALE)
++ return __math_uflowf (sign_bias);
++#if WANT_ERRNO_UFLOW
++ if (ylogx < -149.0 * POWF_SCALE)
++ return __math_may_uflowf (sign_bias);
++#endif
++ }
++ return (float) exp2_inline (ylogx, sign_bias);
+ }
+-strong_alias (__ieee754_powf, __powf_finite)
++#ifndef __powf
++strong_alias (__powf, __ieee754_powf)
++strong_alias (__powf, __powf_finite)
++versioned_symbol (libm, __powf, powf, GLIBC_2_27);
++libm_alias_float_other (__pow, pow)
++#endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_powf_log2_data.c glibc-2.26/sysdeps/ieee754/flt-32/e_powf_log2_data.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_powf_log2_data.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_powf_log2_data.c 2017-10-22 17:02:23.599967253 +0000
+@@ -0,0 +1,45 @@
++/* Data definition for powf.
++ Copyright (C) 2017 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_config.h"
++
++const struct powf_log2_data __powf_log2_data = {
++ .tab = {
++ { 0x1.661ec79f8f3bep+0, -0x1.efec65b963019p-2 * POWF_SCALE },
++ { 0x1.571ed4aaf883dp+0, -0x1.b0b6832d4fca4p-2 * POWF_SCALE },
++ { 0x1.49539f0f010bp+0, -0x1.7418b0a1fb77bp-2 * POWF_SCALE },
++ { 0x1.3c995b0b80385p+0, -0x1.39de91a6dcf7bp-2 * POWF_SCALE },
++ { 0x1.30d190c8864a5p+0, -0x1.01d9bf3f2b631p-2 * POWF_SCALE },
++ { 0x1.25e227b0b8eap+0, -0x1.97c1d1b3b7afp-3 * POWF_SCALE },
++ { 0x1.1bb4a4a1a343fp+0, -0x1.2f9e393af3c9fp-3 * POWF_SCALE },
++ { 0x1.12358f08ae5bap+0, -0x1.960cbbf788d5cp-4 * POWF_SCALE },
++ { 0x1.0953f419900a7p+0, -0x1.a6f9db6475fcep-5 * POWF_SCALE },
++ { 0x1p+0, 0x0p+0 * POWF_SCALE },
++ { 0x1.e608cfd9a47acp-1, 0x1.338ca9f24f53dp-4 * POWF_SCALE },
++ { 0x1.ca4b31f026aap-1, 0x1.476a9543891bap-3 * POWF_SCALE },
++ { 0x1.b2036576afce6p-1, 0x1.e840b4ac4e4d2p-3 * POWF_SCALE },
++ { 0x1.9c2d163a1aa2dp-1, 0x1.40645f0c6651cp-2 * POWF_SCALE },
++ { 0x1.886e6037841edp-1, 0x1.88e9c2c1b9ff8p-2 * POWF_SCALE },
++ { 0x1.767dcf5534862p-1, 0x1.ce0a44eb17bccp-2 * POWF_SCALE },
++ },
++ .poly = {
++ 0x1.27616c9496e0bp-2 * POWF_SCALE, -0x1.71969a075c67ap-2 * POWF_SCALE,
++ 0x1.ec70a6ca7baddp-2 * POWF_SCALE, -0x1.7154748bef6c8p-1 * POWF_SCALE,
++ 0x1.71547652ab82bp0 * POWF_SCALE,
++ }
++};
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_remainderf.c glibc-2.26/sysdeps/ieee754/flt-32/e_remainderf.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_remainderf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_remainderf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -23,7 +23,7 @@ float
+ __ieee754_remainderf(float x, float p)
+ {
+ int32_t hx,hp;
+- u_int32_t sx;
++ uint32_t sx;
+ float p_half;
+
+ GET_FLOAT_WORD(hx,x);
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_rem_pio2f.c glibc-2.26/sysdeps/ieee754/flt-32/e_rem_pio2f.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_rem_pio2f.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_rem_pio2f.c 2017-10-22 17:02:23.599967253 +0000
+@@ -131,7 +131,7 @@ int32_t __ieee754_rem_pio2f(float x, flo
+ if(n<32&&(int32_t)(ix&0xffffff00)!=npio2_hw[n-1]) {
+ y[0] = r-w; /* quick check no cancellation */
+ } else {
+- u_int32_t high;
++ uint32_t high;
+ j = ix>>23;
+ y[0] = r-w;
+ GET_FLOAT_WORD(high,y[0]);
+diff -purN glibc-org/sysdeps/ieee754/flt-32/e_sqrtf.c glibc-2.26/sysdeps/ieee754/flt-32/e_sqrtf.c
+--- glibc-org/sysdeps/ieee754/flt-32/e_sqrtf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/e_sqrtf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -24,7 +24,7 @@ __ieee754_sqrtf(float x)
+ float z;
+ int32_t sign = (int)0x80000000;
+ int32_t ix,s,q,m,t,i;
+- u_int32_t r;
++ uint32_t r;
+
+ GET_FLOAT_WORD(ix,x);
+
+diff -purN glibc-org/sysdeps/ieee754/flt-32/math_config.h glibc-2.26/sysdeps/ieee754/flt-32/math_config.h
+--- glibc-org/sysdeps/ieee754/flt-32/math_config.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/math_config.h 2017-10-22 17:02:23.599967253 +0000
+@@ -0,0 +1,164 @@
++/* Configuration for math routines.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _MATH_CONFIG_H
++#define _MATH_CONFIG_H
++
++#include <math.h>
++#include <math_private.h>
++#include <nan-high-order-bit.h>
++#include <stdint.h>
++
++#ifndef WANT_ROUNDING
++/* Correct special case results in non-nearest rounding modes. */
++# define WANT_ROUNDING 1
++#endif
++#ifndef WANT_ERRNO
++/* Set errno according to ISO C with (math_errhandling & MATH_ERRNO) != 0. */
++# define WANT_ERRNO 1
++#endif
++#ifndef WANT_ERRNO_UFLOW
++/* Set errno to ERANGE if result underflows to 0 (in all rounding modes). */
++# define WANT_ERRNO_UFLOW (WANT_ROUNDING && WANT_ERRNO)
++#endif
++
++#ifndef TOINT_INTRINSICS
++# define TOINT_INTRINSICS 0
++#endif
++#ifndef TOINT_RINT
++# define TOINT_RINT 0
++#endif
++#ifndef TOINT_SHIFT
++# define TOINT_SHIFT 1
++#endif
++
++static inline uint32_t
++asuint (float f)
++{
++ union
++ {
++ float f;
++ uint32_t i;
++ } u = {f};
++ return u.i;
++}
++
++static inline float
++asfloat (uint32_t i)
++{
++ union
++ {
++ uint32_t i;
++ float f;
++ } u = {i};
++ return u.f;
++}
++
++static inline uint64_t
++asuint64 (double f)
++{
++ union
++ {
++ double f;
++ uint64_t i;
++ } u = {f};
++ return u.i;
++}
++
++static inline double
++asdouble (uint64_t i)
++{
++ union
++ {
++ uint64_t i;
++ double f;
++ } u = {i};
++ return u.f;
++}
++
++static inline int
++issignalingf_inline (float x)
++{
++ uint32_t ix = asuint (x);
++ if (HIGH_ORDER_BIT_IS_SET_FOR_SNAN)
++ return (ix & 0x7fc00000) == 0x7fc00000;
++ return 2 * (ix ^ 0x00400000) > 2u * 0x7fc00000;
++}
++
++#define NOINLINE __attribute__ ((noinline))
++
++attribute_hidden float __math_oflowf (unsigned long);
++attribute_hidden float __math_uflowf (unsigned long);
++attribute_hidden float __math_may_uflowf (unsigned long);
++attribute_hidden float __math_divzerof (unsigned long);
++attribute_hidden float __math_invalidf (float);
++
++/* Shared between expf, exp2f and powf. */
++#define EXP2F_TABLE_BITS 5
++#define EXP2F_POLY_ORDER 3
++extern const struct exp2f_data
++{
++ uint64_t tab[1 << EXP2F_TABLE_BITS];
++ double shift_scaled;
++ double poly[EXP2F_POLY_ORDER];
++ double shift;
++ double invln2_scaled;
++ double poly_scaled[EXP2F_POLY_ORDER];
++} __exp2f_data attribute_hidden;
++
++#define LOGF_TABLE_BITS 4
++#define LOGF_POLY_ORDER 4
++extern const struct logf_data
++{
++ struct
++ {
++ double invc, logc;
++ } tab[1 << LOGF_TABLE_BITS];
++ double ln2;
++ double poly[LOGF_POLY_ORDER - 1]; /* First order coefficient is 1. */
++} __logf_data attribute_hidden;
++
++#define LOG2F_TABLE_BITS 4
++#define LOG2F_POLY_ORDER 4
++extern const struct log2f_data
++{
++ struct
++ {
++ double invc, logc;
++ } tab[1 << LOG2F_TABLE_BITS];
++ double poly[LOG2F_POLY_ORDER];
++} __log2f_data attribute_hidden;
++
++#define POWF_LOG2_TABLE_BITS 4
++#define POWF_LOG2_POLY_ORDER 5
++#if TOINT_INTRINSICS
++# define POWF_SCALE_BITS EXP2F_TABLE_BITS
++#else
++# define POWF_SCALE_BITS 0
++#endif
++#define POWF_SCALE ((double) (1 << POWF_SCALE_BITS))
++extern const struct powf_log2_data
++{
++ struct
++ {
++ double invc, logc;
++ } tab[1 << POWF_LOG2_TABLE_BITS];
++ double poly[POWF_LOG2_POLY_ORDER];
++} __powf_log2_data attribute_hidden;
++
++#endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/math_errf.c glibc-2.26/sysdeps/ieee754/flt-32/math_errf.c
+--- glibc-org/sysdeps/ieee754/flt-32/math_errf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/math_errf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -0,0 +1,76 @@
++/* Single-precision math error handling.
++ Copyright (C) 2017 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_config.h"
++
++#if WANT_ERRNO
++# include <errno.h>
++/* NOINLINE reduces code size. */
++NOINLINE static float
++with_errnof (float y, int e)
++{
++ errno = e;
++ return y;
++}
++#else
++# define with_errnof(x, e) (x)
++#endif
++
++/* NOINLINE prevents fenv semantics breaking optimizations. */
++NOINLINE static float
++xflowf (unsigned long sign, float y)
++{
++ y = (sign ? -y : y) * y;
++ return with_errnof (y, ERANGE);
++}
++
++attribute_hidden float
++__math_uflowf (unsigned long sign)
++{
++ return xflowf (sign, 0x1p-95f);
++}
++
++#if WANT_ERRNO_UFLOW
++/* Underflows to zero in some non-nearest rounding mode, setting errno
++ is valid even if the result is non-zero, but in the subnormal range. */
++attribute_hidden float
++__math_may_uflowf (unsigned long sign)
++{
++ return xflowf (sign, 0x1.4p-75f);
++}
++#endif
++
++attribute_hidden float
++__math_oflowf (unsigned long sign)
++{
++ return xflowf (sign, 0x1p97f);
++}
++
++attribute_hidden float
++__math_divzerof (unsigned long sign)
++{
++ float y = 0;
++ return with_errnof ((sign ? -1 : 1) / y, ERANGE);
++}
++
++attribute_hidden float
++__math_invalidf (float x)
++{
++ float y = (x - x) / (x - x);
++ return isnan (x) ? y : with_errnof (y, EDOM);
++}
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_asinhf.c glibc-2.26/sysdeps/ieee754/flt-32/s_asinhf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_asinhf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_asinhf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -16,6 +16,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ static const float
+ one = 1.0000000000e+00, /* 0x3F800000 */
+@@ -47,4 +48,4 @@ __asinhf(float x)
+ }
+ return __copysignf(w, x);
+ }
+-weak_alias (__asinhf, asinhf)
++libm_alias_float (__asinh, asinh)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_atanf.c glibc-2.26/sysdeps/ieee754/flt-32/s_atanf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_atanf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_atanf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -20,6 +20,7 @@ static char rcsid[] = "$NetBSD: s_atanf.
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ static const float atanhi[] = {
+ 4.6364760399e-01, /* atan(0.5)hi 0x3eed6338 */
+@@ -98,4 +99,4 @@ float __atanf(float x)
+ return (hx<0)? -z:z;
+ }
+ }
+-weak_alias (__atanf, atanf)
++libm_alias_float (__atan, atan)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_cbrtf.c glibc-2.26/sysdeps/ieee754/flt-32/s_cbrtf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_cbrtf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_cbrtf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -20,6 +20,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+
+ #define CBRT2 1.2599210498948731648 /* 2^(1/3) */
+@@ -60,4 +61,4 @@ __cbrtf (float x)
+
+ return __ldexpf (x > 0.0 ? ym : -ym, xe / 3);
+ }
+-weak_alias (__cbrtf, cbrtf)
++libm_alias_float (__cbrt, cbrt)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_ceilf.c glibc-2.26/sysdeps/ieee754/flt-32/s_ceilf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_ceilf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_ceilf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -15,13 +15,14 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+
+ float
+ __ceilf(float x)
+ {
+ int32_t i0,j0;
+- u_int32_t i;
++ uint32_t i;
+
+ GET_FLOAT_WORD(i0,x);
+ j0 = ((i0>>23)&0xff)-0x7f;
+@@ -44,5 +45,5 @@ __ceilf(float x)
+ return x;
+ }
+ #ifndef __ceilf
+-weak_alias (__ceilf, ceilf)
++libm_alias_float (__ceil, ceil)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_copysignf.c glibc-2.26/sysdeps/ieee754/flt-32/s_copysignf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_copysignf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_copysignf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -25,13 +25,14 @@ static char rcsid[] = "$NetBSD: s_copysi
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ float __copysignf(float x, float y)
+ {
+- u_int32_t ix,iy;
++ uint32_t ix,iy;
+ GET_FLOAT_WORD(ix,x);
+ GET_FLOAT_WORD(iy,y);
+ SET_FLOAT_WORD(x,(ix&0x7fffffff)|(iy&0x80000000));
+ return x;
+ }
+-weak_alias (__copysignf, copysignf)
++libm_alias_float (__copysign, copysign)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_cosf.c glibc-2.26/sysdeps/ieee754/flt-32/s_cosf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_cosf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_cosf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -20,6 +20,7 @@ static char rcsid[] = "$NetBSD: s_cosf.c
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ #ifndef COSF
+ # define COSF_FUNC __cosf
+@@ -59,5 +60,5 @@ float COSF_FUNC(float x)
+ }
+
+ #ifndef COSF
+-weak_alias (__cosf, cosf)
++libm_alias_float (__cos, cos)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_erff.c glibc-2.26/sysdeps/ieee754/flt-32/s_erff.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_erff.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_erff.c 2017-10-22 17:02:23.599967253 +0000
+@@ -21,6 +21,7 @@ static char rcsid[] = "$NetBSD: s_erff.c
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <fix-int-fp-convert-zero.h>
+
+ static const float
+@@ -104,7 +105,7 @@ float __erff(float x)
+ GET_FLOAT_WORD(hx,x);
+ ix = hx&0x7fffffff;
+ if(ix>=0x7f800000) { /* erf(nan)=nan */
+- i = ((u_int32_t)hx>>31)<<1;
++ i = ((uint32_t)hx>>31)<<1;
+ return (float)(1-i)+one/x; /* erf(+-inf)=+-1 */
+ }
+
+@@ -152,7 +153,7 @@ float __erff(float x)
+ r = __ieee754_expf(-z*z-(float)0.5625)*__ieee754_expf((z-x)*(z+x)+R/S);
+ if(hx>=0) return one-r/x; else return r/x-one;
+ }
+-weak_alias (__erff, erff)
++libm_alias_float (__erf, erf)
+
+ float __erfcf(float x)
+ {
+@@ -162,7 +163,7 @@ float __erfcf(float x)
+ ix = hx&0x7fffffff;
+ if(ix>=0x7f800000) { /* erfc(nan)=nan */
+ /* erfc(+-inf)=0,2 */
+- float ret = (float)(((u_int32_t)hx>>31)<<1)+one/x;
++ float ret = (float)(((uint32_t)hx>>31)<<1)+one/x;
+ if (FIX_INT_FP_CONVERT_ZERO && ret == 0.0f)
+ return 0.0f;
+ return ret;
+@@ -227,4 +228,4 @@ float __erfcf(float x)
+ return two-tiny;
+ }
+ }
+-weak_alias (__erfcf, erfcf)
++libm_alias_float (__erfc, erfc)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_expm1f.c glibc-2.26/sysdeps/ieee754/flt-32/s_expm1f.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_expm1f.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_expm1f.c 2017-10-22 17:02:23.599967253 +0000
+@@ -17,6 +17,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ static const float huge = 1.0e+30;
+ static const float tiny = 1.0e-30;
+@@ -39,7 +40,7 @@ __expm1f(float x)
+ {
+ float y,hi,lo,c,t,e,hxs,hfx,r1;
+ int32_t k,xsb;
+- u_int32_t hx;
++ uint32_t hx;
+
+ GET_FLOAT_WORD(hx,x);
+ xsb = hx&0x80000000; /* sign bit of x */
+@@ -127,4 +128,4 @@ __expm1f(float x)
+ }
+ return y;
+ }
+-weak_alias (__expm1f, expm1f)
++libm_alias_float (__expm1, expm1)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_fabsf.c glibc-2.26/sysdeps/ieee754/flt-32/s_fabsf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_fabsf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_fabsf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -22,9 +22,10 @@ static char rcsid[] = "$NetBSD: s_fabsf.
+ */
+
+ #include <math.h>
++#include <libm-alias-float.h>
+
+ float __fabsf(float x)
+ {
+ return __builtin_fabsf (x);
+ }
+-weak_alias (__fabsf, fabsf)
++libm_alias_float (__fabs, fabs)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_finitef.c glibc-2.26/sysdeps/ieee754/flt-32/s_finitef.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_finitef.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_finitef.c 2017-10-22 17:02:23.599967253 +0000
+@@ -35,7 +35,7 @@ int FINITEF(float x)
+ {
+ int32_t ix;
+ GET_FLOAT_WORD(ix,x);
+- return (int)((u_int32_t)((ix&0x7f800000)-0x7f800000)>>31);
++ return (int)((uint32_t)((ix&0x7f800000)-0x7f800000)>>31);
+ }
+ hidden_def (__finitef)
+ weak_alias (__finitef, finitef)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_floorf.c glibc-2.26/sysdeps/ieee754/flt-32/s_floorf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_floorf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_floorf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -22,12 +22,13 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ float
+ __floorf(float x)
+ {
+ int32_t i0,j0;
+- u_int32_t i;
++ uint32_t i;
+ GET_FLOAT_WORD(i0,x);
+ j0 = ((i0>>23)&0xff)-0x7f;
+ if(j0<23) {
+@@ -50,5 +51,5 @@ __floorf(float x)
+ return x;
+ }
+ #ifndef __floorf
+-weak_alias (__floorf, floorf)
++libm_alias_float (__floor, floor)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_fpclassifyf.c glibc-2.26/sysdeps/ieee754/flt-32/s_fpclassifyf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_fpclassifyf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_fpclassifyf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -25,7 +25,7 @@
+ int
+ __fpclassifyf (float x)
+ {
+- u_int32_t wx;
++ uint32_t wx;
+ int retval = FP_NORMAL;
+
+ GET_FLOAT_WORD (wx, x);
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_frexpf.c glibc-2.26/sysdeps/ieee754/flt-32/s_frexpf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_frexpf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_frexpf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -19,6 +19,7 @@ static char rcsid[] = "$NetBSD: s_frexpf
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ static const float
+ two25 = 3.3554432000e+07; /* 0x4c000000 */
+@@ -41,4 +42,4 @@ float __frexpf(float x, int *eptr)
+ SET_FLOAT_WORD(x,hx);
+ return x;
+ }
+-weak_alias (__frexpf, frexpf)
++libm_alias_float (__frexp, frexp)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_fromfpf.c glibc-2.26/sysdeps/ieee754/flt-32/s_fromfpf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_fromfpf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_fromfpf.c 2017-10-22 17:02:23.599967253 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 0
+-#define FUNC fromfpf
++#define FUNC __fromfpf
+ #include <s_fromfpf_main.c>
++libm_alias_float (__fromfp, fromfp)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_fromfpf_main.c glibc-2.26/sysdeps/ieee754/flt-32/s_fromfpf_main.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_fromfpf_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_fromfpf_main.c 2017-10-22 17:02:23.599967253 +0000
+@@ -20,6 +20,7 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <stdbool.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_fromfpxf.c glibc-2.26/sysdeps/ieee754/flt-32/s_fromfpxf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_fromfpxf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_fromfpxf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 1
+-#define FUNC fromfpxf
++#define FUNC __fromfpxf
+ #include <s_fromfpf_main.c>
++libm_alias_float (__fromfpx, fromfpx)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_getpayloadf.c glibc-2.26/sysdeps/ieee754/flt-32/s_getpayloadf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_getpayloadf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_getpayloadf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -19,10 +19,11 @@
+ #include <fix-int-fp-convert-zero.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <stdint.h>
+
+ float
+-getpayloadf (const float *x)
++__getpayloadf (const float *x)
+ {
+ uint32_t ix;
+ GET_FLOAT_WORD (ix, *x);
+@@ -31,3 +32,4 @@ getpayloadf (const float *x)
+ return 0.0f;
+ return (float) ix;
+ }
++libm_alias_float (__getpayload, getpayload)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_isnanf.c glibc-2.26/sysdeps/ieee754/flt-32/s_isnanf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_isnanf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_isnanf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -32,7 +32,7 @@ int __isnanf(float x)
+ GET_FLOAT_WORD(ix,x);
+ ix &= 0x7fffffff;
+ ix = 0x7f800000 - ix;
+- return (int)(((u_int32_t)(ix))>>31);
++ return (int)(((uint32_t)(ix))>>31);
+ }
+ hidden_def (__isnanf)
+ weak_alias (__isnanf, isnanf)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_issignalingf.c glibc-2.26/sysdeps/ieee754/flt-32/s_issignalingf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_issignalingf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_issignalingf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -23,7 +23,7 @@
+ int
+ __issignalingf (float x)
+ {
+- u_int32_t xi;
++ uint32_t xi;
+ GET_FLOAT_WORD (xi, x);
+ #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+ /* We only have to care about the high-order bit of x's significand, because
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_llrintf.c glibc-2.26/sysdeps/ieee754/flt-32/s_llrintf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_llrintf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_llrintf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -23,6 +23,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+ static const float two23[2] =
+@@ -36,7 +37,7 @@ long long int
+ __llrintf (float x)
+ {
+ int32_t j0;
+- u_int32_t i0;
++ uint32_t i0;
+ float w;
+ float t;
+ long long int result;
+@@ -83,4 +84,4 @@ __llrintf (float x)
+ return sx ? -result : result;
+ }
+
+-weak_alias (__llrintf, llrintf)
++libm_alias_float (__llrint, llrint)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_llroundf.c glibc-2.26/sysdeps/ieee754/flt-32/s_llroundf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_llroundf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_llroundf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -22,6 +22,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+
+@@ -29,7 +30,7 @@ long long int
+ __llroundf (float x)
+ {
+ int32_t j0;
+- u_int32_t i;
++ uint32_t i;
+ long long int result;
+ int sign;
+
+@@ -70,4 +71,4 @@ __llroundf (float x)
+ return sign * result;
+ }
+
+-weak_alias (__llroundf, llroundf)
++libm_alias_float (__llround, llround)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_logbf.c glibc-2.26/sysdeps/ieee754/flt-32/s_logbf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_logbf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_logbf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -15,6 +15,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <fix-int-fp-convert-zero.h>
+
+ float
+@@ -38,4 +39,4 @@ __logbf (float x)
+ return 0.0f;
+ return (float) (rix - 127);
+ }
+-weak_alias (__logbf, logbf)
++libm_alias_float (__logb, logb)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_lrintf.c glibc-2.26/sysdeps/ieee754/flt-32/s_lrintf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_lrintf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_lrintf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -23,6 +23,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+ static const float two23[2] =
+@@ -36,7 +37,7 @@ long int
+ __lrintf (float x)
+ {
+ int32_t j0;
+- u_int32_t i0;
++ uint32_t i0;
+ float w;
+ float t;
+ long int result;
+@@ -83,4 +84,4 @@ __lrintf (float x)
+ return sx ? -result : result;
+ }
+
+-weak_alias (__lrintf, lrintf)
++libm_alias_float (__lrint, lrint)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_lroundf.c glibc-2.26/sysdeps/ieee754/flt-32/s_lroundf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_lroundf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_lroundf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -22,6 +22,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+
+@@ -29,7 +30,7 @@ long int
+ __lroundf (float x)
+ {
+ int32_t j0;
+- u_int32_t i;
++ uint32_t i;
+ long int result;
+ int sign;
+
+@@ -70,4 +71,4 @@ __lroundf (float x)
+ return sign * result;
+ }
+
+-weak_alias (__lroundf, lroundf)
++libm_alias_float (__lround, lround)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_modff.c glibc-2.26/sysdeps/ieee754/flt-32/s_modff.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_modff.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_modff.c 2017-10-22 17:02:23.600967252 +0000
+@@ -15,6 +15,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ static const float one = 1.0;
+
+@@ -22,7 +23,7 @@ float
+ __modff(float x, float *iptr)
+ {
+ int32_t i0,j0;
+- u_int32_t i;
++ uint32_t i;
+ GET_FLOAT_WORD(i0,x);
+ j0 = ((i0>>23)&0xff)-0x7f; /* exponent of x */
+ if(__builtin_expect(j0<23, 1)) { /* integer part in x */
+@@ -32,7 +33,7 @@ __modff(float x, float *iptr)
+ } else {
+ i = (0x007fffff)>>j0;
+ if((i0&i)==0) { /* x is integral */
+- u_int32_t ix;
++ uint32_t ix;
+ *iptr = x;
+ GET_FLOAT_WORD(ix,x);
+ SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */
+@@ -51,4 +52,4 @@ __modff(float x, float *iptr)
+ return x;
+ }
+ }
+-weak_alias (__modff, modff)
++libm_alias_float (__modf, modf)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_nearbyintf.c glibc-2.26/sysdeps/ieee754/flt-32/s_nearbyintf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_nearbyintf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_nearbyintf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -18,6 +18,7 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ static const float
+ TWO23[2]={
+@@ -37,7 +38,7 @@ __nearbyintf(float x)
+ if(j0<23) {
+ if(j0<0) {
+ libc_feholdexceptf (&env);
+- w = TWO23[sx]+x;
++ w = TWO23[sx] + math_opt_barrier (x);
+ t = w-TWO23[sx];
+ math_force_eval (t);
+ libc_fesetenvf (&env);
+@@ -50,10 +51,10 @@ __nearbyintf(float x)
+ else return x; /* x is integral */
+ }
+ libc_feholdexceptf (&env);
+- w = TWO23[sx]+x;
++ w = TWO23[sx] + math_opt_barrier (x);
+ t = w-TWO23[sx];
+ math_force_eval (t);
+ libc_fesetenvf (&env);
+ return t;
+ }
+-weak_alias (__nearbyintf, nearbyintf)
++libm_alias_float (__nearbyint, nearbyint)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_nextafterf.c glibc-2.26/sysdeps/ieee754/flt-32/s_nextafterf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_nextafterf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_nextafterf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -20,6 +20,7 @@ static char rcsid[] = "$NetBSD: s_nextaf
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <float.h>
+
+ float __nextafterf(float x, float y)
+@@ -70,4 +71,4 @@ float __nextafterf(float x, float y)
+ SET_FLOAT_WORD(x,hx);
+ return x;
+ }
+-weak_alias (__nextafterf, nextafterf)
++libm_alias_float (__nextafter, nextafter)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_nextupf.c glibc-2.26/sysdeps/ieee754/flt-32/s_nextupf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_nextupf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_nextupf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -18,6 +18,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ /* Return the least floating-point number greater than X. */
+ float
+@@ -43,4 +44,4 @@ __nextupf (float x)
+ return x;
+ }
+
+-weak_alias (__nextupf, nextupf)
++libm_alias_float (__nextup, nextup)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_remquof.c glibc-2.26/sysdeps/ieee754/flt-32/s_remquof.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_remquof.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_remquof.c 2017-10-22 17:02:23.600967252 +0000
+@@ -23,13 +23,14 @@
+
+
+ static const float zero = 0.0;
++#include <libm-alias-float.h>
+
+
+ float
+ __remquof (float x, float y, int *quo)
+ {
+ int32_t hx,hy;
+- u_int32_t sx;
++ uint32_t sx;
+ int cquo, qs;
+
+ GET_FLOAT_WORD (hx, x);
+@@ -107,4 +108,4 @@ __remquof (float x, float y, int *quo)
+ x = -x;
+ return x;
+ }
+-weak_alias (__remquof, remquof)
++libm_alias_float (__remquo, remquo)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_rintf.c glibc-2.26/sysdeps/ieee754/flt-32/s_rintf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_rintf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_rintf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -15,6 +15,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ static const float
+ TWO23[2]={
+@@ -46,5 +47,5 @@ __rintf(float x)
+ return w-TWO23[sx];
+ }
+ #ifndef __rintf
+-weak_alias (__rintf, rintf)
++libm_alias_float (__rint, rint)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_roundevenf.c glibc-2.26/sysdeps/ieee754/flt-32/s_roundevenf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_roundevenf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_roundevenf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -19,6 +19,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <stdint.h>
+
+ #define BIAS 0x7f
+@@ -26,7 +27,7 @@
+ #define MAX_EXP (2 * BIAS + 1)
+
+ float
+-roundevenf (float x)
++__roundevenf (float x)
+ {
+ uint32_t ix, ux;
+ GET_FLOAT_WORD (ix, x);
+@@ -66,3 +67,4 @@ roundevenf (float x)
+ SET_FLOAT_WORD (x, ix);
+ return x;
+ }
++libm_alias_float (__roundeven, roundeven)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_roundf.c glibc-2.26/sysdeps/ieee754/flt-32/s_roundf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_roundf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_roundf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+
+ float
+@@ -39,7 +40,7 @@ __roundf (float x)
+ }
+ else
+ {
+- u_int32_t i = 0x007fffff >> j0;
++ uint32_t i = 0x007fffff >> j0;
+ if ((i0 & i) == 0)
+ /* X is integral. */
+ return x;
+@@ -60,4 +61,4 @@ __roundf (float x)
+ SET_FLOAT_WORD (x, i0);
+ return x;
+ }
+-weak_alias (__roundf, roundf)
++libm_alias_float (__round, round)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_setpayloadf.c glibc-2.26/sysdeps/ieee754/flt-32/s_setpayloadf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_setpayloadf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_setpayloadf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -1,3 +1,4 @@
+ #define SIG 0
+-#define FUNC setpayloadf
++#define FUNC __setpayloadf
+ #include <s_setpayloadf_main.c>
++libm_alias_float (__setpayload, setpayload)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_setpayloadf_main.c glibc-2.26/sysdeps/ieee754/flt-32/s_setpayloadf_main.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_setpayloadf_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_setpayloadf_main.c 2017-10-22 17:02:23.600967252 +0000
+@@ -18,6 +18,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_setpayloadsigf.c glibc-2.26/sysdeps/ieee754/flt-32/s_setpayloadsigf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_setpayloadsigf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_setpayloadsigf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -1,3 +1,4 @@
+ #define SIG 1
+-#define FUNC setpayloadsigf
++#define FUNC __setpayloadsigf
+ #include <s_setpayloadf_main.c>
++libm_alias_float (__setpayloadsig, setpayloadsig)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_sincosf.c glibc-2.26/sysdeps/ieee754/flt-32/s_sincosf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_sincosf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_sincosf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -21,6 +21,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ #ifndef SINCOSF
+ # define SINCOSF_FUNC __sincosf
+@@ -80,5 +81,5 @@ SINCOSF_FUNC (float x, float *sinx, floa
+ }
+
+ #ifndef SINCOSF
+-weak_alias (__sincosf, sincosf)
++libm_alias_float (__sincos, sincos)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_sinf.c glibc-2.26/sysdeps/ieee754/flt-32/s_sinf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_sinf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_sinf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -20,6 +20,7 @@ static char rcsid[] = "$NetBSD: s_sinf.c
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ #ifndef SINF
+ # define SINF_FUNC __sinf
+@@ -59,5 +60,5 @@ float SINF_FUNC(float x)
+ }
+
+ #ifndef SINF
+-weak_alias (__sinf, sinf)
++libm_alias_float (__sin, sin)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_tanf.c glibc-2.26/sysdeps/ieee754/flt-32/s_tanf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_tanf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_tanf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -20,6 +20,7 @@ static char rcsid[] = "$NetBSD: s_tanf.c
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ float __tanf(float x)
+ {
+@@ -46,4 +47,4 @@ float __tanf(float x)
+ -1 -- n odd */
+ }
+ }
+-weak_alias (__tanf, tanf)
++libm_alias_float (__tan, tan)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_tanhf.c glibc-2.26/sysdeps/ieee754/flt-32/s_tanhf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_tanhf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_tanhf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -20,6 +20,7 @@ static char rcsid[] = "$NetBSD: s_tanhf.
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+ static const float one=1.0, two=2.0, tiny = 1.0e-30;
+
+@@ -59,4 +60,4 @@ float __tanhf(float x)
+ }
+ return (jx>=0)? z: -z;
+ }
+-weak_alias (__tanhf, tanhf)
++libm_alias_float (__tanh, tanh)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_totalorderf.c glibc-2.26/sysdeps/ieee754/flt-32/s_totalorderf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_totalorderf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_totalorderf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -18,11 +18,12 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+ int
+-totalorderf (float x, float y)
++__totalorderf (float x, float y)
+ {
+ int32_t ix, iy;
+ GET_FLOAT_WORD (ix, x);
+@@ -44,3 +45,4 @@ totalorderf (float x, float y)
+ iy ^= iy_sign >> 1;
+ return ix <= iy;
+ }
++libm_alias_float (__totalorder, totalorder)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_totalordermagf.c glibc-2.26/sysdeps/ieee754/flt-32/s_totalordermagf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_totalordermagf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_totalordermagf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -18,11 +18,12 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-float.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+ int
+-totalordermagf (float x, float y)
++__totalordermagf (float x, float y)
+ {
+ uint32_t ix, iy;
+ GET_FLOAT_WORD (ix, x);
+@@ -42,3 +43,4 @@ totalordermagf (float x, float y)
+ #endif
+ return ix <= iy;
+ }
++libm_alias_float (__totalordermag, totalordermag)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_truncf.c glibc-2.26/sysdeps/ieee754/flt-32/s_truncf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_truncf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_truncf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-float.h>
+
+
+ float
+@@ -49,5 +50,5 @@ __truncf (float x)
+ return x;
+ }
+ #ifndef __truncf
+-weak_alias (__truncf, truncf)
++libm_alias_float (__trunc, trunc)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_ufromfpf.c glibc-2.26/sysdeps/ieee754/flt-32/s_ufromfpf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_ufromfpf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_ufromfpf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 0
+-#define FUNC ufromfpf
++#define FUNC __ufromfpf
+ #include <s_fromfpf_main.c>
++libm_alias_float (__ufromfp, ufromfp)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/s_ufromfpxf.c glibc-2.26/sysdeps/ieee754/flt-32/s_ufromfpxf.c
+--- glibc-org/sysdeps/ieee754/flt-32/s_ufromfpxf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/s_ufromfpxf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 1
+-#define FUNC ufromfpxf
++#define FUNC __ufromfpxf
+ #include <s_fromfpf_main.c>
++libm_alias_float (__ufromfpx, ufromfpx)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/t_exp2f.h glibc-2.26/sysdeps/ieee754/flt-32/t_exp2f.h
+--- glibc-org/sysdeps/ieee754/flt-32/t_exp2f.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/t_exp2f.h 1970-01-01 00:00:00.000000000 +0000
+@@ -1,351 +0,0 @@
+-/* Accurate tables for exp2f().
+- Copyright (C) 1998-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
+-
+- 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/>. */
+-
+-/* This table has the property that, for all integers -128 <= i <= 127,
+- exp(i/256.0 + __exp2f_deltatable[i-128]) == __exp2f_atable[i+128] + r
+- for some -2^-35 < r < 2^-35 (abs(r) < 2^-36 if i <= 0); and that
+- __exp2f_deltatable[i+128] == t * 2^-30
+- for integer t so that abs(t) <= 43447 * 2^0. */
+-
+-#define W30 (9.31322575e-10)
+-static const float __exp2f_deltatable[256] = {
+- -810*W30, 283*W30, -1514*W30, 1304*W30,
+- -1148*W30, -98*W30, -744*W30, -156*W30,
+- -419*W30, -155*W30, 474*W30, 167*W30,
+- -1984*W30, -826*W30, 692*W30, 781*W30,
+- -578*W30, -411*W30, -129*W30, -1500*W30,
+- 654*W30, -141*W30, -816*W30, -53*W30,
+- 148*W30, 493*W30, -2214*W30, 760*W30,
+- 260*W30, 750*W30, -1300*W30, 1424*W30,
+- -1445*W30, -339*W30, -680*W30, -349*W30,
+- -922*W30, 531*W30, 193*W30, -2892*W30,
+- 290*W30, -2145*W30, -276*W30, 485*W30,
+- -695*W30, 215*W30, -7093*W30, 412*W30,
+- -4596*W30, 367*W30, 592*W30, -615*W30,
+- -97*W30, -1066*W30, 972*W30, -226*W30,
+- -625*W30, -374*W30, -5647*W30, -180*W30,
+- 20349*W30, -447*W30, 111*W30, -4164*W30,
+- -87*W30, -21*W30, -251*W30, 66*W30,
+- -517*W30, 2093*W30, -263*W30, 182*W30,
+- -601*W30, 475*W30, -483*W30, -1251*W30,
+- -373*W30, 1471*W30, -92*W30, -215*W30,
+- -97*W30, -190*W30, 0*W30, -290*W30,
+- -2647*W30, 1940*W30, -582*W30, 28*W30,
+- 833*W30, 1493*W30, 34*W30, 321*W30,
+- 3327*W30, -35*W30, 177*W30, -135*W30,
+- -796*W30, -428*W30, 129*W30, 9332*W30,
+- -12*W30, -69*W30, -1743*W30, 6508*W30,
+- -60*W30, 359*W30, 43447*W30, 15*W30,
+- -23*W30, -305*W30, -375*W30, -652*W30,
+- 667*W30, 269*W30, -1575*W30, 185*W30,
+- -329*W30, 200*W30, 6002*W30, 163*W30,
+- -647*W30, 19*W30, -603*W30, -755*W30,
+- 742*W30, -438*W30, 3587*W30, 2560*W30,
+- 0*W30, -520*W30, -241*W30, -299*W30,
+- -1270*W30, -991*W30, -1138*W30, 255*W30,
+- -1192*W30, 1722*W30, 1023*W30, 3700*W30,
+- -1388*W30, -1551*W30, -2549*W30, 27*W30,
+- 282*W30, 673*W30, 113*W30, 1561*W30,
+- 72*W30, 873*W30, 87*W30, -395*W30,
+- -433*W30, 629*W30, 3440*W30, -284*W30,
+- -592*W30, -103*W30, -46*W30, -3844*W30,
+- 1712*W30, 303*W30, 1555*W30, -631*W30,
+- -1400*W30, -961*W30, -854*W30, -276*W30,
+- 407*W30, 833*W30, -345*W30, -1501*W30,
+- 121*W30, -1581*W30, 400*W30, 150*W30,
+- 1224*W30, -139*W30, -563*W30, 879*W30,
+- 933*W30, 2939*W30, 788*W30, 211*W30,
+- 530*W30, -192*W30, 706*W30, -13347*W30,
+- 1065*W30, 3*W30, 111*W30, -208*W30,
+- -360*W30, -532*W30, -291*W30, 483*W30,
+- 987*W30, -33*W30, -1373*W30, -166*W30,
+- -1174*W30, -3955*W30, 1601*W30, -280*W30,
+- 1405*W30, 600*W30, -1659*W30, -23*W30,
+- 390*W30, 449*W30, 570*W30, -13143*W30,
+- -9*W30, -1646*W30, 1201*W30, 294*W30,
+- 2181*W30, -1173*W30, 1388*W30, -4504*W30,
+- 190*W30, -2304*W30, 211*W30, 239*W30,
+- 48*W30, -817*W30, 1018*W30, 1828*W30,
+- -663*W30, 1408*W30, 408*W30, -36*W30,
+- 1295*W30, -230*W30, 1341*W30, 9*W30,
+- 40*W30, 705*W30, 186*W30, 376*W30,
+- 557*W30, 5866*W30, 363*W30, -1558*W30,
+- 718*W30, 669*W30, 1369*W30, -2972*W30,
+- -468*W30, -121*W30, -219*W30, 667*W30,
+- 29954*W30, 366*W30, 48*W30, -203*W30
+-};
+-
+-static const float __exp2f_atable[256] /* __attribute__((mode(SF))) */ = {
+- 0.707106411447, /* 0x0.b504ecfff */
+- 0.709024071690, /* 0x0.b58299fff */
+- 0.710945606239, /* 0x0.b60088000 */
+- 0.712874472142, /* 0x0.b67ef1000 */
+- 0.714806139464, /* 0x0.b6fd88fff */
+- 0.716744661340, /* 0x0.b77c94000 */
+- 0.718687653549, /* 0x0.b7fbea000 */
+- 0.720636486992, /* 0x0.b87ba1fff */
+- 0.722590208040, /* 0x0.b8fbabfff */
+- 0.724549472323, /* 0x0.b97c12fff */
+- 0.726514220228, /* 0x0.b9fcd5fff */
+- 0.728483855735, /* 0x0.ba7deb000 */
+- 0.730457961549, /* 0x0.baff4afff */
+- 0.732438981522, /* 0x0.bb811efff */
+- 0.734425544748, /* 0x0.bc0350000 */
+- 0.736416816713, /* 0x0.bc85d0000 */
+- 0.738412797450, /* 0x0.bd089efff */
+- 0.740414917465, /* 0x0.bd8bd4fff */
+- 0.742422521111, /* 0x0.be0f66fff */
+- 0.744434773914, /* 0x0.be9346fff */
+- 0.746454179287, /* 0x0.bf179f000 */
+- 0.748477637755, /* 0x0.bf9c3afff */
+- 0.750506639473, /* 0x0.c02133fff */
+- 0.752541840064, /* 0x0.c0a694fff */
+- 0.754582285889, /* 0x0.c12c4e000 */
+- 0.756628334525, /* 0x0.c1b265000 */
+- 0.758678436269, /* 0x0.c238bffff */
+- 0.760736882681, /* 0x0.c2bfa6fff */
+- 0.762799203401, /* 0x0.c346cf000 */
+- 0.764867603790, /* 0x0.c3ce5d000 */
+- 0.766940355298, /* 0x0.c45633fff */
+- 0.769021093841, /* 0x0.c4de90fff */
+- 0.771104693409, /* 0x0.c5671dfff */
+- 0.773195922364, /* 0x0.c5f02afff */
+- 0.775292098512, /* 0x0.c6798afff */
+- 0.777394294745, /* 0x0.c70350000 */
+- 0.779501736166, /* 0x0.c78d6d000 */
+- 0.781615912910, /* 0x0.c817fafff */
+- 0.783734917628, /* 0x0.c8a2d9fff */
+- 0.785858273516, /* 0x0.c92e02000 */
+- 0.787990570071, /* 0x0.c9b9c0000 */
+- 0.790125787245, /* 0x0.ca45aefff */
+- 0.792268991467, /* 0x0.cad223fff */
+- 0.794417440881, /* 0x0.cb5ef0fff */
+- 0.796570718287, /* 0x0.cbec0efff */
+- 0.798730909811, /* 0x0.cc79a0fff */
+- 0.800892710672, /* 0x0.cd074dfff */
+- 0.803068041795, /* 0x0.cd95ddfff */
+- 0.805242776881, /* 0x0.ce2464000 */
+- 0.807428598393, /* 0x0.ceb3a3fff */
+- 0.809617877002, /* 0x0.cf431dfff */
+- 0.811812341211, /* 0x0.cfd2eefff */
+- 0.814013659956, /* 0x0.d06333000 */
+- 0.816220164311, /* 0x0.d0f3ce000 */
+- 0.818434238424, /* 0x0.d184e7fff */
+- 0.820652604094, /* 0x0.d21649fff */
+- 0.822877407074, /* 0x0.d2a818000 */
+- 0.825108587751, /* 0x0.d33a51000 */
+- 0.827342867839, /* 0x0.d3ccbdfff */
+- 0.829588949684, /* 0x0.d45ff1000 */
+- 0.831849217401, /* 0x0.d4f411fff */
+- 0.834093391880, /* 0x0.d58724fff */
+- 0.836355149750, /* 0x0.d61b5f000 */
+- 0.838620424257, /* 0x0.d6afd3fff */
+- 0.840896368027, /* 0x0.d744fc000 */
+- 0.843176305293, /* 0x0.d7da66fff */
+- 0.845462262643, /* 0x0.d87037000 */
+- 0.847754716864, /* 0x0.d90673fff */
+- 0.850052893157, /* 0x0.d99d10fff */
+- 0.852359056469, /* 0x0.da3433fff */
+- 0.854668736446, /* 0x0.dacb91fff */
+- 0.856986224651, /* 0x0.db6373000 */
+- 0.859309315673, /* 0x0.dbfbb1fff */
+- 0.861639738080, /* 0x0.dc946bfff */
+- 0.863975346095, /* 0x0.dd2d7d000 */
+- 0.866317391394, /* 0x0.ddc6f9fff */
+- 0.868666708472, /* 0x0.de60f1000 */
+- 0.871022939695, /* 0x0.defb5c000 */
+- 0.873383641229, /* 0x0.df9611fff */
+- 0.875751554968, /* 0x0.e03141000 */
+- 0.878126025200, /* 0x0.e0ccde000 */
+- 0.880506813521, /* 0x0.e168e4fff */
+- 0.882894217966, /* 0x0.e2055afff */
+- 0.885287821299, /* 0x0.e2a239000 */
+- 0.887686729423, /* 0x0.e33f6ffff */
+- 0.890096127973, /* 0x0.e3dd56fff */
+- 0.892507970338, /* 0x0.e47b67000 */
+- 0.894928157336, /* 0x0.e51a03000 */
+- 0.897355020043, /* 0x0.e5b90efff */
+- 0.899788379682, /* 0x0.e65888000 */
+- 0.902227103705, /* 0x0.e6f85afff */
+- 0.904673457151, /* 0x0.e798ae000 */
+- 0.907128036008, /* 0x0.e8398afff */
+- 0.909585535528, /* 0x0.e8da99000 */
+- 0.912051796915, /* 0x0.e97c3a000 */
+- 0.914524436003, /* 0x0.ea1e46000 */
+- 0.917003571999, /* 0x0.eac0bf000 */
+- 0.919490039339, /* 0x0.eb63b2fff */
+- 0.921983361257, /* 0x0.ec071a000 */
+- 0.924488604054, /* 0x0.ecab48fff */
+- 0.926989555360, /* 0x0.ed4f30000 */
+- 0.929502844812, /* 0x0.edf3e6000 */
+- 0.932021975503, /* 0x0.ee98fdfff */
+- 0.934553921208, /* 0x0.ef3eecfff */
+- 0.937083780759, /* 0x0.efe4b8fff */
+- 0.939624726786, /* 0x0.f08b3f000 */
+- 0.942198514924, /* 0x0.f133ebfff */
+- 0.944726586343, /* 0x0.f1d99a000 */
+- 0.947287976728, /* 0x0.f28176fff */
+- 0.949856162070, /* 0x0.f329c5fff */
+- 0.952431440345, /* 0x0.f3d28bfff */
+- 0.955013573175, /* 0x0.f47bc5000 */
+- 0.957603693021, /* 0x0.f52584000 */
+- 0.960199773321, /* 0x0.f5cfa7000 */
+- 0.962801992906, /* 0x0.f67a31000 */
+- 0.965413510788, /* 0x0.f72556fff */
+- 0.968030691152, /* 0x0.f7d0dc000 */
+- 0.970655620084, /* 0x0.f87ce2fff */
+- 0.973290979849, /* 0x0.f92998fff */
+- 0.975926160805, /* 0x0.f9d64bfff */
+- 0.978571653370, /* 0x0.fa83ac000 */
+- 0.981225252139, /* 0x0.fb3193fff */
+- 0.983885228626, /* 0x0.fbdfe6fff */
+- 0.986552715296, /* 0x0.fc8eb7fff */
+- 0.989228487027, /* 0x0.fd3e14000 */
+- 0.991909801964, /* 0x0.fdedcd000 */
+- 0.994601726545, /* 0x0.fe9e38000 */
+- 0.997297704209, /* 0x0.ff4ee6fff */
+- 1.000000000000, /* 0x1.000000000 */
+- 1.002710938457, /* 0x1.00b1aa000 */
+- 1.005429744692, /* 0x1.0163d7ffe */
+- 1.008155703526, /* 0x1.02167dffe */
+- 1.010888457284, /* 0x1.02c995fff */
+- 1.013629436498, /* 0x1.037d38000 */
+- 1.016377568250, /* 0x1.043152000 */
+- 1.019134163841, /* 0x1.04e5f9ffe */
+- 1.021896362316, /* 0x1.059b00000 */
+- 1.024668931945, /* 0x1.0650b3ffe */
+- 1.027446627635, /* 0x1.0706be001 */
+- 1.030234098408, /* 0x1.07bd6bffe */
+- 1.033023953416, /* 0x1.087441ffe */
+- 1.035824656494, /* 0x1.092bce000 */
+- 1.038632392900, /* 0x1.09e3d0001 */
+- 1.041450142840, /* 0x1.0a9c79ffe */
+- 1.044273972530, /* 0x1.0b558a001 */
+- 1.047105550795, /* 0x1.0c0f1c001 */
+- 1.049944162390, /* 0x1.0cc924001 */
+- 1.052791833895, /* 0x1.0d83c4001 */
+- 1.055645227426, /* 0x1.0e3ec3fff */
+- 1.058507919326, /* 0x1.0efa60001 */
+- 1.061377286898, /* 0x1.0fb66bfff */
+- 1.064254641510, /* 0x1.1072fdffe */
+- 1.067140102389, /* 0x1.113018000 */
+- 1.070034146304, /* 0x1.11edc1fff */
+- 1.072937250162, /* 0x1.12ac04001 */
+- 1.075843691823, /* 0x1.136a7dfff */
+- 1.078760385496, /* 0x1.1429a3ffe */
+- 1.081685543070, /* 0x1.14e958000 */
+- 1.084618330005, /* 0x1.15a98c000 */
+- 1.087556362176, /* 0x1.166a18001 */
+- 1.090508937863, /* 0x1.172b98001 */
+- 1.093464612954, /* 0x1.17ed4bfff */
+- 1.096430182434, /* 0x1.18afa5ffe */
+- 1.099401354802, /* 0x1.19725e000 */
+- 1.102381587017, /* 0x1.1a35adfff */
+- 1.105370759965, /* 0x1.1af994000 */
+- 1.108367800686, /* 0x1.1bbdfdffe */
+- 1.111373305331, /* 0x1.1c82f6000 */
+- 1.114387035385, /* 0x1.1d4878001 */
+- 1.117408752440, /* 0x1.1e0e7ffff */
+- 1.120437502874, /* 0x1.1ed4fe000 */
+- 1.123474478729, /* 0x1.1f9c06000 */
+- 1.126521706601, /* 0x1.2063ba001 */
+- 1.129574775716, /* 0x1.212bd0001 */
+- 1.132638812065, /* 0x1.21f49e000 */
+- 1.135709524130, /* 0x1.22bddbffe */
+- 1.138789534565, /* 0x1.2387b5fff */
+- 1.141876101508, /* 0x1.2451fe000 */
+- 1.144971728301, /* 0x1.251cddffe */
+- 1.148077130296, /* 0x1.25e861ffe */
+- 1.151189923305, /* 0x1.26b462001 */
+- 1.154312610610, /* 0x1.278107ffe */
+- 1.157440662410, /* 0x1.284e08001 */
+- 1.160578370109, /* 0x1.291baa001 */
+- 1.163725256932, /* 0x1.29e9e6000 */
+- 1.166879892324, /* 0x1.2ab8a3ffe */
+- 1.170044302935, /* 0x1.2b8805fff */
+- 1.173205971694, /* 0x1.2c5739ffe */
+- 1.176397800428, /* 0x1.2d2867ffe */
+- 1.179586529747, /* 0x1.2df962001 */
+- 1.182784795737, /* 0x1.2ecafbffe */
+- 1.185991406414, /* 0x1.2f9d21ffe */
+- 1.189206838636, /* 0x1.306fdc001 */
+- 1.192430973067, /* 0x1.314328000 */
+- 1.195664167430, /* 0x1.32170c001 */
+- 1.198906540890, /* 0x1.32eb8a001 */
+- 1.202157497408, /* 0x1.33c098000 */
+- 1.205416083326, /* 0x1.349625fff */
+- 1.208683252332, /* 0x1.356c43fff */
+- 1.211961269402, /* 0x1.364318001 */
+- 1.215246438983, /* 0x1.371a64000 */
+- 1.218539118740, /* 0x1.37f22dffe */
+- 1.221847295770, /* 0x1.38cafc000 */
+- 1.225158572187, /* 0x1.39a3fdfff */
+- 1.228481650325, /* 0x1.3a7dc5ffe */
+- 1.231811761846, /* 0x1.3b5803fff */
+- 1.235149741144, /* 0x1.3c32c5ffe */
+- 1.238499879811, /* 0x1.3d0e53ffe */
+- 1.241858124726, /* 0x1.3dea69fff */
+- 1.245225191102, /* 0x1.3ec713fff */
+- 1.248601436624, /* 0x1.3fa458000 */
+- 1.251975655584, /* 0x1.40817a001 */
+- 1.255380749731, /* 0x1.4160a2001 */
+- 1.258783102010, /* 0x1.423f9bffe */
+- 1.262198328973, /* 0x1.431f6e000 */
+- 1.265619754780, /* 0x1.43ffa7fff */
+- 1.269052743928, /* 0x1.44e0a4001 */
+- 1.272490739830, /* 0x1.45c1f4000 */
+- 1.275942921659, /* 0x1.46a432001 */
+- 1.279397487615, /* 0x1.478697ffe */
+- 1.282870173427, /* 0x1.486a2dffe */
+- 1.286346316319, /* 0x1.494dfdffe */
+- 1.289836049094, /* 0x1.4a32b2001 */
+- 1.293333172770, /* 0x1.4b17e1ffe */
+- 1.296839594835, /* 0x1.4bfdadfff */
+- 1.300354957560, /* 0x1.4ce40fffe */
+- 1.303882122055, /* 0x1.4dcb38001 */
+- 1.307417988757, /* 0x1.4eb2f1ffe */
+- 1.310960650439, /* 0x1.4f9b1dfff */
+- 1.314516782746, /* 0x1.50842bfff */
+- 1.318079948424, /* 0x1.516daffff */
+- 1.321653246888, /* 0x1.5257de000 */
+- 1.325237751030, /* 0x1.5342c8001 */
+- 1.328829526907, /* 0x1.542e2c000 */
+- 1.332433700535, /* 0x1.551a5fffe */
+- 1.336045145966, /* 0x1.56070dffe */
+- 1.339667558645, /* 0x1.56f473ffe */
+- 1.343300342533, /* 0x1.57e287ffe */
+- 1.346941947961, /* 0x1.58d130001 */
+- 1.350594043714, /* 0x1.59c087ffe */
+- 1.354256033883, /* 0x1.5ab085fff */
+- 1.357932448365, /* 0x1.5ba175ffe */
+- 1.361609339707, /* 0x1.5c926dfff */
+- 1.365299344044, /* 0x1.5d8441ffe */
+- 1.369003057507, /* 0x1.5e76fc001 */
+- 1.372714757920, /* 0x1.5f6a3c000 */
+- 1.376437187179, /* 0x1.605e2fffe */
+- 1.380165219333, /* 0x1.615282001 */
+- 1.383909463864, /* 0x1.6247e3ffe */
+- 1.387661933907, /* 0x1.633dd0000 */
+- 1.391424179060, /* 0x1.64345fffe */
+- 1.395197510706, /* 0x1.652ba9fff */
+- 1.399006724329, /* 0x1.66254dffe */
+- 1.402773022651, /* 0x1.671c22000 */
+- 1.406576037403, /* 0x1.68155dfff */
+- 1.410389423392, /* 0x1.690f48001 */
+-};
+diff -purN glibc-org/sysdeps/ieee754/flt-32/w_exp2f.c glibc-2.26/sysdeps/ieee754/flt-32/w_exp2f.c
+--- glibc-org/sysdeps/ieee754/flt-32/w_exp2f.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/w_exp2f.c 2017-10-22 17:02:23.600967252 +0000
+@@ -0,0 +1 @@
++/* Not needed. */
+diff -purN glibc-org/sysdeps/ieee754/flt-32/w_expf.c glibc-2.26/sysdeps/ieee754/flt-32/w_expf.c
+--- glibc-org/sysdeps/ieee754/flt-32/w_expf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/w_expf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -0,0 +1 @@
++/* Not needed. */
+diff -purN glibc-org/sysdeps/ieee754/flt-32/w_expf_compat.c glibc-2.26/sysdeps/ieee754/flt-32/w_expf_compat.c
+--- glibc-org/sysdeps/ieee754/flt-32/w_expf_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/w_expf_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,34 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+-
+- 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>
+-
+-/* wrapper expf */
+-float
+-__expf (float x)
+-{
+- float z = __ieee754_expf (x);
+- if (__builtin_expect (!isfinite (z) || z == 0, 0)
+- && isfinite (x) && _LIB_VERSION != _IEEE_)
+- return __kernel_standard_f (x, x, 106 + !!signbit (x));
+-
+- return z;
+-}
+-hidden_def (__expf)
+-weak_alias (__expf, expf)
+diff -purN glibc-org/sysdeps/ieee754/flt-32/w_log2f.c glibc-2.26/sysdeps/ieee754/flt-32/w_log2f.c
+--- glibc-org/sysdeps/ieee754/flt-32/w_log2f.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/w_log2f.c 2017-10-22 17:02:23.600967252 +0000
+@@ -0,0 +1 @@
++/* Not needed. */
+diff -purN glibc-org/sysdeps/ieee754/flt-32/w_logf.c glibc-2.26/sysdeps/ieee754/flt-32/w_logf.c
+--- glibc-org/sysdeps/ieee754/flt-32/w_logf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/w_logf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -0,0 +1 @@
++/* Not needed. */
+diff -purN glibc-org/sysdeps/ieee754/flt-32/w_powf.c glibc-2.26/sysdeps/ieee754/flt-32/w_powf.c
+--- glibc-org/sysdeps/ieee754/flt-32/w_powf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/flt-32/w_powf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -0,0 +1 @@
++/* Not needed. */
+diff -purN glibc-org/sysdeps/ieee754/k_standard.c glibc-2.26/sysdeps/ieee754/k_standard.c
+--- glibc-org/sysdeps/ieee754/k_standard.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/k_standard.c 2017-10-22 17:02:23.600967252 +0000
+@@ -16,27 +16,30 @@ static char rcsid[] = "$NetBSD: k_standa
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
+ #include <errno.h>
+
+ #include <assert.h>
+
+-#ifndef _USE_WRITE
+-#include <stdio.h> /* fputs(), stderr */
+-#define WRITE2(u,v) fputs(u, stderr)
+-#else /* !defined(_USE_WRITE) */
+-#include <unistd.h> /* write */
+-#define WRITE2(u,v) write(2, u, v)
+-#undef fflush
+-#endif /* !defined(_USE_WRITE) */
++#if LIBM_SVID_COMPAT
++
++# ifndef _USE_WRITE
++# include <stdio.h> /* fputs(), stderr */
++# define WRITE2(u,v) fputs(u, stderr)
++# else /* !defined(_USE_WRITE) */
++# include <unistd.h> /* write */
++# define WRITE2(u,v) write(2, u, v)
++# undef fflush
++# endif /* !defined(_USE_WRITE) */
+
+ /* XXX gcc versions until now don't delay the 0.0/0.0 division until
+ runtime but produce NaN at compile time. This is wrong since the
+ exceptions are not set correctly. */
+-#if 0
++# if 0
+ static const double zero = 0.0; /* used as const */
+-#else
++# else
+ static double zero = 0.0; /* used as const */
+-#endif
++# endif
+
+ /*
+ * Standard conformance (non-IEEE) on exception cases.
+@@ -96,21 +99,21 @@ double
+ __kernel_standard(double x, double y, int type)
+ {
+ struct exception exc;
+-#ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */
+-#define HUGE_VAL inf
++# ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */
++# define HUGE_VAL inf
+ double inf = 0.0;
+
+ SET_HIGH_WORD(inf,0x7ff00000); /* set inf to infinite */
+-#endif
++# endif
+
+ /* The SVID struct exception uses a field "char *name;". */
+-#define CSTR(func) ((char *) (type < 100 \
++# define CSTR(func) ((char *) (type < 100 \
+ ? func \
+ : (type < 200 ? func "f" : func "l")))
+
+-#ifdef _USE_WRITE
++# ifdef _USE_WRITE
+ (void) fflush(stdout);
+-#endif
++# endif
+ exc.arg1 = x;
+ exc.arg2 = y;
+ switch(type) {
+@@ -938,6 +941,10 @@ __kernel_standard(double x, double y, in
+ break;
+
+ /* #### Last used is 50/150/250 ### */
++
++ default:
++ __builtin_unreachable ();
+ }
+ return exc.retval;
+ }
++#endif
+diff -purN glibc-org/sysdeps/ieee754/k_standardf.c glibc-2.26/sysdeps/ieee754/k_standardf.c
+--- glibc-org/sysdeps/ieee754/k_standardf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/k_standardf.c 2017-10-22 17:02:23.600967252 +0000
+@@ -18,8 +18,10 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
+
+
++#if LIBM_SVID_COMPAT
+ /* Handle errors for a libm function as specified by TYPE (see
+ comments in k_standard.c for details), with arguments X and Y,
+ returning the appropriate return value for that function. */
+@@ -29,3 +31,4 @@ __kernel_standard_f (float x, float y, i
+ {
+ return __kernel_standard (x, y, type);
+ }
++#endif
+diff -purN glibc-org/sysdeps/ieee754/k_standardl.c glibc-2.26/sysdeps/ieee754/k_standardl.c
+--- glibc-org/sysdeps/ieee754/k_standardl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/k_standardl.c 2017-10-22 17:02:23.600967252 +0000
+@@ -32,11 +32,14 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <math-svid-compat.h>
+ #include <fenv.h>
+ #include <float.h>
+ #include <errno.h>
+
+
++#if LIBM_SVID_COMPAT
++
+ static double zero = 0.0;
+
+ /* Handle errors for a libm function as specified by TYPE (see
+@@ -105,3 +108,4 @@ __kernel_standard_l (long double x, long
+ return __kernel_standard (dx, dy, type);
+ }
+ }
++#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/bits/floatn.h glibc-2.26/sysdeps/ieee754/ldbl-128/bits/floatn.h
+--- glibc-org/sysdeps/ieee754/ldbl-128/bits/floatn.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/bits/floatn.h 2017-10-22 17:02:23.600967252 +0000
+@@ -0,0 +1,82 @@
++/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _BITS_FLOATN_H
++#define _BITS_FLOATN_H
++
++#include <features.h>
++#include <bits/long-double.h>
++
++/* Defined to 1 if the current compiler invocation provides a
++ floating-point type with the IEEE 754 binary128 format, and this
++ glibc includes corresponding *f128 interfaces for it. */
++#ifndef __NO_LONG_DOUBLE_MATH
++# define __HAVE_FLOAT128 1
++#else
++/* glibc does not support _Float128 for platforms where long double is
++ normally binary128 when building with long double as binary64.
++ GCC's default for supported scalar modes does not support it either
++ in that case. */
++# define __HAVE_FLOAT128 0
++#endif
++
++/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
++ from the default float, double and long double types in this glibc. */
++#define __HAVE_DISTINCT_FLOAT128 0
++
++/* Defined to concatenate the literal suffix to be used with _Float128
++ types, if __HAVE_FLOAT128 is 1. */
++#if __HAVE_FLOAT128
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++/* The literal suffix f128 exists only since GCC 7.0. */
++# define __f128(x) x##l
++# else
++# define __f128(x) x##f128
++# endif
++#endif
++
++/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
++#if __HAVE_FLOAT128
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++# define __CFLOAT128 _Complex long double
++# else
++# define __CFLOAT128 _Complex _Float128
++# endif
++#endif
++
++/* The remaining of this file provides support for older compilers. */
++#if __HAVE_FLOAT128
++
++/* The type _Float128 exists only since GCC 7.0. */
++# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
++typedef long double _Float128;
++# endif
++
++/* Various built-in functions do not exist before GCC 7.0. */
++# if !__GNUC_PREREQ (7, 0)
++# define __builtin_huge_valf128() (__builtin_huge_vall ())
++# define __builtin_inff128() (__builtin_infl ())
++# define __builtin_nanf128(x) (__builtin_nanl (x))
++# define __builtin_nansf128(x) (__builtin_nansl (x))
++# endif
++
++#endif
++
++#include <bits/floatn-common.h>
++
++#endif /* _BITS_FLOATN_H */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_acoshl.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_acoshl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_acoshl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_acoshl.c 2017-10-22 17:02:23.600967252 +0000
+@@ -38,7 +38,7 @@ _Float128
+ __ieee754_acoshl(_Float128 x)
+ {
+ _Float128 t;
+- u_int64_t lx;
++ uint64_t lx;
+ int64_t hx;
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ if(hx<0x3fff000000000000LL) { /* x < 1 */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_atan2l.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_atan2l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_atan2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_atan2l.c 2017-10-22 17:02:23.600967252 +0000
+@@ -56,7 +56,7 @@ __ieee754_atan2l(_Float128 y, _Float128
+ {
+ _Float128 z;
+ int64_t k,m,hx,hy,ix,iy;
+- u_int64_t lx,ly;
++ uint64_t lx,ly;
+
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ ix = hx&0x7fffffffffffffffLL;
+@@ -109,7 +109,7 @@ __ieee754_atan2l(_Float128 y, _Float128
+ switch (m) {
+ case 0: return z ; /* atan(+,+) */
+ case 1: {
+- u_int64_t zh;
++ uint64_t zh;
+ GET_LDOUBLE_MSW64(zh,z);
+ SET_LDOUBLE_MSW64(z,zh ^ 0x8000000000000000ULL);
+ }
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_atanhl.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_atanhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_atanhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_atanhl.c 2017-10-22 17:02:23.600967252 +0000
+@@ -44,7 +44,7 @@ _Float128
+ __ieee754_atanhl(_Float128 x)
+ {
+ _Float128 t;
+- u_int32_t jx, ix;
++ uint32_t jx, ix;
+ ieee854_long_double_shape_type u;
+
+ u.value = x;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_fmodl.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_fmodl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_fmodl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_fmodl.c 2017-10-22 17:02:23.600967252 +0000
+@@ -27,7 +27,7 @@ _Float128
+ __ieee754_fmodl (_Float128 x, _Float128 y)
+ {
+ int64_t n,hx,hy,hz,ix,iy,sx,i;
+- u_int64_t lx,ly,lz;
++ uint64_t lx,ly,lz;
+
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ GET_LDOUBLE_WORDS64(hy,ly,y);
+@@ -42,7 +42,7 @@ __ieee754_fmodl (_Float128 x, _Float128
+ if(hx<=hy) {
+ if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */
+ if(lx==ly)
+- return Zero[(u_int64_t)sx>>63]; /* |x|=|y| return x*0*/
++ return Zero[(uint64_t)sx>>63]; /* |x|=|y| return x*0*/
+ }
+
+ /* determine ix = ilogb(x) */
+@@ -96,7 +96,7 @@ __ieee754_fmodl (_Float128 x, _Float128
+ if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;}
+ else {
+ if((hz|lz)==0) /* return sign(x)*0 */
+- return Zero[(u_int64_t)sx>>63];
++ return Zero[(uint64_t)sx>>63];
+ hx = hz+hz+(lz>>63); lx = lz+lz;
+ }
+ }
+@@ -105,7 +105,7 @@ __ieee754_fmodl (_Float128 x, _Float128
+
+ /* convert back to floating value and restore the sign */
+ if((hx|lx)==0) /* return sign(x)*0 */
+- return Zero[(u_int64_t)sx>>63];
++ return Zero[(uint64_t)sx>>63];
+ while(hx<0x0001000000000000LL) { /* normalize x */
+ hx = hx+hx+(lx>>63); lx = lx+lx;
+ iy -= 1;
+@@ -116,7 +116,7 @@ __ieee754_fmodl (_Float128 x, _Float128
+ } else { /* subnormal output */
+ n = -16382 - iy;
+ if(n<=48) {
+- lx = (lx>>n)|((u_int64_t)hx<<(64-n));
++ lx = (lx>>n)|((uint64_t)hx<<(64-n));
+ hx >>= n;
+ } else if (n<=63) {
+ lx = (hx<<(64-n))|(lx>>n); hx = sx;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_gammal_r.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_gammal_r.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_gammal_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_gammal_r.c 2017-10-22 17:02:23.600967252 +0000
+@@ -123,7 +123,7 @@ _Float128
+ __ieee754_gammal_r (_Float128 x, int *signgamp)
+ {
+ int64_t hx;
+- u_int64_t lx;
++ uint64_t lx;
+ _Float128 ret;
+
+ GET_LDOUBLE_WORDS64 (hx, lx, x);
+@@ -134,7 +134,7 @@ __ieee754_gammal_r (_Float128 x, int *si
+ *signgamp = 0;
+ return 1.0 / x;
+ }
+- if (hx < 0 && (u_int64_t) hx < 0xffff000000000000ULL && __rintl (x) == x)
++ if (hx < 0 && (uint64_t) hx < 0xffff000000000000ULL && __rintl (x) == x)
+ {
+ /* Return value for integer x < 0 is NaN with invalid exception. */
+ *signgamp = 0;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_hypotl.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_hypotl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_hypotl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_hypotl.c 2017-10-22 17:02:23.600967252 +0000
+@@ -65,7 +65,7 @@ __ieee754_hypotl(_Float128 x, _Float128
+ k=0;
+ if(ha > 0x5f3f000000000000LL) { /* a>2**8000 */
+ if(ha >= 0x7fff000000000000LL) { /* Inf or NaN */
+- u_int64_t low;
++ uint64_t low;
+ w = a+b; /* for sNaN */
+ if (issignaling (a) || issignaling (b))
+ return w;
+@@ -83,7 +83,7 @@ __ieee754_hypotl(_Float128 x, _Float128
+ }
+ if(hb < 0x20bf000000000000LL) { /* b < 2**-8000 */
+ if(hb <= 0x0000ffffffffffffLL) { /* subnormal b or 0 */
+- u_int64_t low;
++ uint64_t low;
+ GET_LDOUBLE_LSW64(low,b);
+ if((hb|low)==0) return a;
+ t1=0;
+@@ -128,7 +128,7 @@ __ieee754_hypotl(_Float128 x, _Float128
+ w = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b)));
+ }
+ if(k!=0) {
+- u_int64_t high;
++ uint64_t high;
+ t1 = 1;
+ GET_LDOUBLE_MSW64(high,t1);
+ SET_LDOUBLE_MSW64(t1,high+(k<<48));
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_jnl.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_jnl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_jnl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_jnl.c 2017-10-22 17:02:23.600967252 +0000
+@@ -71,7 +71,7 @@ static const _Float128
+ _Float128
+ __ieee754_jnl (int n, _Float128 x)
+ {
+- u_int32_t se;
++ uint32_t se;
+ int32_t i, ix, sgn;
+ _Float128 a, b, temp, di, ret;
+ _Float128 z, w;
+@@ -309,7 +309,7 @@ strong_alias (__ieee754_jnl, __jnl_finit
+ _Float128
+ __ieee754_ynl (int n, _Float128 x)
+ {
+- u_int32_t se;
++ uint32_t se;
+ int32_t i, ix;
+ int32_t sign;
+ _Float128 a, b, temp, ret;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_lgammal_r.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_lgammal_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_lgammal_r.c 2017-10-22 17:02:23.601967252 +0000
+@@ -73,11 +73,7 @@
+ #include <float.h>
+
+ static const _Float128 PIL = L(3.1415926535897932384626433832795028841972E0);
+-#if LDBL_MANT_DIG == 106
+-static const _Float128 MAXLGM = L(0x5.d53649e2d469dbc1f01e99fd66p+1012);
+-#else
+ static const _Float128 MAXLGM = L(1.0485738685148938358098967157129705071571E4928);
+-#endif
+ static const _Float128 one = 1;
+ static const _Float128 huge = LDBL_MAX;
+
+@@ -777,12 +773,12 @@ __ieee754_lgammal_r (_Float128 x, int *s
+
+ if (x < 0)
+ {
+- if (x < -2 && x > (LDBL_MANT_DIG == 106 ? -48 : -50))
++ if (x < -2 && x > -50)
+ return __lgamma_negl (x, signgamp);
+ q = -x;
+ p = __floorl (q);
+ if (p == q)
+- return (one / __fabsl (p - p));
++ return (one / fabsl (p - p));
+ _Float128 halfp = p * L(0.5);
+ if (halfp == __floorl (halfp))
+ *signgamp = -1;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_log10l.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_log10l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_log10l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_log10l.c 2017-10-22 17:02:23.601967252 +0000
+@@ -187,7 +187,7 @@ __ieee754_log10l (_Float128 x)
+ /* Test for domain */
+ GET_LDOUBLE_WORDS64 (hx, lx, x);
+ if (((hx & 0x7fffffffffffffffLL) | lx) == 0)
+- return (-1 / __fabsl (x)); /* log10l(+-0)=-inf */
++ return (-1 / fabsl (x)); /* log10l(+-0)=-inf */
+ if (hx < 0)
+ return (x - x) / (x - x);
+ if (hx >= 0x7fff000000000000LL)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_log2l.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_log2l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_log2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_log2l.c 2017-10-22 17:02:23.601967252 +0000
+@@ -181,7 +181,7 @@ __ieee754_log2l (_Float128 x)
+ /* Test for domain */
+ GET_LDOUBLE_WORDS64 (hx, lx, x);
+ if (((hx & 0x7fffffffffffffffLL) | lx) == 0)
+- return (-1 / __fabsl (x)); /* log2l(+-0)=-inf */
++ return (-1 / fabsl (x)); /* log2l(+-0)=-inf */
+ if (hx < 0)
+ return (x - x) / (x - x);
+ if (hx >= 0x7fff000000000000LL)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_powl.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_powl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_powl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_powl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -151,7 +151,7 @@ __ieee754_powl (_Float128 x, _Float128 y
+ _Float128 y1, t1, t2, r, s, sgn, t, u, v, w;
+ _Float128 s2, s_h, s_l, t_h, t_l, ay;
+ int32_t i, j, k, yisint, n;
+- u_int32_t ix, iy;
++ uint32_t ix, iy;
+ int32_t hx, hy;
+ ieee854_long_double_shape_type o, p, q;
+
+@@ -260,12 +260,12 @@ __ieee754_powl (_Float128 x, _Float128 y
+ }
+
+ /* (x<0)**(non-int) is NaN */
+- if (((((u_int32_t) hx >> 31) - 1) | yisint) == 0)
++ if (((((uint32_t) hx >> 31) - 1) | yisint) == 0)
+ return (x - x) / (x - x);
+
+ /* sgn (sign of result -ve**odd) = -1 else = 1 */
+ sgn = one;
+- if (((((u_int32_t) hx >> 31) - 1) | (yisint - 1)) == 0)
++ if (((((uint32_t) hx >> 31) - 1) | (yisint - 1)) == 0)
+ sgn = -one; /* (-ve)**(odd int) */
+
+ /* |y| is huge.
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_remainderl.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_remainderl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_remainderl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_remainderl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -31,7 +31,7 @@ _Float128
+ __ieee754_remainderl(_Float128 x, _Float128 p)
+ {
+ int64_t hx,hp;
+- u_int64_t sx,lx,lp;
++ uint64_t sx,lx,lp;
+ _Float128 p_half;
+
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_rem_pio2l.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_rem_pio2l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_rem_pio2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_rem_pio2l.c 2017-10-22 17:02:23.601967252 +0000
+@@ -198,7 +198,7 @@ int32_t __ieee754_rem_pio2l(_Float128 x,
+ _Float128 z, w, t;
+ double tx[8];
+ int64_t exp, n, ix, hx;
+- u_int64_t lx;
++ uint64_t lx;
+
+ GET_LDOUBLE_WORDS64 (hx, lx, x);
+ ix = hx & 0x7fffffffffffffffLL;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/e_sinhl.c glibc-2.26/sysdeps/ieee754/ldbl-128/e_sinhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/e_sinhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/e_sinhl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -64,7 +64,7 @@ _Float128
+ __ieee754_sinhl (_Float128 x)
+ {
+ _Float128 t, w, h;
+- u_int32_t jx, ix;
++ uint32_t jx, ix;
+ ieee854_long_double_shape_type u;
+
+ /* Words of |x|. */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/float128-abi.h glibc-2.26/sysdeps/ieee754/ldbl-128/float128-abi.h
+--- glibc-org/sysdeps/ieee754/ldbl-128/float128-abi.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/float128-abi.h 2017-10-22 17:02:23.601967252 +0000
+@@ -0,0 +1,2 @@
++/* ABI version for _Float128 ABI introduction. */
++#define FLOAT128_VERSION GLIBC_2.27
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/k_cosl.c glibc-2.26/sysdeps/ieee754/ldbl-128/k_cosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/k_cosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/k_cosl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -81,9 +81,9 @@ __kernel_cosl(_Float128 x, _Float128 y)
+ {
+ _Float128 h, l, z, sin_l, cos_l_m1;
+ int64_t ix;
+- u_int32_t tix, hix, index;
++ uint32_t tix, hix, index;
+ GET_LDOUBLE_MSW64 (ix, x);
+- tix = ((u_int64_t)ix) >> 32;
++ tix = ((uint64_t)ix) >> 32;
+ tix &= ~0x80000000; /* tix = |x|'s high 32 bits */
+ if (tix < 0x3ffc3000) /* |x| < 0.1484375 */
+ {
+@@ -118,7 +118,7 @@ __kernel_cosl(_Float128 x, _Float128 y)
+ case 2: index = (hix - 0x3ffc3000) >> 10; break;
+ }
+
+- SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0);
++ SET_LDOUBLE_WORDS64(h, ((uint64_t)hix) << 32, 0);
+ l = y - (h - x);
+ z = l * l;
+ sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5)))));
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/k_sincosl.c glibc-2.26/sysdeps/ieee754/ldbl-128/k_sincosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/k_sincosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/k_sincosl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -101,9 +101,9 @@ __kernel_sincosl(_Float128 x, _Float128
+ {
+ _Float128 h, l, z, sin_l, cos_l_m1;
+ int64_t ix;
+- u_int32_t tix, hix, index;
++ uint32_t tix, hix, index;
+ GET_LDOUBLE_MSW64 (ix, x);
+- tix = ((u_int64_t)ix) >> 32;
++ tix = ((uint64_t)ix) >> 32;
+ tix &= ~0x80000000; /* tix = |x|'s high 32 bits */
+ if (tix < 0x3ffc3000) /* |x| < 0.1484375 */
+ {
+@@ -149,7 +149,7 @@ __kernel_sincosl(_Float128 x, _Float128
+ case 2: index = (hix - 0x3ffc3000) >> 10; break;
+ }
+
+- SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0);
++ SET_LDOUBLE_WORDS64(h, ((uint64_t)hix) << 32, 0);
+ if (iy)
+ l = y - (h - x);
+ else
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/k_sinl.c glibc-2.26/sysdeps/ieee754/ldbl-128/k_sinl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/k_sinl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/k_sinl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -82,9 +82,9 @@ __kernel_sinl(_Float128 x, _Float128 y,
+ {
+ _Float128 h, l, z, sin_l, cos_l_m1;
+ int64_t ix;
+- u_int32_t tix, hix, index;
++ uint32_t tix, hix, index;
+ GET_LDOUBLE_MSW64 (ix, x);
+- tix = ((u_int64_t)ix) >> 32;
++ tix = ((uint64_t)ix) >> 32;
+ tix &= ~0x80000000; /* tix = |x|'s high 32 bits */
+ if (tix < 0x3ffc3000) /* |x| < 0.1484375 */
+ {
+@@ -118,7 +118,7 @@ __kernel_sinl(_Float128 x, _Float128 y,
+ case 2: index = (hix - 0x3ffc3000) >> 10; break;
+ }
+
+- SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0);
++ SET_LDOUBLE_WORDS64(h, ((uint64_t)hix) << 32, 0);
+ if (iy)
+ l = (ix < 0 ? -y : y) - (h - x);
+ else
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/Makeconfig glibc-2.26/sysdeps/ieee754/ldbl-128/Makeconfig
+--- glibc-org/sysdeps/ieee754/ldbl-128/Makeconfig 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/Makeconfig 2017-10-22 17:02:23.600967252 +0000
+@@ -0,0 +1,3 @@
++# Include this earlier so it can be used earlier in Makefiles,
++# and sysdep/ makefiles.
++float128-alias-fcts = yes
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_asinhl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_asinhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_asinhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_asinhl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -32,6 +32,7 @@ static char rcsid[] = "$NetBSD: $";
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const _Float128
+ one = 1,
+@@ -76,4 +77,4 @@ __asinhl (_Float128 x)
+ else
+ return w;
+ }
+-weak_alias (__asinhl, asinhl)
++libm_alias_ldouble (__asinh, asinh)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_atanl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_atanl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_atanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_atanl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -62,6 +62,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ /* arctan(k/8), k = 0, ..., 82 */
+ static const _Float128 atantbl[84] = {
+@@ -250,4 +251,4 @@ __atanl (_Float128 x)
+ return u;
+ }
+
+-weak_alias (__atanl, atanl)
++libm_alias_ldouble (__atan, atan)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_cbrtl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_cbrtl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_cbrtl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_cbrtl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -56,6 +56,7 @@ Adapted for glibc October, 2001.
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const _Float128 CBRT2 = L(1.259921049894873164767210607278228350570251);
+ static const _Float128 CBRT4 = L(1.587401051968199474751705639272308260391493);
+@@ -132,4 +133,4 @@ __cbrtl (_Float128 x)
+ return (x);
+ }
+
+-weak_alias (__cbrtl, cbrtl)
++libm_alias_ldouble (__cbrt, cbrt)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_ceill.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_ceill.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_ceill.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_ceill.c 2017-10-22 17:02:23.601967252 +0000
+@@ -26,11 +26,12 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128 __ceill(_Float128 x)
+ {
+ int64_t i0,i1,j0;
+- u_int64_t i,j;
++ uint64_t i,j;
+ GET_LDOUBLE_WORDS64(i0,i1,x);
+ j0 = ((i0>>48)&0x7fff)-0x3fff;
+ if(j0<48) {
+@@ -63,4 +64,4 @@ _Float128 __ceill(_Float128 x)
+ SET_LDOUBLE_WORDS64(x,i0,i1);
+ return x;
+ }
+-weak_alias (__ceill, ceill)
++libm_alias_ldouble (__ceil, ceil)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_copysignl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_copysignl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_copysignl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_copysignl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -25,14 +25,15 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128 __copysignl(_Float128 x, _Float128 y)
+ {
+- u_int64_t hx,hy;
++ uint64_t hx,hy;
+ GET_LDOUBLE_MSW64(hx,x);
+ GET_LDOUBLE_MSW64(hy,y);
+ SET_LDOUBLE_MSW64(x,(hx&0x7fffffffffffffffULL)
+ |(hy&0x8000000000000000ULL));
+ return x;
+ }
+-weak_alias (__copysignl, copysignl)
++libm_alias_ldouble (__copysign, copysign)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_cosl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_cosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_cosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_cosl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -47,6 +47,7 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128 __cosl(_Float128 x)
+ {
+@@ -83,4 +84,4 @@ _Float128 __cosl(_Float128 x)
+ }
+ }
+ }
+-weak_alias (__cosl, cosl)
++libm_alias_ldouble (__cos, cos)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_erfl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_erfl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_erfl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_erfl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -100,6 +100,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ /* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
+
+@@ -803,7 +804,7 @@ __erfl (_Float128 x)
+ return( y );
+ }
+
+-weak_alias (__erfl, erfl)
++libm_alias_ldouble (__erf, erf)
+ _Float128
+ __erfcl (_Float128 x)
+ {
+@@ -819,7 +820,7 @@ __erfcl (_Float128 x)
+ if (ix >= 0x7fff0000)
+ { /* erfc(nan)=nan */
+ /* erfc(+-inf)=0,2 */
+- return (_Float128) (((u_int32_t) sign >> 31) << 1) + one / x;
++ return (_Float128) (((uint32_t) sign >> 31) << 1) + one / x;
+ }
+
+ if (ix < 0x3ffd0000) /* |x| <1/4 */
+@@ -945,4 +946,4 @@ __erfcl (_Float128 x)
+ }
+ }
+
+-weak_alias (__erfcl, erfcl)
++libm_alias_ldouble (__erfc, erfc)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_expm1l.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_expm1l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_expm1l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_expm1l.c 2017-10-22 17:02:23.601967252 +0000
+@@ -57,6 +57,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ /* exp(x) - 1 = x + 0.5 x^2 + x^3 P(x)/Q(x)
+ -.5 ln 2 < x < .5 ln 2
+@@ -163,4 +164,4 @@ __expm1l (_Float128 x)
+ return x;
+ }
+ libm_hidden_def (__expm1l)
+-weak_alias (__expm1l, expm1l)
++libm_alias_ldouble (__expm1, expm1)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_fabsl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_fabsl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_fabsl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_fabsl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -23,12 +23,13 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128 __fabsl(_Float128 x)
+ {
+- u_int64_t hx;
++ uint64_t hx;
+ GET_LDOUBLE_MSW64(hx,x);
+ SET_LDOUBLE_MSW64(x,hx&0x7fffffffffffffffLL);
+ return x;
+ }
+-weak_alias (__fabsl, fabsl)
++libm_alias_ldouble (__fabs, fabs)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_finitel.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_finitel.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_finitel.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_finitel.c 2017-10-22 17:02:23.601967252 +0000
+@@ -29,8 +29,8 @@ int __finitel(_Float128 x)
+ {
+ int64_t hx;
+ GET_LDOUBLE_MSW64(hx,x);
+- return (int)((u_int64_t)((hx&0x7fff000000000000LL)
+- -0x7fff000000000000LL)>>63);
++ return (int)((uint64_t)((hx&0x7fff000000000000LL)
++ -0x7fff000000000000LL)>>63);
+ }
+ mathx_hidden_def (__finitel)
+ weak_alias (__finitel, finitel)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_floorl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_floorl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_floorl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_floorl.c 2017-10-22 17:02:23.601967252 +0000
+@@ -26,11 +26,12 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128 __floorl(_Float128 x)
+ {
+ int64_t i0,i1,j0;
+- u_int64_t i,j;
++ uint64_t i,j;
+ GET_LDOUBLE_WORDS64(i0,i1,x);
+ j0 = ((i0>>48)&0x7fff)-0x3fff;
+ if(j0<48) {
+@@ -64,4 +65,4 @@ _Float128 __floorl(_Float128 x)
+ SET_LDOUBLE_WORDS64(x,i0,i1);
+ return x;
+ }
+-weak_alias (__floorl, floorl)
++libm_alias_ldouble (__floor, floor)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_fma.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_fma.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_fma.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_fma.c 2017-10-22 17:02:23.601967252 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+ #include <fenv.h>
+ #include <ieee754.h>
++#include <libm-alias-double.h>
+
+ /* This implementation relies on long double being more than twice as
+ precise as double and uses rounding to odd in order to avoid problems
+@@ -51,5 +52,5 @@ __fma (double x, double y, double z)
+ return (double) u.d;
+ }
+ #ifndef __fma
+-weak_alias (__fma, fma)
++libm_alias_double (__fma, fma)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_fmal.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_fmal.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_fmal.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_fmal.c 2017-10-22 17:02:23.602967252 +0000
+@@ -22,6 +22,7 @@
+ #include <fenv.h>
+ #include <ieee754.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <tininess.h>
+
+ /* This implementation uses rounding to odd to avoid problems with
+@@ -295,4 +296,4 @@ __fmal (_Float128 x, _Float128 y, _Float
+ return v.d * L(0x1p-228);
+ }
+ }
+-weak_alias (__fmal, fmal)
++libm_alias_ldouble (__fma, fma)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_fpclassifyl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_fpclassifyl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_fpclassifyl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_fpclassifyl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -26,7 +26,7 @@
+ int
+ __fpclassifyl (_Float128 x)
+ {
+- u_int64_t hx, lx;
++ uint64_t hx, lx;
+ int retval = FP_NORMAL;
+
+ GET_LDOUBLE_WORDS64 (hx, lx, x);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_frexpl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_frexpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_frexpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_frexpl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -29,13 +29,14 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const _Float128
+ two114 = L(2.0769187434139310514121985316880384E+34); /* 0x4071000000000000, 0 */
+
+ _Float128 __frexpl(_Float128 x, int *eptr)
+ {
+- u_int64_t hx, lx, ix;
++ uint64_t hx, lx, ix;
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ ix = 0x7fffffffffffffffULL&hx;
+ *eptr = 0;
+@@ -51,4 +52,4 @@ _Float128 __frexpl(_Float128 x, int *ept
+ SET_LDOUBLE_MSW64(x,hx);
+ return x;
+ }
+-weak_alias (__frexpl, frexpl)
++libm_alias_ldouble (__frexp, frexp)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_fromfpl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_fromfpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_fromfpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_fromfpl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 0
+-#define FUNC fromfpl
++#define FUNC __fromfpl
+ #include <s_fromfpl_main.c>
++libm_alias_ldouble (__fromfp, fromfp)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_fromfpl_main.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_fromfpl_main.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_fromfpl_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_fromfpl_main.c 2017-10-22 17:02:23.602967252 +0000
+@@ -20,6 +20,7 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <stdbool.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_fromfpxl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_fromfpxl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_fromfpxl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_fromfpxl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 1
+-#define FUNC fromfpxl
++#define FUNC __fromfpxl
+ #include <s_fromfpl_main.c>
++libm_alias_ldouble (__fromfpx, fromfpx)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_getpayloadl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_getpayloadl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_getpayloadl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_getpayloadl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -18,10 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <stdint.h>
+
+ _Float128
+-getpayloadl (const _Float128 *x)
++__getpayloadl (const _Float128 *x)
+ {
+ uint64_t hx, lx;
+ GET_LDOUBLE_WORDS64 (hx, lx, *x);
+@@ -55,3 +56,4 @@ getpayloadl (const _Float128 *x)
+ SET_LDOUBLE_WORDS64 (ret, hx, lx);
+ return ret;
+ }
++libm_alias_ldouble (__getpayload, getpayload)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_isnanl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_isnanl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_isnanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_isnanl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -30,9 +30,9 @@ int __isnanl(_Float128 x)
+ int64_t hx,lx;
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ hx &= 0x7fffffffffffffffLL;
+- hx |= (u_int64_t)(lx|(-lx))>>63;
++ hx |= (uint64_t)(lx|(-lx))>>63;
+ hx = 0x7fff000000000000LL - hx;
+- return (int)((u_int64_t)hx>>63);
++ return (int)((uint64_t)hx>>63);
+ }
+ mathx_hidden_def (__isnanl)
+ weak_alias (__isnanl, isnanl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_issignalingl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_issignalingl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_issignalingl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_issignalingl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -23,7 +23,7 @@
+ int
+ __issignalingl (_Float128 x)
+ {
+- u_int64_t hxi, lxi __attribute__ ((unused));
++ uint64_t hxi, lxi __attribute__ ((unused));
+ GET_LDOUBLE_WORDS64 (hxi, lxi, x);
+ #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+ /* We only have to care about the high-order bit of x's significand, because
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_llrintl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_llrintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_llrintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_llrintl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -24,6 +24,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+ static const _Float128 two112[2] =
+@@ -36,7 +37,7 @@ long long int
+ __llrintl (_Float128 x)
+ {
+ int32_t j0;
+- u_int64_t i0,i1;
++ uint64_t i0,i1;
+ _Float128 w;
+ _Float128 t;
+ long long int result;
+@@ -105,4 +106,4 @@ __llrintl (_Float128 x)
+ return sx ? -result : result;
+ }
+
+-weak_alias (__llrintl, llrintl)
++libm_alias_ldouble (__llrint, llrint)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_llroundl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_llroundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_llroundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_llroundl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -23,13 +23,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+ long long int
+ __llroundl (_Float128 x)
+ {
+ int64_t j0;
+- u_int64_t i1, i0;
++ uint64_t i1, i0;
+ long long int result;
+ int sign;
+
+@@ -55,7 +56,7 @@ __llroundl (_Float128 x)
+ result = ((long long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
+ else
+ {
+- u_int64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
++ uint64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
+ if (j < i1)
+ ++i0;
+
+@@ -99,4 +100,4 @@ __llroundl (_Float128 x)
+ return sign * result;
+ }
+
+-weak_alias (__llroundl, llroundl)
++libm_alias_ldouble (__llround, llround)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_logbl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_logbl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_logbl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_logbl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -25,6 +25,7 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128
+ __logbl (_Float128 x)
+@@ -51,4 +52,4 @@ __logbl (_Float128 x)
+ return (_Float128) (ex - 16383);
+ }
+
+-weak_alias (__logbl, logbl)
++libm_alias_ldouble (__logb, logb)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_lrintl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_lrintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_lrintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_lrintl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -24,6 +24,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+ static const _Float128 two112[2] =
+@@ -36,7 +37,7 @@ long int
+ __lrintl (_Float128 x)
+ {
+ int32_t j0;
+- u_int64_t i0,i1;
++ uint64_t i0,i1;
+ _Float128 w;
+ _Float128 t;
+ long int result;
+@@ -134,4 +135,4 @@ __lrintl (_Float128 x)
+ return sx ? -result : result;
+ }
+
+-weak_alias (__lrintl, lrintl)
++libm_alias_ldouble (__lrint, lrint)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_lroundl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_lroundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_lroundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_lroundl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -23,13 +23,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <fix-fp-int-convert-overflow.h>
+
+ long int
+ __lroundl (_Float128 x)
+ {
+ int64_t j0;
+- u_int64_t i1, i0;
++ uint64_t i1, i0;
+ long int result;
+ int sign;
+
+@@ -62,7 +63,7 @@ __lroundl (_Float128 x)
+ result = ((long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
+ else
+ {
+- u_int64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
++ uint64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
+ if (j < i1)
+ ++i0;
+
+@@ -110,4 +111,4 @@ __lroundl (_Float128 x)
+ return sign * result;
+ }
+
+-weak_alias (__lroundl, lroundl)
++libm_alias_ldouble (__lround, lround)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_modfl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_modfl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_modfl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_modfl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -29,13 +29,14 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const _Float128 one = 1.0;
+
+ _Float128 __modfl(_Float128 x, _Float128 *iptr)
+ {
+ int64_t i0,i1,j0;
+- u_int64_t i;
++ uint64_t i;
+ GET_LDOUBLE_WORDS64(i0,i1,x);
+ j0 = ((i0>>48)&0x7fff)-0x3fff; /* exponent of x */
+ if(j0<48) { /* integer part in high x */
+@@ -76,4 +77,4 @@ _Float128 __modfl(_Float128 x, _Float128
+ }
+ }
+ }
+-weak_alias (__modfl, modfl)
++libm_alias_ldouble (__modf, modf)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_nearbyintl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_nearbyintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_nearbyintl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -26,6 +26,7 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const _Float128
+ TWO112[2]={
+@@ -37,15 +38,15 @@ _Float128 __nearbyintl(_Float128 x)
+ {
+ fenv_t env;
+ int64_t i0,j0,sx;
+- u_int64_t i1 __attribute__ ((unused));
++ uint64_t i1 __attribute__ ((unused));
+ _Float128 w,t;
+ GET_LDOUBLE_WORDS64(i0,i1,x);
+- sx = (((u_int64_t)i0)>>63);
++ sx = (((uint64_t)i0)>>63);
+ j0 = ((i0>>48)&0x7fff)-0x3fff;
+ if(j0<112) {
+ if(j0<0) {
+ feholdexcept (&env);
+- w = TWO112[sx]+x;
++ w = TWO112[sx] + math_opt_barrier (x);
+ t = w-TWO112[sx];
+ math_force_eval (t);
+ fesetenv (&env);
+@@ -58,10 +59,10 @@ _Float128 __nearbyintl(_Float128 x)
+ else return x; /* x is integral */
+ }
+ feholdexcept (&env);
+- w = TWO112[sx]+x;
++ w = TWO112[sx] + math_opt_barrier (x);
+ t = w-TWO112[sx];
+ math_force_eval (t);
+ fesetenv (&env);
+ return t;
+ }
+-weak_alias (__nearbyintl, nearbyintl)
++libm_alias_ldouble (__nearbyint, nearbyint)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_nextafterl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_nextafterl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_nextafterl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_nextafterl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -27,11 +27,12 @@ static char rcsid[] = "$NetBSD: $";
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128 __nextafterl(_Float128 x, _Float128 y)
+ {
+ int64_t hx,hy,ix,iy;
+- u_int64_t lx,ly;
++ uint64_t lx,ly;
+
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ GET_LDOUBLE_WORDS64(hy,ly,y);
+@@ -81,6 +82,6 @@ _Float128 __nextafterl(_Float128 x, _Flo
+ SET_LDOUBLE_WORDS64(x,hx,lx);
+ return x;
+ }
+-weak_alias (__nextafterl, nextafterl)
++libm_alias_ldouble (__nextafter, nextafter)
+ strong_alias (__nextafterl, __nexttowardl)
+ weak_alias (__nextafterl, nexttowardl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_nexttoward.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_nexttoward.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_nexttoward.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_nexttoward.c 2017-10-22 17:02:23.602967252 +0000
+@@ -34,8 +34,8 @@ double __nexttoward(double x, long doubl
+ {
+ int32_t hx,ix;
+ int64_t hy,iy;
+- u_int32_t lx;
+- u_int64_t ly;
++ uint32_t lx;
++ uint64_t ly;
+
+ EXTRACT_WORDS(hx,lx,x);
+ GET_LDOUBLE_WORDS64(hy,ly,y);
+@@ -49,7 +49,7 @@ double __nexttoward(double x, long doubl
+ if((long double) x==y) return y; /* x=y, return y */
+ if((ix|lx)==0) { /* x == 0 */
+ double u;
+- INSERT_WORDS(x,(u_int32_t)((hy>>32)&0x80000000),1);/* return +-minsub */
++ INSERT_WORDS(x,(uint32_t)((hy>>32)&0x80000000),1);/* return +-minsub */
+ u = math_opt_barrier (x);
+ u = u * u;
+ math_force_eval (u); /* raise underflow flag */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_nexttowardf.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_nexttowardf.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_nexttowardf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_nexttowardf.c 2017-10-22 17:02:23.602967252 +0000
+@@ -26,7 +26,7 @@ float __nexttowardf(float x, long double
+ {
+ int32_t hx,ix;
+ int64_t hy,iy;
+- u_int64_t ly;
++ uint64_t ly;
+
+ GET_FLOAT_WORD(hx,x);
+ GET_LDOUBLE_WORDS64(hy,ly,y);
+@@ -40,7 +40,7 @@ float __nexttowardf(float x, long double
+ if((long double) x==y) return y; /* x=y, return y */
+ if(ix==0) { /* x == 0 */
+ float u;
+- SET_FLOAT_WORD(x,(u_int32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/
++ SET_FLOAT_WORD(x,(uint32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/
+ u = math_opt_barrier (x);
+ u = u * u;
+ math_force_eval (u); /* raise underflow flag */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_nextupl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_nextupl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_nextupl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_nextupl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -18,13 +18,14 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ /* Return the least floating-point number greater than X. */
+ _Float128
+ __nextupl (_Float128 x)
+ {
+ int64_t hx, ix;
+- u_int64_t lx;
++ uint64_t lx;
+
+ GET_LDOUBLE_WORDS64 (hx, lx, x);
+ ix = hx & 0x7fffffffffffffffLL;
+@@ -53,4 +54,4 @@ __nextupl (_Float128 x)
+ return x;
+ }
+
+-weak_alias (__nextupl, nextupl)
++libm_alias_ldouble (__nextup, nextup)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_remquol.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_remquol.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_remquol.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_remquol.c 2017-10-22 17:02:23.602967252 +0000
+@@ -21,6 +21,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ static const _Float128 zero = 0.0;
+@@ -30,7 +31,7 @@ _Float128
+ __remquol (_Float128 x, _Float128 y, int *quo)
+ {
+ int64_t hx,hy;
+- u_int64_t sx,lx,ly,qs;
++ uint64_t sx,lx,ly,qs;
+ int cquo;
+
+ GET_LDOUBLE_WORDS64 (hx, lx, x);
+@@ -109,4 +110,4 @@ __remquol (_Float128 x, _Float128 y, int
+ x = -x;
+ return x;
+ }
+-weak_alias (__remquol, remquol)
++libm_alias_ldouble (__remquo, remquo)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_rintl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_rintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_rintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_rintl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -29,6 +29,7 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const _Float128
+ TWO112[2]={
+@@ -39,10 +40,10 @@ TWO112[2]={
+ _Float128 __rintl(_Float128 x)
+ {
+ int64_t i0,j0,sx;
+- u_int64_t i1 __attribute__ ((unused));
++ uint64_t i1 __attribute__ ((unused));
+ _Float128 w,t;
+ GET_LDOUBLE_WORDS64(i0,i1,x);
+- sx = (((u_int64_t)i0)>>63);
++ sx = (((uint64_t)i0)>>63);
+ j0 = ((i0>>48)&0x7fff)-0x3fff;
+ if(j0<112) {
+ if(j0<0) {
+@@ -59,4 +60,4 @@ _Float128 __rintl(_Float128 x)
+ w = TWO112[sx]+x;
+ return w-TWO112[sx];
+ }
+-weak_alias (__rintl, rintl)
++libm_alias_ldouble (__rint, rint)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_roundevenl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_roundevenl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_roundevenl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_roundevenl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -19,6 +19,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <stdint.h>
+
+ #define BIAS 0x3fff
+@@ -26,7 +27,7 @@
+ #define MAX_EXP (2 * BIAS + 1)
+
+ _Float128
+-roundevenl (_Float128 x)
++__roundevenl (_Float128 x)
+ {
+ uint64_t hx, lx, uhx;
+ GET_LDOUBLE_WORDS64 (hx, lx, x);
+@@ -100,3 +101,4 @@ roundevenl (_Float128 x)
+ SET_LDOUBLE_WORDS64 (x, hx, lx);
+ return x;
+ }
++libm_alias_ldouble (__roundeven, roundeven)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_roundl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_roundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_roundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_roundl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -21,13 +21,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ _Float128
+ __roundl (_Float128 x)
+ {
+ int32_t j0;
+- u_int64_t i1, i0;
++ uint64_t i1, i0;
+
+ GET_LDOUBLE_WORDS64 (i0, i1, x);
+ j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+@@ -42,7 +43,7 @@ __roundl (_Float128 x)
+ }
+ else
+ {
+- u_int64_t i = 0x0000ffffffffffffLL >> j0;
++ uint64_t i = 0x0000ffffffffffffLL >> j0;
+ if (((i0 & i) | i1) == 0)
+ /* X is integral. */
+ return x;
+@@ -62,12 +63,12 @@ __roundl (_Float128 x)
+ }
+ else
+ {
+- u_int64_t i = -1ULL >> (j0 - 48);
++ uint64_t i = -1ULL >> (j0 - 48);
+ if ((i1 & i) == 0)
+ /* X is integral. */
+ return x;
+
+- u_int64_t j = i1 + (1LL << (111 - j0));
++ uint64_t j = i1 + (1LL << (111 - j0));
+ if (j < i1)
+ i0 += 1;
+ i1 = j;
+@@ -77,4 +78,4 @@ __roundl (_Float128 x)
+ SET_LDOUBLE_WORDS64 (x, i0, i1);
+ return x;
+ }
+-weak_alias (__roundl, roundl)
++libm_alias_ldouble (__round, round)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_setpayloadl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_setpayloadl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_setpayloadl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_setpayloadl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -1,3 +1,4 @@
+ #define SIG 0
+-#define FUNC setpayloadl
++#define FUNC __setpayloadl
+ #include <s_setpayloadl_main.c>
++libm_alias_ldouble (__setpayload, setpayload)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_setpayloadl_main.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_setpayloadl_main.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_setpayloadl_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_setpayloadl_main.c 2017-10-22 17:02:23.602967252 +0000
+@@ -18,6 +18,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_setpayloadsigl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_setpayloadsigl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_setpayloadsigl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_setpayloadsigl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -1,3 +1,4 @@
+ #define SIG 1
+-#define FUNC setpayloadsigl
++#define FUNC __setpayloadsigl
+ #include <s_setpayloadl_main.c>
++libm_alias_ldouble (__setpayloadsig, setpayloadsig)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_sincosl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_sincosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_sincosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_sincosl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -22,6 +22,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ void
+ __sincosl (_Float128 x, _Float128 *sinx, _Float128 *cosx)
+@@ -70,4 +71,4 @@ __sincosl (_Float128 x, _Float128 *sinx,
+ }
+ }
+ }
+-weak_alias (__sincosl, sincosl)
++libm_alias_ldouble (__sincos, sincos)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_sinl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_sinl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_sinl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_sinl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -47,6 +47,7 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128 __sinl(_Float128 x)
+ {
+@@ -83,4 +84,4 @@ _Float128 __sinl(_Float128 x)
+ }
+ }
+ }
+-weak_alias (__sinl, sinl)
++libm_alias_ldouble (__sin, sin)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_tanhl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_tanhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_tanhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_tanhl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -44,6 +44,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const _Float128 one = 1.0, two = 2.0, tiny = L(1.0e-4900);
+
+@@ -51,7 +52,7 @@ _Float128
+ __tanhl (_Float128 x)
+ {
+ _Float128 t, z;
+- u_int32_t jx, ix;
++ uint32_t jx, ix;
+ ieee854_long_double_shape_type u;
+
+ /* Words of |x|. */
+@@ -97,4 +98,4 @@ __tanhl (_Float128 x)
+ }
+ return (jx & 0x80000000) ? -z : z;
+ }
+-weak_alias (__tanhl, tanhl)
++libm_alias_ldouble (__tanh, tanh)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_tanl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_tanl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_tanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_tanl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -47,6 +47,7 @@
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ _Float128 __tanl(_Float128 x)
+ {
+@@ -77,4 +78,4 @@ _Float128 __tanl(_Float128 x)
+ -1 -- n odd */
+ }
+ }
+-weak_alias (__tanl, tanl)
++libm_alias_ldouble (__tan, tan)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_totalorderl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_totalorderl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_totalorderl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_totalorderl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -18,11 +18,12 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+ int
+-totalorderl (_Float128 x, _Float128 y)
++__totalorderl (_Float128 x, _Float128 y)
+ {
+ int64_t hx, hy;
+ uint64_t lx, ly;
+@@ -52,3 +53,4 @@ totalorderl (_Float128 x, _Float128 y)
+ ly ^= hy_sign;
+ return hx < hy || (hx == hy && lx <= ly);
+ }
++libm_alias_ldouble (__totalorder, totalorder)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_totalordermagl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_totalordermagl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_totalordermagl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_totalordermagl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -18,11 +18,12 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+ int
+-totalordermagl (_Float128 x, _Float128 y)
++__totalordermagl (_Float128 x, _Float128 y)
+ {
+ uint64_t hx, hy;
+ uint64_t lx, ly;
+@@ -46,3 +47,4 @@ totalordermagl (_Float128 x, _Float128 y
+ #endif
+ return hx < hy || (hx == hy && lx <= ly);
+ }
++libm_alias_ldouble (__totalordermag, totalordermag)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/strtold_l.c glibc-2.26/sysdeps/ieee754/ldbl-128/strtold_l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/strtold_l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/strtold_l.c 2017-10-22 17:02:23.602967252 +0000
+@@ -34,4 +34,19 @@
+ #define MPN2FLOAT __mpn_construct_long_double
+ #define FLOAT_HUGE_VAL HUGE_VALL
+
++#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
++# define strtof128_l __hide_strtof128_l
++# define wcstof128_l __hide_wcstof128_l
++#endif
++
+ #include <strtod_l.c>
++
++#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
++# undef strtof128_l
++# undef wcstof128_l
++# ifdef USE_WIDE_CHAR
++weak_alias (wcstold_l, wcstof128_l)
++# else
++weak_alias (strtold_l, strtof128_l)
++# endif
++#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_truncl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_truncl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_truncl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_truncl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -21,13 +21,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ _Float128
+ __truncl (_Float128 x)
+ {
+ int32_t j0;
+- u_int64_t i0, i1, sx;
++ uint64_t i0, i1, sx;
+
+ GET_LDOUBLE_WORDS64 (i0, i1, x);
+ sx = i0 & 0x8000000000000000ULL;
+@@ -53,4 +54,4 @@ __truncl (_Float128 x)
+
+ return x;
+ }
+-weak_alias (__truncl, truncl)
++libm_alias_ldouble (__trunc, trunc)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_ufromfpl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_ufromfpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_ufromfpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_ufromfpl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 0
+-#define FUNC ufromfpl
++#define FUNC __ufromfpl
+ #include <s_fromfpl_main.c>
++libm_alias_ldouble (__ufromfp, ufromfp)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/s_ufromfpxl.c glibc-2.26/sysdeps/ieee754/ldbl-128/s_ufromfpxl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/s_ufromfpxl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/s_ufromfpxl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 1
+-#define FUNC ufromfpxl
++#define FUNC __ufromfpxl
+ #include <s_fromfpl_main.c>
++libm_alias_ldouble (__ufromfpx, ufromfpx)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128/w_expl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-128/w_expl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-128/w_expl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128/w_expl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,42 +0,0 @@
+-/* w_expl.c -- long double version of w_exp.c.
+- * Conversion to long double by Ulrich Drepper,
+- * Cygnus Support, drepper@cygnus.com.
+- */
+-
+-/*
+- * ====================================================
+- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+- *
+- * Developed at SunPro, a Sun Microsystems, Inc. business.
+- * Permission to use, copy, modify, and distribute this
+- * software is freely granted, provided that this notice
+- * is preserved.
+- * ====================================================
+- */
+-
+-#if defined(LIBM_SCCS) && !defined(lint)
+-static char rcsid[] = "$NetBSD: $";
+-#endif
+-
+-/*
+- * wrapper expl(x)
+- */
+-
+-#include <math.h>
+-#include <math_private.h>
+-
+-long double __expl(long double x) /* wrapper exp */
+-{
+-#ifdef _IEEE_LIBM
+- return __ieee754_expl(x);
+-#else
+- long double z = __ieee754_expl (x);
+- if (__glibc_unlikely (!isfinite (z) || z == 0)
+- && isfinite (x) && _LIB_VERSION != _IEEE_)
+- return __kernel_standard_l (x, x, 206 + !!signbit (x));
+-
+- return z;
+-#endif
+-}
+-hidden_def (__expl)
+-weak_alias (__expl, expl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h glibc-2.26/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h 2017-10-22 17:02:23.602967252 +0000
+@@ -37,5 +37,22 @@ extern int __iscanonicall (long double _
+ conversion, before being discarded; in IBM long double, there are
+ encodings that are not consistently handled as corresponding to any
+ particular value of the type, and we return 0 for those. */
+-# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
+-#endif
++# ifndef __cplusplus
++# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
++# else
++/* In C++ mode, __MATH_TG cannot be used, because it relies on
++ __builtin_types_compatible_p, which is a C-only builtin. On the
++ other hand, overloading provides the means to distinguish between
++ the floating-point types. The overloading resolution will match
++ the correct parameter (regardless of type qualifiers (i.e.: const
++ and volatile)). */
++extern "C++" {
++inline int iscanonical (float __val) { return __iscanonicalf (__val); }
++inline int iscanonical (double __val) { return __iscanonical (__val); }
++inline int iscanonical (long double __val) { return __iscanonicall (__val); }
++# if __HAVE_DISTINCT_FLOAT128
++inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
++# endif
++}
++# endif /* __cplusplus */
++#endif /* __NO_LONG_DOUBLE_MATH */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_expl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_expl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_expl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_expl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -66,10 +66,8 @@
+ #include <inttypes.h>
+ #include <math_private.h>
+
+-#define _Float128 long double
+-#define L(x) x ## L
+
+-#include <sysdeps/ieee754/ldbl-128/t_expl.h>
++#include "t_expl.h"
+
+ static const long double C[] = {
+ /* Smallest integer x for which e^x overflows. */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c 2017-10-22 17:02:23.602967252 +0000
+@@ -119,7 +119,7 @@ __ieee754_fmodl (long double x, long dou
+ if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;}
+ else {
+ if((hz|lz)==0) /* return sign(x)*0 */
+- return Zero[(u_int64_t)sx>>63];
++ return Zero[(uint64_t)sx>>63];
+ hx = hz+hz+(lz>>63); lx = lz+lz;
+ }
+ }
+@@ -128,7 +128,7 @@ __ieee754_fmodl (long double x, long dou
+
+ /* convert back to floating value and restore the sign */
+ if((hx|lx)==0) /* return sign(x)*0 */
+- return Zero[(u_int64_t)sx>>63];
++ return Zero[(uint64_t)sx>>63];
+ while(hx<0x0001000000000000LL) { /* normalize x */
+ hx = hx+hx+(lx>>63); lx = lx+lx;
+ iy -= 1;
+@@ -139,7 +139,7 @@ __ieee754_fmodl (long double x, long dou
+ n = -1022 - iy;
+ /* We know 1 <= N <= 52, and that there are no nonzero
+ bits in places below 2^-1074. */
+- lx = (lx >> n) | ((u_int64_t) hx << (64 - n));
++ lx = (lx >> n) | ((uint64_t) hx << (64 - n));
+ hx >>= n;
+ x = ldbl_insert_mantissa((sx>>63), -1023, hx, lx);
+ x *= one; /* create necessary signal */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c 2017-10-22 17:02:23.602967252 +0000
+@@ -134,7 +134,7 @@ __ieee754_gammal_r (long double x, int *
+ *signgamp = 0;
+ return 1.0 / x;
+ }
+- if (hx < 0 && (u_int64_t) hx < 0xfff0000000000000ULL && __rintl (x) == x)
++ if (hx < 0 && (uint64_t) hx < 0xfff0000000000000ULL && __rintl (x) == x)
+ {
+ /* Return value for integer x < 0 is NaN with invalid exception. */
+ *signgamp = 0;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_j0l.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_j0l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_j0l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_j0l.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,5 +1,864 @@
+-/* Looks like we can use ieee854 e_j0l.c as is for IBM extended format. */
+-#define _Float128 long double
+-#define L(x) x ## L
+-#include <sysdeps/ieee754/ldbl-128/e_j0l.c>
++/* Bessel function of order zero. IBM Extended Precision version.
++ Copyright 2001 by Stephen L. Moshier (moshier@na-net.ornl.gov).
+
++ This 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.
++
++ This 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 this library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++/* This file was copied from sysdeps/ieee754/ldbl-128/e_j0l.c. */
++
++
++#include <math.h>
++#include <math_private.h>
++#include <float.h>
++
++/* 1 / sqrt(pi) */
++static const long double ONEOSQPI = 5.6418958354775628694807945156077258584405E-1L;
++/* 2 / pi */
++static const long double TWOOPI = 6.3661977236758134307553505349005744813784E-1L;
++static const long double zero = 0;
++
++/* J0(x) = 1 - x^2/4 + x^2 x^2 R(x^2)
++ Peak relative error 3.4e-37
++ 0 <= x <= 2 */
++#define NJ0_2N 6
++static const long double J0_2N[NJ0_2N + 1] = {
++ 3.133239376997663645548490085151484674892E16L,
++ -5.479944965767990821079467311839107722107E14L,
++ 6.290828903904724265980249871997551894090E12L,
++ -3.633750176832769659849028554429106299915E10L,
++ 1.207743757532429576399485415069244807022E8L,
++ -2.107485999925074577174305650549367415465E5L,
++ 1.562826808020631846245296572935547005859E2L,
++};
++#define NJ0_2D 6
++static const long double J0_2D[NJ0_2D + 1] = {
++ 2.005273201278504733151033654496928968261E18L,
++ 2.063038558793221244373123294054149790864E16L,
++ 1.053350447931127971406896594022010524994E14L,
++ 3.496556557558702583143527876385508882310E11L,
++ 8.249114511878616075860654484367133976306E8L,
++ 1.402965782449571800199759247964242790589E6L,
++ 1.619910762853439600957801751815074787351E3L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J0(x)cosX + Y0(x)sinX = sqrt( 2/(pi x)) P0(x), P0(x) = 1 + 1/x^2 R(1/x^2),
++ 0 <= 1/x <= .0625
++ Peak relative error 3.3e-36 */
++#define NP16_IN 9
++static const long double P16_IN[NP16_IN + 1] = {
++ -1.901689868258117463979611259731176301065E-16L,
++ -1.798743043824071514483008340803573980931E-13L,
++ -6.481746687115262291873324132944647438959E-11L,
++ -1.150651553745409037257197798528294248012E-8L,
++ -1.088408467297401082271185599507222695995E-6L,
++ -5.551996725183495852661022587879817546508E-5L,
++ -1.477286941214245433866838787454880214736E-3L,
++ -1.882877976157714592017345347609200402472E-2L,
++ -9.620983176855405325086530374317855880515E-2L,
++ -1.271468546258855781530458854476627766233E-1L,
++};
++#define NP16_ID 9
++static const long double P16_ID[NP16_ID + 1] = {
++ 2.704625590411544837659891569420764475007E-15L,
++ 2.562526347676857624104306349421985403573E-12L,
++ 9.259137589952741054108665570122085036246E-10L,
++ 1.651044705794378365237454962653430805272E-7L,
++ 1.573561544138733044977714063100859136660E-5L,
++ 8.134482112334882274688298469629884804056E-4L,
++ 2.219259239404080863919375103673593571689E-2L,
++ 2.976990606226596289580242451096393862792E-1L,
++ 1.713895630454693931742734911930937246254E0L,
++ 3.231552290717904041465898249160757368855E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J0(x)cosX + Y0(x)sinX = sqrt( 2/(pi x)) P0(x), P0(x) = 1 + 1/x^2 R(1/x^2)
++ 0.0625 <= 1/x <= 0.125
++ Peak relative error 2.4e-35 */
++#define NP8_16N 10
++static const long double P8_16N[NP8_16N + 1] = {
++ -2.335166846111159458466553806683579003632E-15L,
++ -1.382763674252402720401020004169367089975E-12L,
++ -3.192160804534716696058987967592784857907E-10L,
++ -3.744199606283752333686144670572632116899E-8L,
++ -2.439161236879511162078619292571922772224E-6L,
++ -9.068436986859420951664151060267045346549E-5L,
++ -1.905407090637058116299757292660002697359E-3L,
++ -2.164456143936718388053842376884252978872E-2L,
++ -1.212178415116411222341491717748696499966E-1L,
++ -2.782433626588541494473277445959593334494E-1L,
++ -1.670703190068873186016102289227646035035E-1L,
++};
++#define NP8_16D 10
++static const long double P8_16D[NP8_16D + 1] = {
++ 3.321126181135871232648331450082662856743E-14L,
++ 1.971894594837650840586859228510007703641E-11L,
++ 4.571144364787008285981633719513897281690E-9L,
++ 5.396419143536287457142904742849052402103E-7L,
++ 3.551548222385845912370226756036899901549E-5L,
++ 1.342353874566932014705609788054598013516E-3L,
++ 2.899133293006771317589357444614157734385E-2L,
++ 3.455374978185770197704507681491574261545E-1L,
++ 2.116616964297512311314454834712634820514E0L,
++ 5.850768316827915470087758636881584174432E0L,
++ 5.655273858938766830855753983631132928968E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J0(x)cosX + Y0(x)sinX = sqrt( 2/(pi x)) P0(x), P0(x) = 1 + 1/x^2 R(1/x^2)
++ 0.125 <= 1/x <= 0.1875
++ Peak relative error 2.7e-35 */
++#define NP5_8N 10
++static const long double P5_8N[NP5_8N + 1] = {
++ -1.270478335089770355749591358934012019596E-12L,
++ -4.007588712145412921057254992155810347245E-10L,
++ -4.815187822989597568124520080486652009281E-8L,
++ -2.867070063972764880024598300408284868021E-6L,
++ -9.218742195161302204046454768106063638006E-5L,
++ -1.635746821447052827526320629828043529997E-3L,
++ -1.570376886640308408247709616497261011707E-2L,
++ -7.656484795303305596941813361786219477807E-2L,
++ -1.659371030767513274944805479908858628053E-1L,
++ -1.185340550030955660015841796219919804915E-1L,
++ -8.920026499909994671248893388013790366712E-3L,
++};
++#define NP5_8D 9
++static const long double P5_8D[NP5_8D + 1] = {
++ 1.806902521016705225778045904631543990314E-11L,
++ 5.728502760243502431663549179135868966031E-9L,
++ 6.938168504826004255287618819550667978450E-7L,
++ 4.183769964807453250763325026573037785902E-5L,
++ 1.372660678476925468014882230851637878587E-3L,
++ 2.516452105242920335873286419212708961771E-2L,
++ 2.550502712902647803796267951846557316182E-1L,
++ 1.365861559418983216913629123778747617072E0L,
++ 3.523825618308783966723472468855042541407E0L,
++ 3.656365803506136165615111349150536282434E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J0(x)cosX + Y0(x)sinX = sqrt( 2/(pi x)) P0(x), P0(x) = 1 + 1/x^2 R(1/x^2)
++ Peak relative error 3.5e-35
++ 0.1875 <= 1/x <= 0.25 */
++#define NP4_5N 9
++static const long double P4_5N[NP4_5N + 1] = {
++ -9.791405771694098960254468859195175708252E-10L,
++ -1.917193059944531970421626610188102836352E-7L,
++ -1.393597539508855262243816152893982002084E-5L,
++ -4.881863490846771259880606911667479860077E-4L,
++ -8.946571245022470127331892085881699269853E-3L,
++ -8.707474232568097513415336886103899434251E-2L,
++ -4.362042697474650737898551272505525973766E-1L,
++ -1.032712171267523975431451359962375617386E0L,
++ -9.630502683169895107062182070514713702346E-1L,
++ -2.251804386252969656586810309252357233320E-1L,
++};
++#define NP4_5D 9
++static const long double P4_5D[NP4_5D + 1] = {
++ 1.392555487577717669739688337895791213139E-8L,
++ 2.748886559120659027172816051276451376854E-6L,
++ 2.024717710644378047477189849678576659290E-4L,
++ 7.244868609350416002930624752604670292469E-3L,
++ 1.373631762292244371102989739300382152416E-1L,
++ 1.412298581400224267910294815260613240668E0L,
++ 7.742495637843445079276397723849017617210E0L,
++ 2.138429269198406512028307045259503811861E1L,
++ 2.651547684548423476506826951831712762610E1L,
++ 1.167499382465291931571685222882909166935E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J0(x)cosX + Y0(x)sinX = sqrt( 2/(pi x)) P0(x), P0(x) = 1 + 1/x^2 R(1/x^2)
++ Peak relative error 2.3e-36
++ 0.25 <= 1/x <= 0.3125 */
++#define NP3r2_4N 9
++static const long double P3r2_4N[NP3r2_4N + 1] = {
++ -2.589155123706348361249809342508270121788E-8L,
++ -3.746254369796115441118148490849195516593E-6L,
++ -1.985595497390808544622893738135529701062E-4L,
++ -5.008253705202932091290132760394976551426E-3L,
++ -6.529469780539591572179155511840853077232E-2L,
++ -4.468736064761814602927408833818990271514E-1L,
++ -1.556391252586395038089729428444444823380E0L,
++ -2.533135309840530224072920725976994981638E0L,
++ -1.605509621731068453869408718565392869560E0L,
++ -2.518966692256192789269859830255724429375E-1L,
++};
++#define NP3r2_4D 9
++static const long double P3r2_4D[NP3r2_4D + 1] = {
++ 3.682353957237979993646169732962573930237E-7L,
++ 5.386741661883067824698973455566332102029E-5L,
++ 2.906881154171822780345134853794241037053E-3L,
++ 7.545832595801289519475806339863492074126E-2L,
++ 1.029405357245594877344360389469584526654E0L,
++ 7.565706120589873131187989560509757626725E0L,
++ 2.951172890699569545357692207898667665796E1L,
++ 5.785723537170311456298467310529815457536E1L,
++ 5.095621464598267889126015412522773474467E1L,
++ 1.602958484169953109437547474953308401442E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J0(x)cosX + Y0(x)sinX = sqrt( 2/(pi x)) P0(x), P0(x) = 1 + 1/x^2 R(1/x^2)
++ Peak relative error 1.0e-35
++ 0.3125 <= 1/x <= 0.375 */
++#define NP2r7_3r2N 9
++static const long double P2r7_3r2N[NP2r7_3r2N + 1] = {
++ -1.917322340814391131073820537027234322550E-7L,
++ -1.966595744473227183846019639723259011906E-5L,
++ -7.177081163619679403212623526632690465290E-4L,
++ -1.206467373860974695661544653741899755695E-2L,
++ -1.008656452188539812154551482286328107316E-1L,
++ -4.216016116408810856620947307438823892707E-1L,
++ -8.378631013025721741744285026537009814161E-1L,
++ -6.973895635309960850033762745957946272579E-1L,
++ -1.797864718878320770670740413285763554812E-1L,
++ -4.098025357743657347681137871388402849581E-3L,
++};
++#define NP2r7_3r2D 8
++static const long double P2r7_3r2D[NP2r7_3r2D + 1] = {
++ 2.726858489303036441686496086962545034018E-6L,
++ 2.840430827557109238386808968234848081424E-4L,
++ 1.063826772041781947891481054529454088832E-2L,
++ 1.864775537138364773178044431045514405468E-1L,
++ 1.665660052857205170440952607701728254211E0L,
++ 7.723745889544331153080842168958348568395E0L,
++ 1.810726427571829798856428548102077799835E1L,
++ 1.986460672157794440666187503833545388527E1L,
++ 8.645503204552282306364296517220055815488E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J0(x)cosX + Y0(x)sinX = sqrt( 2/(pi x)) P0(x), P0(x) = 1 + 1/x^2 R(1/x^2)
++ Peak relative error 1.3e-36
++ 0.3125 <= 1/x <= 0.4375 */
++#define NP2r3_2r7N 9
++static const long double P2r3_2r7N[NP2r3_2r7N + 1] = {
++ -1.594642785584856746358609622003310312622E-6L,
++ -1.323238196302221554194031733595194539794E-4L,
++ -3.856087818696874802689922536987100372345E-3L,
++ -5.113241710697777193011470733601522047399E-2L,
++ -3.334229537209911914449990372942022350558E-1L,
++ -1.075703518198127096179198549659283422832E0L,
++ -1.634174803414062725476343124267110981807E0L,
++ -1.030133247434119595616826842367268304880E0L,
++ -1.989811539080358501229347481000707289391E-1L,
++ -3.246859189246653459359775001466924610236E-3L,
++};
++#define NP2r3_2r7D 8
++static const long double P2r3_2r7D[NP2r3_2r7D + 1] = {
++ 2.267936634217251403663034189684284173018E-5L,
++ 1.918112982168673386858072491437971732237E-3L,
++ 5.771704085468423159125856786653868219522E-2L,
++ 8.056124451167969333717642810661498890507E-1L,
++ 5.687897967531010276788680634413789328776E0L,
++ 2.072596760717695491085444438270778394421E1L,
++ 3.801722099819929988585197088613160496684E1L,
++ 3.254620235902912339534998592085115836829E1L,
++ 1.104847772130720331801884344645060675036E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J0(x)cosX + Y0(x)sinX = sqrt( 2/(pi x)) P0(x), P0(x) = 1 + 1/x^2 R(1/x^2)
++ Peak relative error 1.2e-35
++ 0.4375 <= 1/x <= 0.5 */
++#define NP2_2r3N 8
++static const long double P2_2r3N[NP2_2r3N + 1] = {
++ -1.001042324337684297465071506097365389123E-4L,
++ -6.289034524673365824853547252689991418981E-3L,
++ -1.346527918018624234373664526930736205806E-1L,
++ -1.268808313614288355444506172560463315102E0L,
++ -5.654126123607146048354132115649177406163E0L,
++ -1.186649511267312652171775803270911971693E1L,
++ -1.094032424931998612551588246779200724257E1L,
++ -3.728792136814520055025256353193674625267E0L,
++ -3.000348318524471807839934764596331810608E-1L,
++};
++#define NP2_2r3D 8
++static const long double P2_2r3D[NP2_2r3D + 1] = {
++ 1.423705538269770974803901422532055612980E-3L,
++ 9.171476630091439978533535167485230575894E-2L,
++ 2.049776318166637248868444600215942828537E0L,
++ 2.068970329743769804547326701946144899583E1L,
++ 1.025103500560831035592731539565060347709E2L,
++ 2.528088049697570728252145557167066708284E2L,
++ 2.992160327587558573740271294804830114205E2L,
++ 1.540193761146551025832707739468679973036E2L,
++ 2.779516701986912132637672140709452502650E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y0(x)cosX - J0(x)sinX = sqrt( 2/(pi x)) Q0(x),
++ Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
++ Peak relative error 2.2e-35
++ 0 <= 1/x <= .0625 */
++#define NQ16_IN 10
++static const long double Q16_IN[NQ16_IN + 1] = {
++ 2.343640834407975740545326632205999437469E-18L,
++ 2.667978112927811452221176781536278257448E-15L,
++ 1.178415018484555397390098879501969116536E-12L,
++ 2.622049767502719728905924701288614016597E-10L,
++ 3.196908059607618864801313380896308968673E-8L,
++ 2.179466154171673958770030655199434798494E-6L,
++ 8.139959091628545225221976413795645177291E-5L,
++ 1.563900725721039825236927137885747138654E-3L,
++ 1.355172364265825167113562519307194840307E-2L,
++ 3.928058355906967977269780046844768588532E-2L,
++ 1.107891967702173292405380993183694932208E-2L,
++};
++#define NQ16_ID 9
++static const long double Q16_ID[NQ16_ID + 1] = {
++ 3.199850952578356211091219295199301766718E-17L,
++ 3.652601488020654842194486058637953363918E-14L,
++ 1.620179741394865258354608590461839031281E-11L,
++ 3.629359209474609630056463248923684371426E-9L,
++ 4.473680923894354600193264347733477363305E-7L,
++ 3.106368086644715743265603656011050476736E-5L,
++ 1.198239259946770604954664925153424252622E-3L,
++ 2.446041004004283102372887804475767568272E-2L,
++ 2.403235525011860603014707768815113698768E-1L,
++ 9.491006790682158612266270665136910927149E-1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++ };
++
++/* Y0(x)cosX - J0(x)sinX = sqrt( 2/(pi x)) Q0(x),
++ Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
++ Peak relative error 5.1e-36
++ 0.0625 <= 1/x <= 0.125 */
++#define NQ8_16N 11
++static const long double Q8_16N[NQ8_16N + 1] = {
++ 1.001954266485599464105669390693597125904E-17L,
++ 7.545499865295034556206475956620160007849E-15L,
++ 2.267838684785673931024792538193202559922E-12L,
++ 3.561909705814420373609574999542459912419E-10L,
++ 3.216201422768092505214730633842924944671E-8L,
++ 1.731194793857907454569364622452058554314E-6L,
++ 5.576944613034537050396518509871004586039E-5L,
++ 1.051787760316848982655967052985391418146E-3L,
++ 1.102852974036687441600678598019883746959E-2L,
++ 5.834647019292460494254225988766702933571E-2L,
++ 1.290281921604364618912425380717127576529E-1L,
++ 7.598886310387075708640370806458926458301E-2L,
++};
++#define NQ8_16D 11
++static const long double Q8_16D[NQ8_16D + 1] = {
++ 1.368001558508338469503329967729951830843E-16L,
++ 1.034454121857542147020549303317348297289E-13L,
++ 3.128109209247090744354764050629381674436E-11L,
++ 4.957795214328501986562102573522064468671E-9L,
++ 4.537872468606711261992676606899273588899E-7L,
++ 2.493639207101727713192687060517509774182E-5L,
++ 8.294957278145328349785532236663051405805E-4L,
++ 1.646471258966713577374948205279380115839E-2L,
++ 1.878910092770966718491814497982191447073E-1L,
++ 1.152641605706170353727903052525652504075E0L,
++ 3.383550240669773485412333679367792932235E0L,
++ 3.823875252882035706910024716609908473970E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y0(x)cosX - J0(x)sinX = sqrt( 2/(pi x)) Q0(x),
++ Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
++ Peak relative error 3.9e-35
++ 0.125 <= 1/x <= 0.1875 */
++#define NQ5_8N 10
++static const long double Q5_8N[NQ5_8N + 1] = {
++ 1.750399094021293722243426623211733898747E-13L,
++ 6.483426211748008735242909236490115050294E-11L,
++ 9.279430665656575457141747875716899958373E-9L,
++ 6.696634968526907231258534757736576340266E-7L,
++ 2.666560823798895649685231292142838188061E-5L,
++ 6.025087697259436271271562769707550594540E-4L,
++ 7.652807734168613251901945778921336353485E-3L,
++ 5.226269002589406461622551452343519078905E-2L,
++ 1.748390159751117658969324896330142895079E-1L,
++ 2.378188719097006494782174902213083589660E-1L,
++ 8.383984859679804095463699702165659216831E-2L,
++};
++#define NQ5_8D 10
++static const long double Q5_8D[NQ5_8D + 1] = {
++ 2.389878229704327939008104855942987615715E-12L,
++ 8.926142817142546018703814194987786425099E-10L,
++ 1.294065862406745901206588525833274399038E-7L,
++ 9.524139899457666250828752185212769682191E-6L,
++ 3.908332488377770886091936221573123353489E-4L,
++ 9.250427033957236609624199884089916836748E-3L,
++ 1.263420066165922645975830877751588421451E-1L,
++ 9.692527053860420229711317379861733180654E-1L,
++ 3.937813834630430172221329298841520707954E0L,
++ 7.603126427436356534498908111445191312181E0L,
++ 5.670677653334105479259958485084550934305E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y0(x)cosX - J0(x)sinX = sqrt( 2/(pi x)) Q0(x),
++ Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
++ Peak relative error 3.2e-35
++ 0.1875 <= 1/x <= 0.25 */
++#define NQ4_5N 10
++static const long double Q4_5N[NQ4_5N + 1] = {
++ 2.233870042925895644234072357400122854086E-11L,
++ 5.146223225761993222808463878999151699792E-9L,
++ 4.459114531468296461688753521109797474523E-7L,
++ 1.891397692931537975547242165291668056276E-5L,
++ 4.279519145911541776938964806470674565504E-4L,
++ 5.275239415656560634702073291768904783989E-3L,
++ 3.468698403240744801278238473898432608887E-2L,
++ 1.138773146337708415188856882915457888274E-1L,
++ 1.622717518946443013587108598334636458955E-1L,
++ 7.249040006390586123760992346453034628227E-2L,
++ 1.941595365256460232175236758506411486667E-3L,
++};
++#define NQ4_5D 9
++static const long double Q4_5D[NQ4_5D + 1] = {
++ 3.049977232266999249626430127217988047453E-10L,
++ 7.120883230531035857746096928889676144099E-8L,
++ 6.301786064753734446784637919554359588859E-6L,
++ 2.762010530095069598480766869426308077192E-4L,
++ 6.572163250572867859316828886203406361251E-3L,
++ 8.752566114841221958200215255461843397776E-2L,
++ 6.487654992874805093499285311075289932664E-1L,
++ 2.576550017826654579451615283022812801435E0L,
++ 5.056392229924022835364779562707348096036E0L,
++ 4.179770081068251464907531367859072157773E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y0(x)cosX - J0(x)sinX = sqrt( 2/(pi x)) Q0(x),
++ Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
++ Peak relative error 1.4e-36
++ 0.25 <= 1/x <= 0.3125 */
++#define NQ3r2_4N 10
++static const long double Q3r2_4N[NQ3r2_4N + 1] = {
++ 6.126167301024815034423262653066023684411E-10L,
++ 1.043969327113173261820028225053598975128E-7L,
++ 6.592927270288697027757438170153763220190E-6L,
++ 2.009103660938497963095652951912071336730E-4L,
++ 3.220543385492643525985862356352195896964E-3L,
++ 2.774405975730545157543417650436941650990E-2L,
++ 1.258114008023826384487378016636555041129E-1L,
++ 2.811724258266902502344701449984698323860E-1L,
++ 2.691837665193548059322831687432415014067E-1L,
++ 7.949087384900985370683770525312735605034E-2L,
++ 1.229509543620976530030153018986910810747E-3L,
++};
++#define NQ3r2_4D 9
++static const long double Q3r2_4D[NQ3r2_4D + 1] = {
++ 8.364260446128475461539941389210166156568E-9L,
++ 1.451301850638956578622154585560759862764E-6L,
++ 9.431830010924603664244578867057141839463E-5L,
++ 3.004105101667433434196388593004526182741E-3L,
++ 5.148157397848271739710011717102773780221E-2L,
++ 4.901089301726939576055285374953887874895E-1L,
++ 2.581760991981709901216967665934142240346E0L,
++ 7.257105880775059281391729708630912791847E0L,
++ 1.006014717326362868007913423810737369312E1L,
++ 5.879416600465399514404064187445293212470E0L,
++ /* 1.000000000000000000000000000000000000000E0*/
++};
++
++/* Y0(x)cosX - J0(x)sinX = sqrt( 2/(pi x)) Q0(x),
++ Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
++ Peak relative error 3.8e-36
++ 0.3125 <= 1/x <= 0.375 */
++#define NQ2r7_3r2N 9
++static const long double Q2r7_3r2N[NQ2r7_3r2N + 1] = {
++ 7.584861620402450302063691901886141875454E-8L,
++ 9.300939338814216296064659459966041794591E-6L,
++ 4.112108906197521696032158235392604947895E-4L,
++ 8.515168851578898791897038357239630654431E-3L,
++ 8.971286321017307400142720556749573229058E-2L,
++ 4.885856732902956303343015636331874194498E-1L,
++ 1.334506268733103291656253500506406045846E0L,
++ 1.681207956863028164179042145803851824654E0L,
++ 8.165042692571721959157677701625853772271E-1L,
++ 9.805848115375053300608712721986235900715E-2L,
++};
++#define NQ2r7_3r2D 9
++static const long double Q2r7_3r2D[NQ2r7_3r2D + 1] = {
++ 1.035586492113036586458163971239438078160E-6L,
++ 1.301999337731768381683593636500979713689E-4L,
++ 5.993695702564527062553071126719088859654E-3L,
++ 1.321184892887881883489141186815457808785E-1L,
++ 1.528766555485015021144963194165165083312E0L,
++ 9.561463309176490874525827051566494939295E0L,
++ 3.203719484883967351729513662089163356911E1L,
++ 5.497294687660930446641539152123568668447E1L,
++ 4.391158169390578768508675452986948391118E1L,
++ 1.347836630730048077907818943625789418378E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y0(x)cosX - J0(x)sinX = sqrt( 2/(pi x)) Q0(x),
++ Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
++ Peak relative error 2.2e-35
++ 0.375 <= 1/x <= 0.4375 */
++#define NQ2r3_2r7N 9
++static const long double Q2r3_2r7N[NQ2r3_2r7N + 1] = {
++ 4.455027774980750211349941766420190722088E-7L,
++ 4.031998274578520170631601850866780366466E-5L,
++ 1.273987274325947007856695677491340636339E-3L,
++ 1.818754543377448509897226554179659122873E-2L,
++ 1.266748858326568264126353051352269875352E-1L,
++ 4.327578594728723821137731555139472880414E-1L,
++ 6.892532471436503074928194969154192615359E-1L,
++ 4.490775818438716873422163588640262036506E-1L,
++ 8.649615949297322440032000346117031581572E-2L,
++ 7.261345286655345047417257611469066147561E-4L,
++};
++#define NQ2r3_2r7D 8
++static const long double Q2r3_2r7D[NQ2r3_2r7D + 1] = {
++ 6.082600739680555266312417978064954793142E-6L,
++ 5.693622538165494742945717226571441747567E-4L,
++ 1.901625907009092204458328768129666975975E-2L,
++ 2.958689532697857335456896889409923371570E-1L,
++ 2.343124711045660081603809437993368799568E0L,
++ 9.665894032187458293568704885528192804376E0L,
++ 2.035273104990617136065743426322454881353E1L,
++ 2.044102010478792896815088858740075165531E1L,
++ 8.445937177863155827844146643468706599304E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y0(x)cosX - J0(x)sinX = sqrt( 2/(pi x)) Q0(x),
++ Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
++ Peak relative error 3.1e-36
++ 0.4375 <= 1/x <= 0.5 */
++#define NQ2_2r3N 9
++static const long double Q2_2r3N[NQ2_2r3N + 1] = {
++ 2.817566786579768804844367382809101929314E-6L,
++ 2.122772176396691634147024348373539744935E-4L,
++ 5.501378031780457828919593905395747517585E-3L,
++ 6.355374424341762686099147452020466524659E-2L,
++ 3.539652320122661637429658698954748337223E-1L,
++ 9.571721066119617436343740541777014319695E-1L,
++ 1.196258777828426399432550698612171955305E0L,
++ 6.069388659458926158392384709893753793967E-1L,
++ 9.026746127269713176512359976978248763621E-2L,
++ 5.317668723070450235320878117210807236375E-4L,
++};
++#define NQ2_2r3D 8
++static const long double Q2_2r3D[NQ2_2r3D + 1] = {
++ 3.846924354014260866793741072933159380158E-5L,
++ 3.017562820057704325510067178327449946763E-3L,
++ 8.356305620686867949798885808540444210935E-2L,
++ 1.068314930499906838814019619594424586273E0L,
++ 6.900279623894821067017966573640732685233E0L,
++ 2.307667390886377924509090271780839563141E1L,
++ 3.921043465412723970791036825401273528513E1L,
++ 3.167569478939719383241775717095729233436E1L,
++ 1.051023841699200920276198346301543665909E1L,
++ /* 1.000000000000000000000000000000000000000E0*/
++};
++
++
++/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
++
++static long double
++neval (long double x, const long double *p, int n)
++{
++ long double y;
++
++ p += n;
++ y = *p--;
++ do
++ {
++ y = y * x + *p--;
++ }
++ while (--n > 0);
++ return y;
++}
++
++
++/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */
++
++static long double
++deval (long double x, const long double *p, int n)
++{
++ long double y;
++
++ p += n;
++ y = x + *p--;
++ do
++ {
++ y = y * x + *p--;
++ }
++ while (--n > 0);
++ return y;
++}
++
++
++/* Bessel function of the first kind, order zero. */
++
++long double
++__ieee754_j0l (long double x)
++{
++ long double xx, xinv, z, p, q, c, s, cc, ss;
++
++ if (! isfinite (x))
++ {
++ if (x != x)
++ return x + x;
++ else
++ return 0;
++ }
++ if (x == 0)
++ return 1;
++
++ xx = fabsl (x);
++ if (xx <= 2)
++ {
++ if (xx < 0x1p-57L)
++ return 1;
++ /* 0 <= x <= 2 */
++ z = xx * xx;
++ p = z * z * neval (z, J0_2N, NJ0_2N) / deval (z, J0_2D, NJ0_2D);
++ p -= 0.25L * z;
++ p += 1;
++ return p;
++ }
++
++ /* X = x - pi/4
++ cos(X) = cos(x) cos(pi/4) + sin(x) sin(pi/4)
++ = 1/sqrt(2) * (cos(x) + sin(x))
++ sin(X) = sin(x) cos(pi/4) - cos(x) sin(pi/4)
++ = 1/sqrt(2) * (sin(x) - cos(x))
++ sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
++ cf. Fdlibm. */
++ __sincosl (xx, &s, &c);
++ ss = s - c;
++ cc = s + c;
++ if (xx <= LDBL_MAX / 2)
++ {
++ z = -__cosl (xx + xx);
++ if ((s * c) < 0)
++ cc = z / ss;
++ else
++ ss = z / cc;
++ }
++
++ if (xx > 0x1p256L)
++ return ONEOSQPI * cc / __ieee754_sqrtl (xx);
++
++ xinv = 1 / xx;
++ z = xinv * xinv;
++ if (xinv <= 0.25)
++ {
++ if (xinv <= 0.125)
++ {
++ if (xinv <= 0.0625)
++ {
++ p = neval (z, P16_IN, NP16_IN) / deval (z, P16_ID, NP16_ID);
++ q = neval (z, Q16_IN, NQ16_IN) / deval (z, Q16_ID, NQ16_ID);
++ }
++ else
++ {
++ p = neval (z, P8_16N, NP8_16N) / deval (z, P8_16D, NP8_16D);
++ q = neval (z, Q8_16N, NQ8_16N) / deval (z, Q8_16D, NQ8_16D);
++ }
++ }
++ else if (xinv <= 0.1875)
++ {
++ p = neval (z, P5_8N, NP5_8N) / deval (z, P5_8D, NP5_8D);
++ q = neval (z, Q5_8N, NQ5_8N) / deval (z, Q5_8D, NQ5_8D);
++ }
++ else
++ {
++ p = neval (z, P4_5N, NP4_5N) / deval (z, P4_5D, NP4_5D);
++ q = neval (z, Q4_5N, NQ4_5N) / deval (z, Q4_5D, NQ4_5D);
++ }
++ } /* .25 */
++ else /* if (xinv <= 0.5) */
++ {
++ if (xinv <= 0.375)
++ {
++ if (xinv <= 0.3125)
++ {
++ p = neval (z, P3r2_4N, NP3r2_4N) / deval (z, P3r2_4D, NP3r2_4D);
++ q = neval (z, Q3r2_4N, NQ3r2_4N) / deval (z, Q3r2_4D, NQ3r2_4D);
++ }
++ else
++ {
++ p = neval (z, P2r7_3r2N, NP2r7_3r2N)
++ / deval (z, P2r7_3r2D, NP2r7_3r2D);
++ q = neval (z, Q2r7_3r2N, NQ2r7_3r2N)
++ / deval (z, Q2r7_3r2D, NQ2r7_3r2D);
++ }
++ }
++ else if (xinv <= 0.4375)
++ {
++ p = neval (z, P2r3_2r7N, NP2r3_2r7N)
++ / deval (z, P2r3_2r7D, NP2r3_2r7D);
++ q = neval (z, Q2r3_2r7N, NQ2r3_2r7N)
++ / deval (z, Q2r3_2r7D, NQ2r3_2r7D);
++ }
++ else
++ {
++ p = neval (z, P2_2r3N, NP2_2r3N) / deval (z, P2_2r3D, NP2_2r3D);
++ q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D);
++ }
++ }
++ p = 1 + z * p;
++ q = z * xinv * q;
++ q = q - 0.125L * xinv;
++ z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx);
++ return z;
++}
++strong_alias (__ieee754_j0l, __j0l_finite)
++
++
++/* Y0(x) = 2/pi * log(x) * J0(x) + R(x^2)
++ Peak absolute error 1.7e-36 (relative where Y0 > 1)
++ 0 <= x <= 2 */
++#define NY0_2N 7
++static long double Y0_2N[NY0_2N + 1] = {
++ -1.062023609591350692692296993537002558155E19L,
++ 2.542000883190248639104127452714966858866E19L,
++ -1.984190771278515324281415820316054696545E18L,
++ 4.982586044371592942465373274440222033891E16L,
++ -5.529326354780295177243773419090123407550E14L,
++ 3.013431465522152289279088265336861140391E12L,
++ -7.959436160727126750732203098982718347785E9L,
++ 8.230845651379566339707130644134372793322E6L,
++};
++#define NY0_2D 7
++static long double Y0_2D[NY0_2D + 1] = {
++ 1.438972634353286978700329883122253752192E20L,
++ 1.856409101981569254247700169486907405500E18L,
++ 1.219693352678218589553725579802986255614E16L,
++ 5.389428943282838648918475915779958097958E13L,
++ 1.774125762108874864433872173544743051653E11L,
++ 4.522104832545149534808218252434693007036E8L,
++ 8.872187401232943927082914504125234454930E5L,
++ 1.251945613186787532055610876304669413955E3L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++static const long double U0 = -7.3804295108687225274343927948483016310862e-02L;
++
++/* Bessel function of the second kind, order zero. */
++
++long double
++ __ieee754_y0l(long double x)
++{
++ long double xx, xinv, z, p, q, c, s, cc, ss;
++
++ if (! isfinite (x))
++ return 1 / (x + x * x);
++ if (x <= 0)
++ {
++ if (x < 0)
++ return (zero / (zero * x));
++ return -1 / zero; /* -inf and divide by zero exception. */
++ }
++ xx = fabsl (x);
++ if (xx <= 0x1p-57)
++ return U0 + TWOOPI * __ieee754_logl (x);
++ if (xx <= 2)
++ {
++ /* 0 <= x <= 2 */
++ z = xx * xx;
++ p = neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D);
++ p = TWOOPI * __ieee754_logl (x) * __ieee754_j0l (x) + p;
++ return p;
++ }
++
++ /* X = x - pi/4
++ cos(X) = cos(x) cos(pi/4) + sin(x) sin(pi/4)
++ = 1/sqrt(2) * (cos(x) + sin(x))
++ sin(X) = sin(x) cos(pi/4) - cos(x) sin(pi/4)
++ = 1/sqrt(2) * (sin(x) - cos(x))
++ sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
++ cf. Fdlibm. */
++ __sincosl (x, &s, &c);
++ ss = s - c;
++ cc = s + c;
++ if (xx <= LDBL_MAX / 2)
++ {
++ z = -__cosl (x + x);
++ if ((s * c) < 0)
++ cc = z / ss;
++ else
++ ss = z / cc;
++ }
++
++ if (xx > 0x1p256L)
++ return ONEOSQPI * ss / __ieee754_sqrtl (x);
++
++ xinv = 1 / xx;
++ z = xinv * xinv;
++ if (xinv <= 0.25)
++ {
++ if (xinv <= 0.125)
++ {
++ if (xinv <= 0.0625)
++ {
++ p = neval (z, P16_IN, NP16_IN) / deval (z, P16_ID, NP16_ID);
++ q = neval (z, Q16_IN, NQ16_IN) / deval (z, Q16_ID, NQ16_ID);
++ }
++ else
++ {
++ p = neval (z, P8_16N, NP8_16N) / deval (z, P8_16D, NP8_16D);
++ q = neval (z, Q8_16N, NQ8_16N) / deval (z, Q8_16D, NQ8_16D);
++ }
++ }
++ else if (xinv <= 0.1875)
++ {
++ p = neval (z, P5_8N, NP5_8N) / deval (z, P5_8D, NP5_8D);
++ q = neval (z, Q5_8N, NQ5_8N) / deval (z, Q5_8D, NQ5_8D);
++ }
++ else
++ {
++ p = neval (z, P4_5N, NP4_5N) / deval (z, P4_5D, NP4_5D);
++ q = neval (z, Q4_5N, NQ4_5N) / deval (z, Q4_5D, NQ4_5D);
++ }
++ } /* .25 */
++ else /* if (xinv <= 0.5) */
++ {
++ if (xinv <= 0.375)
++ {
++ if (xinv <= 0.3125)
++ {
++ p = neval (z, P3r2_4N, NP3r2_4N) / deval (z, P3r2_4D, NP3r2_4D);
++ q = neval (z, Q3r2_4N, NQ3r2_4N) / deval (z, Q3r2_4D, NQ3r2_4D);
++ }
++ else
++ {
++ p = neval (z, P2r7_3r2N, NP2r7_3r2N)
++ / deval (z, P2r7_3r2D, NP2r7_3r2D);
++ q = neval (z, Q2r7_3r2N, NQ2r7_3r2N)
++ / deval (z, Q2r7_3r2D, NQ2r7_3r2D);
++ }
++ }
++ else if (xinv <= 0.4375)
++ {
++ p = neval (z, P2r3_2r7N, NP2r3_2r7N)
++ / deval (z, P2r3_2r7D, NP2r3_2r7D);
++ q = neval (z, Q2r3_2r7N, NQ2r3_2r7N)
++ / deval (z, Q2r3_2r7D, NQ2r3_2r7D);
++ }
++ else
++ {
++ p = neval (z, P2_2r3N, NP2_2r3N) / deval (z, P2_2r3D, NP2_2r3D);
++ q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D);
++ }
++ }
++ p = 1 + z * p;
++ q = z * xinv * q;
++ q = q - 0.125L * xinv;
++ z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (x);
++ return z;
++}
++strong_alias (__ieee754_y0l, __y0l_finite)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_j1l.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_j1l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_j1l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_j1l.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,4 +1,884 @@
+-/* Looks like we can use ieee854 e_j1l.c as is for IBM extended format. */
+-#define _Float128 long double
+-#define L(x) x ## L
+-#include <sysdeps/ieee754/ldbl-128/e_j1l.c>
++/* Bessel function of order one. IBM Extended Precision version.
++ Copyright 2001 by Stephen L. Moshier (moshier@na-net.onrl.gov).
++
++ This 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.
++
++ This 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 this library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++/* This file was copied from sysdeps/ieee754/ldbl-128/e_j0l.c. */
++
++
++#include <errno.h>
++#include <math.h>
++#include <math_private.h>
++#include <float.h>
++
++/* 1 / sqrt(pi) */
++static const long double ONEOSQPI = 5.6418958354775628694807945156077258584405E-1L;
++/* 2 / pi */
++static const long double TWOOPI = 6.3661977236758134307553505349005744813784E-1L;
++static const long double zero = 0;
++
++/* J1(x) = .5x + x x^2 R(x^2)
++ Peak relative error 1.9e-35
++ 0 <= x <= 2 */
++#define NJ0_2N 6
++static const long double J0_2N[NJ0_2N + 1] = {
++ -5.943799577386942855938508697619735179660E16L,
++ 1.812087021305009192259946997014044074711E15L,
++ -2.761698314264509665075127515729146460895E13L,
++ 2.091089497823600978949389109350658815972E11L,
++ -8.546413231387036372945453565654130054307E8L,
++ 1.797229225249742247475464052741320612261E6L,
++ -1.559552840946694171346552770008812083969E3L
++};
++#define NJ0_2D 6
++static const long double J0_2D[NJ0_2D + 1] = {
++ 9.510079323819108569501613916191477479397E17L,
++ 1.063193817503280529676423936545854693915E16L,
++ 5.934143516050192600795972192791775226920E13L,
++ 2.168000911950620999091479265214368352883E11L,
++ 5.673775894803172808323058205986256928794E8L,
++ 1.080329960080981204840966206372671147224E6L,
++ 1.411951256636576283942477881535283304912E3L,
++ /* 1.000000000000000000000000000000000000000E0L */
++};
++
++/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
++ 0 <= 1/x <= .0625
++ Peak relative error 3.6e-36 */
++#define NP16_IN 9
++static const long double P16_IN[NP16_IN + 1] = {
++ 5.143674369359646114999545149085139822905E-16L,
++ 4.836645664124562546056389268546233577376E-13L,
++ 1.730945562285804805325011561498453013673E-10L,
++ 3.047976856147077889834905908605310585810E-8L,
++ 2.855227609107969710407464739188141162386E-6L,
++ 1.439362407936705484122143713643023998457E-4L,
++ 3.774489768532936551500999699815873422073E-3L,
++ 4.723962172984642566142399678920790598426E-2L,
++ 2.359289678988743939925017240478818248735E-1L,
++ 3.032580002220628812728954785118117124520E-1L,
++};
++#define NP16_ID 9
++static const long double P16_ID[NP16_ID + 1] = {
++ 4.389268795186898018132945193912677177553E-15L,
++ 4.132671824807454334388868363256830961655E-12L,
++ 1.482133328179508835835963635130894413136E-9L,
++ 2.618941412861122118906353737117067376236E-7L,
++ 2.467854246740858470815714426201888034270E-5L,
++ 1.257192927368839847825938545925340230490E-3L,
++ 3.362739031941574274949719324644120720341E-2L,
++ 4.384458231338934105875343439265370178858E-1L,
++ 2.412830809841095249170909628197264854651E0L,
++ 4.176078204111348059102962617368214856874E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
++ 0.0625 <= 1/x <= 0.125
++ Peak relative error 1.9e-36 */
++#define NP8_16N 11
++static const long double P8_16N[NP8_16N + 1] = {
++ 2.984612480763362345647303274082071598135E-16L,
++ 1.923651877544126103941232173085475682334E-13L,
++ 4.881258879388869396043760693256024307743E-11L,
++ 6.368866572475045408480898921866869811889E-9L,
++ 4.684818344104910450523906967821090796737E-7L,
++ 2.005177298271593587095982211091300382796E-5L,
++ 4.979808067163957634120681477207147536182E-4L,
++ 6.946005761642579085284689047091173581127E-3L,
++ 5.074601112955765012750207555985299026204E-2L,
++ 1.698599455896180893191766195194231825379E-1L,
++ 1.957536905259237627737222775573623779638E-1L,
++ 2.991314703282528370270179989044994319374E-2L,
++};
++#define NP8_16D 10
++static const long double P8_16D[NP8_16D + 1] = {
++ 2.546869316918069202079580939942463010937E-15L,
++ 1.644650111942455804019788382157745229955E-12L,
++ 4.185430770291694079925607420808011147173E-10L,
++ 5.485331966975218025368698195861074143153E-8L,
++ 4.062884421686912042335466327098932678905E-6L,
++ 1.758139661060905948870523641319556816772E-4L,
++ 4.445143889306356207566032244985607493096E-3L,
++ 6.391901016293512632765621532571159071158E-2L,
++ 4.933040207519900471177016015718145795434E-1L,
++ 1.839144086168947712971630337250761842976E0L,
++ 2.715120873995490920415616716916149586579E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
++ 0.125 <= 1/x <= 0.1875
++ Peak relative error 1.3e-36 */
++#define NP5_8N 10
++static const long double P5_8N[NP5_8N + 1] = {
++ 2.837678373978003452653763806968237227234E-12L,
++ 9.726641165590364928442128579282742354806E-10L,
++ 1.284408003604131382028112171490633956539E-7L,
++ 8.524624695868291291250573339272194285008E-6L,
++ 3.111516908953172249853673787748841282846E-4L,
++ 6.423175156126364104172801983096596409176E-3L,
++ 7.430220589989104581004416356260692450652E-2L,
++ 4.608315409833682489016656279567605536619E-1L,
++ 1.396870223510964882676225042258855977512E0L,
++ 1.718500293904122365894630460672081526236E0L,
++ 5.465927698800862172307352821870223855365E-1L
++};
++#define NP5_8D 10
++static const long double P5_8D[NP5_8D + 1] = {
++ 2.421485545794616609951168511612060482715E-11L,
++ 8.329862750896452929030058039752327232310E-9L,
++ 1.106137992233383429630592081375289010720E-6L,
++ 7.405786153760681090127497796448503306939E-5L,
++ 2.740364785433195322492093333127633465227E-3L,
++ 5.781246470403095224872243564165254652198E-2L,
++ 6.927711353039742469918754111511109983546E-1L,
++ 4.558679283460430281188304515922826156690E0L,
++ 1.534468499844879487013168065728837900009E1L,
++ 2.313927430889218597919624843161569422745E1L,
++ 1.194506341319498844336768473218382828637E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
++ Peak relative error 1.4e-36
++ 0.1875 <= 1/x <= 0.25 */
++#define NP4_5N 10
++static const long double P4_5N[NP4_5N + 1] = {
++ 1.846029078268368685834261260420933914621E-10L,
++ 3.916295939611376119377869680335444207768E-8L,
++ 3.122158792018920627984597530935323997312E-6L,
++ 1.218073444893078303994045653603392272450E-4L,
++ 2.536420827983485448140477159977981844883E-3L,
++ 2.883011322006690823959367922241169171315E-2L,
++ 1.755255190734902907438042414495469810830E-1L,
++ 5.379317079922628599870898285488723736599E-1L,
++ 7.284904050194300773890303361501726561938E-1L,
++ 3.270110346613085348094396323925000362813E-1L,
++ 1.804473805689725610052078464951722064757E-2L,
++};
++#define NP4_5D 9
++static const long double P4_5D[NP4_5D + 1] = {
++ 1.575278146806816970152174364308980863569E-9L,
++ 3.361289173657099516191331123405675054321E-7L,
++ 2.704692281550877810424745289838790693708E-5L,
++ 1.070854930483999749316546199273521063543E-3L,
++ 2.282373093495295842598097265627962125411E-2L,
++ 2.692025460665354148328762368240343249830E-1L,
++ 1.739892942593664447220951225734811133759E0L,
++ 5.890727576752230385342377570386657229324E0L,
++ 9.517442287057841500750256954117735128153E0L,
++ 6.100616353935338240775363403030137736013E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
++ Peak relative error 3.0e-36
++ 0.25 <= 1/x <= 0.3125 */
++#define NP3r2_4N 9
++static const long double P3r2_4N[NP3r2_4N + 1] = {
++ 8.240803130988044478595580300846665863782E-8L,
++ 1.179418958381961224222969866406483744580E-5L,
++ 6.179787320956386624336959112503824397755E-4L,
++ 1.540270833608687596420595830747166658383E-2L,
++ 1.983904219491512618376375619598837355076E-1L,
++ 1.341465722692038870390470651608301155565E0L,
++ 4.617865326696612898792238245990854646057E0L,
++ 7.435574801812346424460233180412308000587E0L,
++ 4.671327027414635292514599201278557680420E0L,
++ 7.299530852495776936690976966995187714739E-1L,
++};
++#define NP3r2_4D 9
++static const long double P3r2_4D[NP3r2_4D + 1] = {
++ 7.032152009675729604487575753279187576521E-7L,
++ 1.015090352324577615777511269928856742848E-4L,
++ 5.394262184808448484302067955186308730620E-3L,
++ 1.375291438480256110455809354836988584325E-1L,
++ 1.836247144461106304788160919310404376670E0L,
++ 1.314378564254376655001094503090935880349E1L,
++ 4.957184590465712006934452500894672343488E1L,
++ 9.287394244300647738855415178790263465398E1L,
++ 7.652563275535900609085229286020552768399E1L,
++ 2.147042473003074533150718117770093209096E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
++ Peak relative error 1.0e-35
++ 0.3125 <= 1/x <= 0.375 */
++#define NP2r7_3r2N 9
++static const long double P2r7_3r2N[NP2r7_3r2N + 1] = {
++ 4.599033469240421554219816935160627085991E-7L,
++ 4.665724440345003914596647144630893997284E-5L,
++ 1.684348845667764271596142716944374892756E-3L,
++ 2.802446446884455707845985913454440176223E-2L,
++ 2.321937586453963310008279956042545173930E-1L,
++ 9.640277413988055668692438709376437553804E-1L,
++ 1.911021064710270904508663334033003246028E0L,
++ 1.600811610164341450262992138893970224971E0L,
++ 4.266299218652587901171386591543457861138E-1L,
++ 1.316470424456061252962568223251247207325E-2L,
++};
++#define NP2r7_3r2D 8
++static const long double P2r7_3r2D[NP2r7_3r2D + 1] = {
++ 3.924508608545520758883457108453520099610E-6L,
++ 4.029707889408829273226495756222078039823E-4L,
++ 1.484629715787703260797886463307469600219E-2L,
++ 2.553136379967180865331706538897231588685E-1L,
++ 2.229457223891676394409880026887106228740E0L,
++ 1.005708903856384091956550845198392117318E1L,
++ 2.277082659664386953166629360352385889558E1L,
++ 2.384726835193630788249826630376533988245E1L,
++ 9.700989749041320895890113781610939632410E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
++ Peak relative error 1.7e-36
++ 0.3125 <= 1/x <= 0.4375 */
++#define NP2r3_2r7N 9
++static const long double P2r3_2r7N[NP2r3_2r7N + 1] = {
++ 3.916766777108274628543759603786857387402E-6L,
++ 3.212176636756546217390661984304645137013E-4L,
++ 9.255768488524816445220126081207248947118E-3L,
++ 1.214853146369078277453080641911700735354E-1L,
++ 7.855163309847214136198449861311404633665E-1L,
++ 2.520058073282978403655488662066019816540E0L,
++ 3.825136484837545257209234285382183711466E0L,
++ 2.432569427554248006229715163865569506873E0L,
++ 4.877934835018231178495030117729800489743E-1L,
++ 1.109902737860249670981355149101343427885E-2L,
++};
++#define NP2r3_2r7D 8
++static const long double P2r3_2r7D[NP2r3_2r7D + 1] = {
++ 3.342307880794065640312646341190547184461E-5L,
++ 2.782182891138893201544978009012096558265E-3L,
++ 8.221304931614200702142049236141249929207E-2L,
++ 1.123728246291165812392918571987858010949E0L,
++ 7.740482453652715577233858317133423434590E0L,
++ 2.737624677567945952953322566311201919139E1L,
++ 4.837181477096062403118304137851260715475E1L,
++ 3.941098643468580791437772701093795299274E1L,
++ 1.245821247166544627558323920382547533630E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2),
++ Peak relative error 1.7e-35
++ 0.4375 <= 1/x <= 0.5 */
++#define NP2_2r3N 8
++static const long double P2_2r3N[NP2_2r3N + 1] = {
++ 3.397930802851248553545191160608731940751E-4L,
++ 2.104020902735482418784312825637833698217E-2L,
++ 4.442291771608095963935342749477836181939E-1L,
++ 4.131797328716583282869183304291833754967E0L,
++ 1.819920169779026500146134832455189917589E1L,
++ 3.781779616522937565300309684282401791291E1L,
++ 3.459605449728864218972931220783543410347E1L,
++ 1.173594248397603882049066603238568316561E1L,
++ 9.455702270242780642835086549285560316461E-1L,
++};
++#define NP2_2r3D 8
++static const long double P2_2r3D[NP2_2r3D + 1] = {
++ 2.899568897241432883079888249845707400614E-3L,
++ 1.831107138190848460767699919531132426356E-1L,
++ 3.999350044057883839080258832758908825165E0L,
++ 3.929041535867957938340569419874195303712E1L,
++ 1.884245613422523323068802689915538908291E2L,
++ 4.461469948819229734353852978424629815929E2L,
++ 5.004998753999796821224085972610636347903E2L,
++ 2.386342520092608513170837883757163414100E2L,
++ 3.791322528149347975999851588922424189957E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
++ Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)),
++ Peak relative error 8.0e-36
++ 0 <= 1/x <= .0625 */
++#define NQ16_IN 10
++static const long double Q16_IN[NQ16_IN + 1] = {
++ -3.917420835712508001321875734030357393421E-18L,
++ -4.440311387483014485304387406538069930457E-15L,
++ -1.951635424076926487780929645954007139616E-12L,
++ -4.318256438421012555040546775651612810513E-10L,
++ -5.231244131926180765270446557146989238020E-8L,
++ -3.540072702902043752460711989234732357653E-6L,
++ -1.311017536555269966928228052917534882984E-4L,
++ -2.495184669674631806622008769674827575088E-3L,
++ -2.141868222987209028118086708697998506716E-2L,
++ -6.184031415202148901863605871197272650090E-2L,
++ -1.922298704033332356899546792898156493887E-2L,
++};
++#define NQ16_ID 9
++static const long double Q16_ID[NQ16_ID + 1] = {
++ 3.820418034066293517479619763498400162314E-17L,
++ 4.340702810799239909648911373329149354911E-14L,
++ 1.914985356383416140706179933075303538524E-11L,
++ 4.262333682610888819476498617261895474330E-9L,
++ 5.213481314722233980346462747902942182792E-7L,
++ 3.585741697694069399299005316809954590558E-5L,
++ 1.366513429642842006385029778105539457546E-3L,
++ 2.745282599850704662726337474371355160594E-2L,
++ 2.637644521611867647651200098449903330074E-1L,
++ 1.006953426110765984590782655598680488746E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++ };
++
++/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
++ Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)),
++ Peak relative error 1.9e-36
++ 0.0625 <= 1/x <= 0.125 */
++#define NQ8_16N 11
++static const long double Q8_16N[NQ8_16N + 1] = {
++ -2.028630366670228670781362543615221542291E-17L,
++ -1.519634620380959966438130374006858864624E-14L,
++ -4.540596528116104986388796594639405114524E-12L,
++ -7.085151756671466559280490913558388648274E-10L,
++ -6.351062671323970823761883833531546885452E-8L,
++ -3.390817171111032905297982523519503522491E-6L,
++ -1.082340897018886970282138836861233213972E-4L,
++ -2.020120801187226444822977006648252379508E-3L,
++ -2.093169910981725694937457070649605557555E-2L,
++ -1.092176538874275712359269481414448063393E-1L,
++ -2.374790947854765809203590474789108718733E-1L,
++ -1.365364204556573800719985118029601401323E-1L,
++};
++#define NQ8_16D 11
++static const long double Q8_16D[NQ8_16D + 1] = {
++ 1.978397614733632533581207058069628242280E-16L,
++ 1.487361156806202736877009608336766720560E-13L,
++ 4.468041406888412086042576067133365913456E-11L,
++ 7.027822074821007443672290507210594648877E-9L,
++ 6.375740580686101224127290062867976007374E-7L,
++ 3.466887658320002225888644977076410421940E-5L,
++ 1.138625640905289601186353909213719596986E-3L,
++ 2.224470799470414663443449818235008486439E-2L,
++ 2.487052928527244907490589787691478482358E-1L,
++ 1.483927406564349124649083853892380899217E0L,
++ 4.182773513276056975777258788903489507705E0L,
++ 4.419665392573449746043880892524360870944E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
++ Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)),
++ Peak relative error 1.5e-35
++ 0.125 <= 1/x <= 0.1875 */
++#define NQ5_8N 10
++static const long double Q5_8N[NQ5_8N + 1] = {
++ -3.656082407740970534915918390488336879763E-13L,
++ -1.344660308497244804752334556734121771023E-10L,
++ -1.909765035234071738548629788698150760791E-8L,
++ -1.366668038160120210269389551283666716453E-6L,
++ -5.392327355984269366895210704976314135683E-5L,
++ -1.206268245713024564674432357634540343884E-3L,
++ -1.515456784370354374066417703736088291287E-2L,
++ -1.022454301137286306933217746545237098518E-1L,
++ -3.373438906472495080504907858424251082240E-1L,
++ -4.510782522110845697262323973549178453405E-1L,
++ -1.549000892545288676809660828213589804884E-1L,
++};
++#define NQ5_8D 10
++static const long double Q5_8D[NQ5_8D + 1] = {
++ 3.565550843359501079050699598913828460036E-12L,
++ 1.321016015556560621591847454285330528045E-9L,
++ 1.897542728662346479999969679234270605975E-7L,
++ 1.381720283068706710298734234287456219474E-5L,
++ 5.599248147286524662305325795203422873725E-4L,
++ 1.305442352653121436697064782499122164843E-2L,
++ 1.750234079626943298160445750078631894985E-1L,
++ 1.311420542073436520965439883806946678491E0L,
++ 5.162757689856842406744504211089724926650E0L,
++ 9.527760296384704425618556332087850581308E0L,
++ 6.604648207463236667912921642545100248584E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
++ Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)),
++ Peak relative error 1.3e-35
++ 0.1875 <= 1/x <= 0.25 */
++#define NQ4_5N 10
++static const long double Q4_5N[NQ4_5N + 1] = {
++ -4.079513568708891749424783046520200903755E-11L,
++ -9.326548104106791766891812583019664893311E-9L,
++ -8.016795121318423066292906123815687003356E-7L,
++ -3.372350544043594415609295225664186750995E-5L,
++ -7.566238665947967882207277686375417983917E-4L,
++ -9.248861580055565402130441618521591282617E-3L,
++ -6.033106131055851432267702948850231270338E-2L,
++ -1.966908754799996793730369265431584303447E-1L,
++ -2.791062741179964150755788226623462207560E-1L,
++ -1.255478605849190549914610121863534191666E-1L,
++ -4.320429862021265463213168186061696944062E-3L,
++};
++#define NQ4_5D 9
++static const long double Q4_5D[NQ4_5D + 1] = {
++ 3.978497042580921479003851216297330701056E-10L,
++ 9.203304163828145809278568906420772246666E-8L,
++ 8.059685467088175644915010485174545743798E-6L,
++ 3.490187375993956409171098277561669167446E-4L,
++ 8.189109654456872150100501732073810028829E-3L,
++ 1.072572867311023640958725265762483033769E-1L,
++ 7.790606862409960053675717185714576937994E-1L,
++ 3.016049768232011196434185423512777656328E0L,
++ 5.722963851442769787733717162314477949360E0L,
++ 4.510527838428473279647251350931380867663E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
++ Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)),
++ Peak relative error 2.1e-35
++ 0.25 <= 1/x <= 0.3125 */
++#define NQ3r2_4N 9
++static const long double Q3r2_4N[NQ3r2_4N + 1] = {
++ -1.087480809271383885936921889040388133627E-8L,
++ -1.690067828697463740906962973479310170932E-6L,
++ -9.608064416995105532790745641974762550982E-5L,
++ -2.594198839156517191858208513873961837410E-3L,
++ -3.610954144421543968160459863048062977822E-2L,
++ -2.629866798251843212210482269563961685666E-1L,
++ -9.709186825881775885917984975685752956660E-1L,
++ -1.667521829918185121727268867619982417317E0L,
++ -1.109255082925540057138766105229900943501E0L,
++ -1.812932453006641348145049323713469043328E-1L,
++};
++#define NQ3r2_4D 9
++static const long double Q3r2_4D[NQ3r2_4D + 1] = {
++ 1.060552717496912381388763753841473407026E-7L,
++ 1.676928002024920520786883649102388708024E-5L,
++ 9.803481712245420839301400601140812255737E-4L,
++ 2.765559874262309494758505158089249012930E-2L,
++ 4.117921827792571791298862613287549140706E-1L,
++ 3.323769515244751267093378361930279161413E0L,
++ 1.436602494405814164724810151689705353670E1L,
++ 3.163087869617098638064881410646782408297E1L,
++ 3.198181264977021649489103980298349589419E1L,
++ 1.203649258862068431199471076202897823272E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
++ Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)),
++ Peak relative error 1.6e-36
++ 0.3125 <= 1/x <= 0.375 */
++#define NQ2r7_3r2N 9
++static const long double Q2r7_3r2N[NQ2r7_3r2N + 1] = {
++ -1.723405393982209853244278760171643219530E-7L,
++ -2.090508758514655456365709712333460087442E-5L,
++ -9.140104013370974823232873472192719263019E-4L,
++ -1.871349499990714843332742160292474780128E-2L,
++ -1.948930738119938669637865956162512983416E-1L,
++ -1.048764684978978127908439526343174139788E0L,
++ -2.827714929925679500237476105843643064698E0L,
++ -3.508761569156476114276988181329773987314E0L,
++ -1.669332202790211090973255098624488308989E0L,
++ -1.930796319299022954013840684651016077770E-1L,
++};
++#define NQ2r7_3r2D 9
++static const long double Q2r7_3r2D[NQ2r7_3r2D + 1] = {
++ 1.680730662300831976234547482334347983474E-6L,
++ 2.084241442440551016475972218719621841120E-4L,
++ 9.445316642108367479043541702688736295579E-3L,
++ 2.044637889456631896650179477133252184672E-1L,
++ 2.316091982244297350829522534435350078205E0L,
++ 1.412031891783015085196708811890448488865E1L,
++ 4.583830154673223384837091077279595496149E1L,
++ 7.549520609270909439885998474045974122261E1L,
++ 5.697605832808113367197494052388203310638E1L,
++ 1.601496240876192444526383314589371686234E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
++ Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)),
++ Peak relative error 9.5e-36
++ 0.375 <= 1/x <= 0.4375 */
++#define NQ2r3_2r7N 9
++static const long double Q2r3_2r7N[NQ2r3_2r7N + 1] = {
++ -8.603042076329122085722385914954878953775E-7L,
++ -7.701746260451647874214968882605186675720E-5L,
++ -2.407932004380727587382493696877569654271E-3L,
++ -3.403434217607634279028110636919987224188E-2L,
++ -2.348707332185238159192422084985713102877E-1L,
++ -7.957498841538254916147095255700637463207E-1L,
++ -1.258469078442635106431098063707934348577E0L,
++ -8.162415474676345812459353639449971369890E-1L,
++ -1.581783890269379690141513949609572806898E-1L,
++ -1.890595651683552228232308756569450822905E-3L,
++};
++#define NQ2r3_2r7D 8
++static const long double Q2r3_2r7D[NQ2r3_2r7D + 1] = {
++ 8.390017524798316921170710533381568175665E-6L,
++ 7.738148683730826286477254659973968763659E-4L,
++ 2.541480810958665794368759558791634341779E-2L,
++ 3.878879789711276799058486068562386244873E-1L,
++ 3.003783779325811292142957336802456109333E0L,
++ 1.206480374773322029883039064575464497400E1L,
++ 2.458414064785315978408974662900438351782E1L,
++ 2.367237826273668567199042088835448715228E1L,
++ 9.231451197519171090875569102116321676763E0L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
++ Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)),
++ Peak relative error 1.4e-36
++ 0.4375 <= 1/x <= 0.5 */
++#define NQ2_2r3N 9
++static const long double Q2_2r3N[NQ2_2r3N + 1] = {
++ -5.552507516089087822166822364590806076174E-6L,
++ -4.135067659799500521040944087433752970297E-4L,
++ -1.059928728869218962607068840646564457980E-2L,
++ -1.212070036005832342565792241385459023801E-1L,
++ -6.688350110633603958684302153362735625156E-1L,
++ -1.793587878197360221340277951304429821582E0L,
++ -2.225407682237197485644647380483725045326E0L,
++ -1.123402135458940189438898496348239744403E0L,
++ -1.679187241566347077204805190763597299805E-1L,
++ -1.458550613639093752909985189067233504148E-3L,
++};
++#define NQ2_2r3D 8
++static const long double Q2_2r3D[NQ2_2r3D + 1] = {
++ 5.415024336507980465169023996403597916115E-5L,
++ 4.179246497380453022046357404266022870788E-3L,
++ 1.136306384261959483095442402929502368598E-1L,
++ 1.422640343719842213484515445393284072830E0L,
++ 8.968786703393158374728850922289204805764E0L,
++ 2.914542473339246127533384118781216495934E1L,
++ 4.781605421020380669870197378210457054685E1L,
++ 3.693865837171883152382820584714795072937E1L,
++ 1.153220502744204904763115556224395893076E1L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++
++/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
++
++static long double
++neval (long double x, const long double *p, int n)
++{
++ long double y;
++
++ p += n;
++ y = *p--;
++ do
++ {
++ y = y * x + *p--;
++ }
++ while (--n > 0);
++ return y;
++}
++
++
++/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */
++
++static long double
++deval (long double x, const long double *p, int n)
++{
++ long double y;
++
++ p += n;
++ y = x + *p--;
++ do
++ {
++ y = y * x + *p--;
++ }
++ while (--n > 0);
++ return y;
++}
++
++
++/* Bessel function of the first kind, order one. */
++
++long double
++__ieee754_j1l (long double x)
++{
++ long double xx, xinv, z, p, q, c, s, cc, ss;
++
++ if (! isfinite (x))
++ {
++ if (x != x)
++ return x + x;
++ else
++ return 0;
++ }
++ if (x == 0)
++ return x;
++ xx = fabsl (x);
++ if (xx <= 0x1p-58L)
++ {
++ long double ret = x * 0.5L;
++ math_check_force_underflow (ret);
++ if (ret == 0)
++ __set_errno (ERANGE);
++ return ret;
++ }
++ if (xx <= 2)
++ {
++ /* 0 <= x <= 2 */
++ z = xx * xx;
++ p = xx * z * neval (z, J0_2N, NJ0_2N) / deval (z, J0_2D, NJ0_2D);
++ p += 0.5L * xx;
++ if (x < 0)
++ p = -p;
++ return p;
++ }
++
++ /* X = x - 3 pi/4
++ cos(X) = cos(x) cos(3 pi/4) + sin(x) sin(3 pi/4)
++ = 1/sqrt(2) * (-cos(x) + sin(x))
++ sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4)
++ = -1/sqrt(2) * (sin(x) + cos(x))
++ cf. Fdlibm. */
++ __sincosl (xx, &s, &c);
++ ss = -s - c;
++ cc = s - c;
++ if (xx <= LDBL_MAX / 2)
++ {
++ z = __cosl (xx + xx);
++ if ((s * c) > 0)
++ cc = z / ss;
++ else
++ ss = z / cc;
++ }
++
++ if (xx > 0x1p256L)
++ {
++ z = ONEOSQPI * cc / __ieee754_sqrtl (xx);
++ if (x < 0)
++ z = -z;
++ return z;
++ }
++
++ xinv = 1 / xx;
++ z = xinv * xinv;
++ if (xinv <= 0.25)
++ {
++ if (xinv <= 0.125)
++ {
++ if (xinv <= 0.0625)
++ {
++ p = neval (z, P16_IN, NP16_IN) / deval (z, P16_ID, NP16_ID);
++ q = neval (z, Q16_IN, NQ16_IN) / deval (z, Q16_ID, NQ16_ID);
++ }
++ else
++ {
++ p = neval (z, P8_16N, NP8_16N) / deval (z, P8_16D, NP8_16D);
++ q = neval (z, Q8_16N, NQ8_16N) / deval (z, Q8_16D, NQ8_16D);
++ }
++ }
++ else if (xinv <= 0.1875)
++ {
++ p = neval (z, P5_8N, NP5_8N) / deval (z, P5_8D, NP5_8D);
++ q = neval (z, Q5_8N, NQ5_8N) / deval (z, Q5_8D, NQ5_8D);
++ }
++ else
++ {
++ p = neval (z, P4_5N, NP4_5N) / deval (z, P4_5D, NP4_5D);
++ q = neval (z, Q4_5N, NQ4_5N) / deval (z, Q4_5D, NQ4_5D);
++ }
++ } /* .25 */
++ else /* if (xinv <= 0.5) */
++ {
++ if (xinv <= 0.375)
++ {
++ if (xinv <= 0.3125)
++ {
++ p = neval (z, P3r2_4N, NP3r2_4N) / deval (z, P3r2_4D, NP3r2_4D);
++ q = neval (z, Q3r2_4N, NQ3r2_4N) / deval (z, Q3r2_4D, NQ3r2_4D);
++ }
++ else
++ {
++ p = neval (z, P2r7_3r2N, NP2r7_3r2N)
++ / deval (z, P2r7_3r2D, NP2r7_3r2D);
++ q = neval (z, Q2r7_3r2N, NQ2r7_3r2N)
++ / deval (z, Q2r7_3r2D, NQ2r7_3r2D);
++ }
++ }
++ else if (xinv <= 0.4375)
++ {
++ p = neval (z, P2r3_2r7N, NP2r3_2r7N)
++ / deval (z, P2r3_2r7D, NP2r3_2r7D);
++ q = neval (z, Q2r3_2r7N, NQ2r3_2r7N)
++ / deval (z, Q2r3_2r7D, NQ2r3_2r7D);
++ }
++ else
++ {
++ p = neval (z, P2_2r3N, NP2_2r3N) / deval (z, P2_2r3D, NP2_2r3D);
++ q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D);
++ }
++ }
++ p = 1 + z * p;
++ q = z * q;
++ q = q * xinv + 0.375L * xinv;
++ z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx);
++ if (x < 0)
++ z = -z;
++ return z;
++}
++strong_alias (__ieee754_j1l, __j1l_finite)
++
++
++/* Y1(x) = 2/pi * (log(x) * J1(x) - 1/x) + x R(x^2)
++ Peak relative error 6.2e-38
++ 0 <= x <= 2 */
++#define NY0_2N 7
++static long double Y0_2N[NY0_2N + 1] = {
++ -6.804415404830253804408698161694720833249E19L,
++ 1.805450517967019908027153056150465849237E19L,
++ -8.065747497063694098810419456383006737312E17L,
++ 1.401336667383028259295830955439028236299E16L,
++ -1.171654432898137585000399489686629680230E14L,
++ 5.061267920943853732895341125243428129150E11L,
++ -1.096677850566094204586208610960870217970E9L,
++ 9.541172044989995856117187515882879304461E5L,
++};
++#define NY0_2D 7
++static long double Y0_2D[NY0_2D + 1] = {
++ 3.470629591820267059538637461549677594549E20L,
++ 4.120796439009916326855848107545425217219E18L,
++ 2.477653371652018249749350657387030814542E16L,
++ 9.954678543353888958177169349272167762797E13L,
++ 2.957927997613630118216218290262851197754E11L,
++ 6.748421382188864486018861197614025972118E8L,
++ 1.173453425218010888004562071020305709319E6L,
++ 1.450335662961034949894009554536003377187E3L,
++ /* 1.000000000000000000000000000000000000000E0 */
++};
++
++
++/* Bessel function of the second kind, order one. */
++
++long double
++__ieee754_y1l (long double x)
++{
++ long double xx, xinv, z, p, q, c, s, cc, ss;
++
++ if (! isfinite (x))
++ return 1 / (x + x * x);
++ if (x <= 0)
++ {
++ if (x < 0)
++ return (zero / (zero * x));
++ return -1 / zero; /* -inf and divide by zero exception. */
++ }
++ xx = fabsl (x);
++ if (xx <= 0x1p-114)
++ {
++ z = -TWOOPI / x;
++ if (isinf (z))
++ __set_errno (ERANGE);
++ return z;
++ }
++ if (xx <= 2)
++ {
++ /* 0 <= x <= 2 */
++ SET_RESTORE_ROUNDL (FE_TONEAREST);
++ z = xx * xx;
++ p = xx * neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D);
++ p = -TWOOPI / xx + p;
++ p = TWOOPI * __ieee754_logl (x) * __ieee754_j1l (x) + p;
++ return p;
++ }
++
++ /* X = x - 3 pi/4
++ cos(X) = cos(x) cos(3 pi/4) + sin(x) sin(3 pi/4)
++ = 1/sqrt(2) * (-cos(x) + sin(x))
++ sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4)
++ = -1/sqrt(2) * (sin(x) + cos(x))
++ cf. Fdlibm. */
++ __sincosl (xx, &s, &c);
++ ss = -s - c;
++ cc = s - c;
++ if (xx <= LDBL_MAX / 2)
++ {
++ z = __cosl (xx + xx);
++ if ((s * c) > 0)
++ cc = z / ss;
++ else
++ ss = z / cc;
++ }
++
++ if (xx > 0x1p256L)
++ return ONEOSQPI * ss / __ieee754_sqrtl (xx);
++
++ xinv = 1 / xx;
++ z = xinv * xinv;
++ if (xinv <= 0.25)
++ {
++ if (xinv <= 0.125)
++ {
++ if (xinv <= 0.0625)
++ {
++ p = neval (z, P16_IN, NP16_IN) / deval (z, P16_ID, NP16_ID);
++ q = neval (z, Q16_IN, NQ16_IN) / deval (z, Q16_ID, NQ16_ID);
++ }
++ else
++ {
++ p = neval (z, P8_16N, NP8_16N) / deval (z, P8_16D, NP8_16D);
++ q = neval (z, Q8_16N, NQ8_16N) / deval (z, Q8_16D, NQ8_16D);
++ }
++ }
++ else if (xinv <= 0.1875)
++ {
++ p = neval (z, P5_8N, NP5_8N) / deval (z, P5_8D, NP5_8D);
++ q = neval (z, Q5_8N, NQ5_8N) / deval (z, Q5_8D, NQ5_8D);
++ }
++ else
++ {
++ p = neval (z, P4_5N, NP4_5N) / deval (z, P4_5D, NP4_5D);
++ q = neval (z, Q4_5N, NQ4_5N) / deval (z, Q4_5D, NQ4_5D);
++ }
++ } /* .25 */
++ else /* if (xinv <= 0.5) */
++ {
++ if (xinv <= 0.375)
++ {
++ if (xinv <= 0.3125)
++ {
++ p = neval (z, P3r2_4N, NP3r2_4N) / deval (z, P3r2_4D, NP3r2_4D);
++ q = neval (z, Q3r2_4N, NQ3r2_4N) / deval (z, Q3r2_4D, NQ3r2_4D);
++ }
++ else
++ {
++ p = neval (z, P2r7_3r2N, NP2r7_3r2N)
++ / deval (z, P2r7_3r2D, NP2r7_3r2D);
++ q = neval (z, Q2r7_3r2N, NQ2r7_3r2N)
++ / deval (z, Q2r7_3r2D, NQ2r7_3r2D);
++ }
++ }
++ else if (xinv <= 0.4375)
++ {
++ p = neval (z, P2r3_2r7N, NP2r3_2r7N)
++ / deval (z, P2r3_2r7D, NP2r3_2r7D);
++ q = neval (z, Q2r3_2r7N, NQ2r3_2r7N)
++ / deval (z, Q2r3_2r7D, NQ2r3_2r7D);
++ }
++ else
++ {
++ p = neval (z, P2_2r3N, NP2_2r3N) / deval (z, P2_2r3D, NP2_2r3D);
++ q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D);
++ }
++ }
++ p = 1 + z * p;
++ q = z * q;
++ q = q * xinv + 0.375L * xinv;
++ z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (xx);
++ return z;
++}
++strong_alias (__ieee754_y1l, __y1l_finite)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,5 +1,992 @@
+-/* Looks like we can use ieee854 e_lgammal_r.c as is for IBM extended format. */
+-#define _Float128 long double
+-#define L(x) x ## L
+-#include <sysdeps/ieee754/ldbl-128/e_lgammal_r.c>
++/* Natural logarithm of gamma function. IBM Extended Precision version.
++ Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
+
++ This 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.
++
++ This 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 this library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++/* This file was copied from sysdeps/ieee754/ldbl-128/e_lgammal_r.c. */
++
++
++#include <math.h>
++#include <math_private.h>
++#include <float.h>
++
++static const long double PIL = 3.1415926535897932384626433832795028841972E0L;
++static const long double MAXLGM = 0x5.d53649e2d469dbc1f01e99fd66p+1012L;
++static const long double one = 1;
++static const long double huge = LDBL_MAX;
++
++/* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2)
++ 1/x <= 0.0741 (x >= 13.495...)
++ Peak relative error 1.5e-36 */
++static const long double ls2pi = 9.1893853320467274178032973640561763986140E-1L;
++#define NRASY 12
++static const long double RASY[NRASY + 1] =
++{
++ 8.333333333333333333333333333310437112111E-2L,
++ -2.777777777777777777777774789556228296902E-3L,
++ 7.936507936507936507795933938448586499183E-4L,
++ -5.952380952380952041799269756378148574045E-4L,
++ 8.417508417507928904209891117498524452523E-4L,
++ -1.917526917481263997778542329739806086290E-3L,
++ 6.410256381217852504446848671499409919280E-3L,
++ -2.955064066900961649768101034477363301626E-2L,
++ 1.796402955865634243663453415388336954675E-1L,
++ -1.391522089007758553455753477688592767741E0L,
++ 1.326130089598399157988112385013829305510E1L,
++ -1.420412699593782497803472576479997819149E2L,
++ 1.218058922427762808938869872528846787020E3L
++};
++
++
++/* log gamma(x+13) = log gamma(13) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 12.5 <= x+13 <= 13.5
++ Peak relative error 1.1e-36 */
++static const long double lgam13a = 1.9987213134765625E1L;
++static const long double lgam13b = 1.3608962611495173623870550785125024484248E-6L;
++#define NRN13 7
++static const long double RN13[NRN13 + 1] =
++{
++ 8.591478354823578150238226576156275285700E11L,
++ 2.347931159756482741018258864137297157668E11L,
++ 2.555408396679352028680662433943000804616E10L,
++ 1.408581709264464345480765758902967123937E9L,
++ 4.126759849752613822953004114044451046321E7L,
++ 6.133298899622688505854211579222889943778E5L,
++ 3.929248056293651597987893340755876578072E3L,
++ 6.850783280018706668924952057996075215223E0L
++};
++#define NRD13 6
++static const long double RD13[NRD13 + 1] =
++{
++ 3.401225382297342302296607039352935541669E11L,
++ 8.756765276918037910363513243563234551784E10L,
++ 8.873913342866613213078554180987647243903E9L,
++ 4.483797255342763263361893016049310017973E8L,
++ 1.178186288833066430952276702931512870676E7L,
++ 1.519928623743264797939103740132278337476E5L,
++ 7.989298844938119228411117593338850892311E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+12) = log gamma(12) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 11.5 <= x+12 <= 12.5
++ Peak relative error 4.1e-36 */
++static const long double lgam12a = 1.75023040771484375E1L;
++static const long double lgam12b = 3.7687254483392876529072161996717039575982E-6L;
++#define NRN12 7
++static const long double RN12[NRN12 + 1] =
++{
++ 4.709859662695606986110997348630997559137E11L,
++ 1.398713878079497115037857470168777995230E11L,
++ 1.654654931821564315970930093932954900867E10L,
++ 9.916279414876676861193649489207282144036E8L,
++ 3.159604070526036074112008954113411389879E7L,
++ 5.109099197547205212294747623977502492861E5L,
++ 3.563054878276102790183396740969279826988E3L,
++ 6.769610657004672719224614163196946862747E0L
++};
++#define NRD12 6
++static const long double RD12[NRD12 + 1] =
++{
++ 1.928167007860968063912467318985802726613E11L,
++ 5.383198282277806237247492369072266389233E10L,
++ 5.915693215338294477444809323037871058363E9L,
++ 3.241438287570196713148310560147925781342E8L,
++ 9.236680081763754597872713592701048455890E6L,
++ 1.292246897881650919242713651166596478850E5L,
++ 7.366532445427159272584194816076600211171E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+11) = log gamma(11) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 10.5 <= x+11 <= 11.5
++ Peak relative error 1.8e-35 */
++static const long double lgam11a = 1.5104400634765625E1L;
++static const long double lgam11b = 1.1938309890295225709329251070371882250744E-5L;
++#define NRN11 7
++static const long double RN11[NRN11 + 1] =
++{
++ 2.446960438029415837384622675816736622795E11L,
++ 7.955444974446413315803799763901729640350E10L,
++ 1.030555327949159293591618473447420338444E10L,
++ 6.765022131195302709153994345470493334946E8L,
++ 2.361892792609204855279723576041468347494E7L,
++ 4.186623629779479136428005806072176490125E5L,
++ 3.202506022088912768601325534149383594049E3L,
++ 6.681356101133728289358838690666225691363E0L
++};
++#define NRD11 6
++static const long double RD11[NRD11 + 1] =
++{
++ 1.040483786179428590683912396379079477432E11L,
++ 3.172251138489229497223696648369823779729E10L,
++ 3.806961885984850433709295832245848084614E9L,
++ 2.278070344022934913730015420611609620171E8L,
++ 7.089478198662651683977290023829391596481E6L,
++ 1.083246385105903533237139380509590158658E5L,
++ 6.744420991491385145885727942219463243597E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+10) = log gamma(10) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 9.5 <= x+10 <= 10.5
++ Peak relative error 5.4e-37 */
++static const long double lgam10a = 1.280181884765625E1L;
++static const long double lgam10b = 8.6324252196112077178745667061642811492557E-6L;
++#define NRN10 7
++static const long double RN10[NRN10 + 1] =
++{
++ -1.239059737177249934158597996648808363783E14L,
++ -4.725899566371458992365624673357356908719E13L,
++ -7.283906268647083312042059082837754850808E12L,
++ -5.802855515464011422171165179767478794637E11L,
++ -2.532349691157548788382820303182745897298E10L,
++ -5.884260178023777312587193693477072061820E8L,
++ -6.437774864512125749845840472131829114906E6L,
++ -2.350975266781548931856017239843273049384E4L
++};
++#define NRD10 7
++static const long double RD10[NRD10 + 1] =
++{
++ -5.502645997581822567468347817182347679552E13L,
++ -1.970266640239849804162284805400136473801E13L,
++ -2.819677689615038489384974042561531409392E12L,
++ -2.056105863694742752589691183194061265094E11L,
++ -8.053670086493258693186307810815819662078E9L,
++ -1.632090155573373286153427982504851867131E8L,
++ -1.483575879240631280658077826889223634921E6L,
++ -4.002806669713232271615885826373550502510E3L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+9) = log gamma(9) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 8.5 <= x+9 <= 9.5
++ Peak relative error 3.6e-36 */
++static const long double lgam9a = 1.06045989990234375E1L;
++static const long double lgam9b = 3.9037218127284172274007216547549861681400E-6L;
++#define NRN9 7
++static const long double RN9[NRN9 + 1] =
++{
++ -4.936332264202687973364500998984608306189E13L,
++ -2.101372682623700967335206138517766274855E13L,
++ -3.615893404644823888655732817505129444195E12L,
++ -3.217104993800878891194322691860075472926E11L,
++ -1.568465330337375725685439173603032921399E10L,
++ -4.073317518162025744377629219101510217761E8L,
++ -4.983232096406156139324846656819246974500E6L,
++ -2.036280038903695980912289722995505277253E4L
++};
++#define NRD9 7
++static const long double RD9[NRD9 + 1] =
++{
++ -2.306006080437656357167128541231915480393E13L,
++ -9.183606842453274924895648863832233799950E12L,
++ -1.461857965935942962087907301194381010380E12L,
++ -1.185728254682789754150068652663124298303E11L,
++ -5.166285094703468567389566085480783070037E9L,
++ -1.164573656694603024184768200787835094317E8L,
++ -1.177343939483908678474886454113163527909E6L,
++ -3.529391059783109732159524500029157638736E3L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+8) = log gamma(8) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 7.5 <= x+8 <= 8.5
++ Peak relative error 2.4e-37 */
++static const long double lgam8a = 8.525146484375E0L;
++static const long double lgam8b = 1.4876690414300165531036347125050759667737E-5L;
++#define NRN8 8
++static const long double RN8[NRN8 + 1] =
++{
++ 6.600775438203423546565361176829139703289E11L,
++ 3.406361267593790705240802723914281025800E11L,
++ 7.222460928505293914746983300555538432830E10L,
++ 8.102984106025088123058747466840656458342E9L,
++ 5.157620015986282905232150979772409345927E8L,
++ 1.851445288272645829028129389609068641517E7L,
++ 3.489261702223124354745894067468953756656E5L,
++ 2.892095396706665774434217489775617756014E3L,
++ 6.596977510622195827183948478627058738034E0L
++};
++#define NRD8 7
++static const long double RD8[NRD8 + 1] =
++{
++ 3.274776546520735414638114828622673016920E11L,
++ 1.581811207929065544043963828487733970107E11L,
++ 3.108725655667825188135393076860104546416E10L,
++ 3.193055010502912617128480163681842165730E9L,
++ 1.830871482669835106357529710116211541839E8L,
++ 5.790862854275238129848491555068073485086E6L,
++ 9.305213264307921522842678835618803553589E4L,
++ 6.216974105861848386918949336819572333622E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+7) = log gamma(7) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 6.5 <= x+7 <= 7.5
++ Peak relative error 3.2e-36 */
++static const long double lgam7a = 6.5792388916015625E0L;
++static const long double lgam7b = 1.2320408538495060178292903945321122583007E-5L;
++#define NRN7 8
++static const long double RN7[NRN7 + 1] =
++{
++ 2.065019306969459407636744543358209942213E11L,
++ 1.226919919023736909889724951708796532847E11L,
++ 2.996157990374348596472241776917953749106E10L,
++ 3.873001919306801037344727168434909521030E9L,
++ 2.841575255593761593270885753992732145094E8L,
++ 1.176342515359431913664715324652399565551E7L,
++ 2.558097039684188723597519300356028511547E5L,
++ 2.448525238332609439023786244782810774702E3L,
++ 6.460280377802030953041566617300902020435E0L
++};
++#define NRD7 7
++static const long double RD7[NRD7 + 1] =
++{
++ 1.102646614598516998880874785339049304483E11L,
++ 6.099297512712715445879759589407189290040E10L,
++ 1.372898136289611312713283201112060238351E10L,
++ 1.615306270420293159907951633566635172343E9L,
++ 1.061114435798489135996614242842561967459E8L,
++ 3.845638971184305248268608902030718674691E6L,
++ 7.081730675423444975703917836972720495507E4L,
++ 5.423122582741398226693137276201344096370E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+6) = log gamma(6) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 5.5 <= x+6 <= 6.5
++ Peak relative error 6.2e-37 */
++static const long double lgam6a = 4.7874908447265625E0L;
++static const long double lgam6b = 8.9805548349424770093452324304839959231517E-7L;
++#define NRN6 8
++static const long double RN6[NRN6 + 1] =
++{
++ -3.538412754670746879119162116819571823643E13L,
++ -2.613432593406849155765698121483394257148E13L,
++ -8.020670732770461579558867891923784753062E12L,
++ -1.322227822931250045347591780332435433420E12L,
++ -1.262809382777272476572558806855377129513E11L,
++ -7.015006277027660872284922325741197022467E9L,
++ -2.149320689089020841076532186783055727299E8L,
++ -3.167210585700002703820077565539658995316E6L,
++ -1.576834867378554185210279285358586385266E4L
++};
++#define NRD6 8
++static const long double RD6[NRD6 + 1] =
++{
++ -2.073955870771283609792355579558899389085E13L,
++ -1.421592856111673959642750863283919318175E13L,
++ -4.012134994918353924219048850264207074949E12L,
++ -6.013361045800992316498238470888523722431E11L,
++ -5.145382510136622274784240527039643430628E10L,
++ -2.510575820013409711678540476918249524123E9L,
++ -6.564058379709759600836745035871373240904E7L,
++ -7.861511116647120540275354855221373571536E5L,
++ -2.821943442729620524365661338459579270561E3L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+5) = log gamma(5) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 4.5 <= x+5 <= 5.5
++ Peak relative error 3.4e-37 */
++static const long double lgam5a = 3.17803955078125E0L;
++static const long double lgam5b = 1.4279566695619646941601297055408873990961E-5L;
++#define NRN5 9
++static const long double RN5[NRN5 + 1] =
++{
++ 2.010952885441805899580403215533972172098E11L,
++ 1.916132681242540921354921906708215338584E11L,
++ 7.679102403710581712903937970163206882492E10L,
++ 1.680514903671382470108010973615268125169E10L,
++ 2.181011222911537259440775283277711588410E9L,
++ 1.705361119398837808244780667539728356096E8L,
++ 7.792391565652481864976147945997033946360E6L,
++ 1.910741381027985291688667214472560023819E5L,
++ 2.088138241893612679762260077783794329559E3L,
++ 6.330318119566998299106803922739066556550E0L
++};
++#define NRD5 8
++static const long double RD5[NRD5 + 1] =
++{
++ 1.335189758138651840605141370223112376176E11L,
++ 1.174130445739492885895466097516530211283E11L,
++ 4.308006619274572338118732154886328519910E10L,
++ 8.547402888692578655814445003283720677468E9L,
++ 9.934628078575618309542580800421370730906E8L,
++ 6.847107420092173812998096295422311820672E7L,
++ 2.698552646016599923609773122139463150403E6L,
++ 5.526516251532464176412113632726150253215E4L,
++ 4.772343321713697385780533022595450486932E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+4) = log gamma(4) + x P(x)/Q(x)
++ -0.5 <= x <= 0.5
++ 3.5 <= x+4 <= 4.5
++ Peak relative error 6.7e-37 */
++static const long double lgam4a = 1.791748046875E0L;
++static const long double lgam4b = 1.1422353055000812477358380702272722990692E-5L;
++#define NRN4 9
++static const long double RN4[NRN4 + 1] =
++{
++ -1.026583408246155508572442242188887829208E13L,
++ -1.306476685384622809290193031208776258809E13L,
++ -7.051088602207062164232806511992978915508E12L,
++ -2.100849457735620004967624442027793656108E12L,
++ -3.767473790774546963588549871673843260569E11L,
++ -4.156387497364909963498394522336575984206E10L,
++ -2.764021460668011732047778992419118757746E9L,
++ -1.036617204107109779944986471142938641399E8L,
++ -1.895730886640349026257780896972598305443E6L,
++ -1.180509051468390914200720003907727988201E4L
++};
++#define NRD4 9
++static const long double RD4[NRD4 + 1] =
++{
++ -8.172669122056002077809119378047536240889E12L,
++ -9.477592426087986751343695251801814226960E12L,
++ -4.629448850139318158743900253637212801682E12L,
++ -1.237965465892012573255370078308035272942E12L,
++ -1.971624313506929845158062177061297598956E11L,
++ -1.905434843346570533229942397763361493610E10L,
++ -1.089409357680461419743730978512856675984E9L,
++ -3.416703082301143192939774401370222822430E7L,
++ -4.981791914177103793218433195857635265295E5L,
++ -2.192507743896742751483055798411231453733E3L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+3) = log gamma(3) + x P(x)/Q(x)
++ -0.25 <= x <= 0.5
++ 2.75 <= x+3 <= 3.5
++ Peak relative error 6.0e-37 */
++static const long double lgam3a = 6.93145751953125E-1L;
++static const long double lgam3b = 1.4286068203094172321214581765680755001344E-6L;
++
++#define NRN3 9
++static const long double RN3[NRN3 + 1] =
++{
++ -4.813901815114776281494823863935820876670E11L,
++ -8.425592975288250400493910291066881992620E11L,
++ -6.228685507402467503655405482985516909157E11L,
++ -2.531972054436786351403749276956707260499E11L,
++ -6.170200796658926701311867484296426831687E10L,
++ -9.211477458528156048231908798456365081135E9L,
++ -8.251806236175037114064561038908691305583E8L,
++ -4.147886355917831049939930101151160447495E7L,
++ -1.010851868928346082547075956946476932162E6L,
++ -8.333374463411801009783402800801201603736E3L
++};
++#define NRD3 9
++static const long double RD3[NRD3 + 1] =
++{
++ -5.216713843111675050627304523368029262450E11L,
++ -8.014292925418308759369583419234079164391E11L,
++ -5.180106858220030014546267824392678611990E11L,
++ -1.830406975497439003897734969120997840011E11L,
++ -3.845274631904879621945745960119924118925E10L,
++ -4.891033385370523863288908070309417710903E9L,
++ -3.670172254411328640353855768698287474282E8L,
++ -1.505316381525727713026364396635522516989E7L,
++ -2.856327162923716881454613540575964890347E5L,
++ -1.622140448015769906847567212766206894547E3L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+2.5) = log gamma(2.5) + x P(x)/Q(x)
++ -0.125 <= x <= 0.25
++ 2.375 <= x+2.5 <= 2.75 */
++static const long double lgam2r5a = 2.8466796875E-1L;
++static const long double lgam2r5b = 1.4901722919159632494669682701924320137696E-5L;
++#define NRN2r5 8
++static const long double RN2r5[NRN2r5 + 1] =
++{
++ -4.676454313888335499356699817678862233205E9L,
++ -9.361888347911187924389905984624216340639E9L,
++ -7.695353600835685037920815799526540237703E9L,
++ -3.364370100981509060441853085968900734521E9L,
++ -8.449902011848163568670361316804900559863E8L,
++ -1.225249050950801905108001246436783022179E8L,
++ -9.732972931077110161639900388121650470926E6L,
++ -3.695711763932153505623248207576425983573E5L,
++ -4.717341584067827676530426007495274711306E3L
++};
++#define NRD2r5 8
++static const long double RD2r5[NRD2r5 + 1] =
++{
++ -6.650657966618993679456019224416926875619E9L,
++ -1.099511409330635807899718829033488771623E10L,
++ -7.482546968307837168164311101447116903148E9L,
++ -2.702967190056506495988922973755870557217E9L,
++ -5.570008176482922704972943389590409280950E8L,
++ -6.536934032192792470926310043166993233231E7L,
++ -4.101991193844953082400035444146067511725E6L,
++ -1.174082735875715802334430481065526664020E5L,
++ -9.932840389994157592102947657277692978511E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+2) = x P(x)/Q(x)
++ -0.125 <= x <= +0.375
++ 1.875 <= x+2 <= 2.375
++ Peak relative error 4.6e-36 */
++#define NRN2 9
++static const long double RN2[NRN2 + 1] =
++{
++ -3.716661929737318153526921358113793421524E9L,
++ -1.138816715030710406922819131397532331321E10L,
++ -1.421017419363526524544402598734013569950E10L,
++ -9.510432842542519665483662502132010331451E9L,
++ -3.747528562099410197957514973274474767329E9L,
++ -8.923565763363912474488712255317033616626E8L,
++ -1.261396653700237624185350402781338231697E8L,
++ -9.918402520255661797735331317081425749014E6L,
++ -3.753996255897143855113273724233104768831E5L,
++ -4.778761333044147141559311805999540765612E3L
++};
++#define NRD2 9
++static const long double RD2[NRD2 + 1] =
++{
++ -8.790916836764308497770359421351673950111E9L,
++ -2.023108608053212516399197678553737477486E10L,
++ -1.958067901852022239294231785363504458367E10L,
++ -1.035515043621003101254252481625188704529E10L,
++ -3.253884432621336737640841276619272224476E9L,
++ -6.186383531162456814954947669274235815544E8L,
++ -6.932557847749518463038934953605969951466E7L,
++ -4.240731768287359608773351626528479703758E6L,
++ -1.197343995089189188078944689846348116630E5L,
++ -1.004622911670588064824904487064114090920E3L
++/* 1.0E0 */
++};
++
++
++/* log gamma(x+1.75) = log gamma(1.75) + x P(x)/Q(x)
++ -0.125 <= x <= +0.125
++ 1.625 <= x+1.75 <= 1.875
++ Peak relative error 9.2e-37 */
++static const long double lgam1r75a = -8.441162109375E-2L;
++static const long double lgam1r75b = 1.0500073264444042213965868602268256157604E-5L;
++#define NRN1r75 8
++static const long double RN1r75[NRN1r75 + 1] =
++{
++ -5.221061693929833937710891646275798251513E7L,
++ -2.052466337474314812817883030472496436993E8L,
++ -2.952718275974940270675670705084125640069E8L,
++ -2.132294039648116684922965964126389017840E8L,
++ -8.554103077186505960591321962207519908489E7L,
++ -1.940250901348870867323943119132071960050E7L,
++ -2.379394147112756860769336400290402208435E6L,
++ -1.384060879999526222029386539622255797389E5L,
++ -2.698453601378319296159355612094598695530E3L
++};
++#define NRD1r75 8
++static const long double RD1r75[NRD1r75 + 1] =
++{
++ -2.109754689501705828789976311354395393605E8L,
++ -5.036651829232895725959911504899241062286E8L,
++ -4.954234699418689764943486770327295098084E8L,
++ -2.589558042412676610775157783898195339410E8L,
++ -7.731476117252958268044969614034776883031E7L,
++ -1.316721702252481296030801191240867486965E7L,
++ -1.201296501404876774861190604303728810836E6L,
++ -5.007966406976106636109459072523610273928E4L,
++ -6.155817990560743422008969155276229018209E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+x0) = y0 + x^2 P(x)/Q(x)
++ -0.0867 <= x <= +0.1634
++ 1.374932... <= x+x0 <= 1.625032...
++ Peak relative error 4.0e-36 */
++static const long double x0a = 1.4616241455078125L;
++static const long double x0b = 7.9994605498412626595423257213002588621246E-6L;
++static const long double y0a = -1.21490478515625E-1L;
++static const long double y0b = 4.1879797753919044854428223084178486438269E-6L;
++#define NRN1r5 8
++static const long double RN1r5[NRN1r5 + 1] =
++{
++ 6.827103657233705798067415468881313128066E5L,
++ 1.910041815932269464714909706705242148108E6L,
++ 2.194344176925978377083808566251427771951E6L,
++ 1.332921400100891472195055269688876427962E6L,
++ 4.589080973377307211815655093824787123508E5L,
++ 8.900334161263456942727083580232613796141E4L,
++ 9.053840838306019753209127312097612455236E3L,
++ 4.053367147553353374151852319743594873771E2L,
++ 5.040631576303952022968949605613514584950E0L
++};
++#define NRD1r5 8
++static const long double RD1r5[NRD1r5 + 1] =
++{
++ 1.411036368843183477558773688484699813355E6L,
++ 4.378121767236251950226362443134306184849E6L,
++ 5.682322855631723455425929877581697918168E6L,
++ 3.999065731556977782435009349967042222375E6L,
++ 1.653651390456781293163585493620758410333E6L,
++ 4.067774359067489605179546964969435858311E5L,
++ 5.741463295366557346748361781768833633256E4L,
++ 4.226404539738182992856094681115746692030E3L,
++ 1.316980975410327975566999780608618774469E2L,
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x+1.25) = log gamma(1.25) + x P(x)/Q(x)
++ -.125 <= x <= +.125
++ 1.125 <= x+1.25 <= 1.375
++ Peak relative error = 4.9e-36 */
++static const long double lgam1r25a = -9.82818603515625E-2L;
++static const long double lgam1r25b = 1.0023929749338536146197303364159774377296E-5L;
++#define NRN1r25 9
++static const long double RN1r25[NRN1r25 + 1] =
++{
++ -9.054787275312026472896002240379580536760E4L,
++ -8.685076892989927640126560802094680794471E4L,
++ 2.797898965448019916967849727279076547109E5L,
++ 6.175520827134342734546868356396008898299E5L,
++ 5.179626599589134831538516906517372619641E5L,
++ 2.253076616239043944538380039205558242161E5L,
++ 5.312653119599957228630544772499197307195E4L,
++ 6.434329437514083776052669599834938898255E3L,
++ 3.385414416983114598582554037612347549220E2L,
++ 4.907821957946273805080625052510832015792E0L
++};
++#define NRD1r25 8
++static const long double RD1r25[NRD1r25 + 1] =
++{
++ 3.980939377333448005389084785896660309000E5L,
++ 1.429634893085231519692365775184490465542E6L,
++ 2.145438946455476062850151428438668234336E6L,
++ 1.743786661358280837020848127465970357893E6L,
++ 8.316364251289743923178092656080441655273E5L,
++ 2.355732939106812496699621491135458324294E5L,
++ 3.822267399625696880571810137601310855419E4L,
++ 3.228463206479133236028576845538387620856E3L,
++ 1.152133170470059555646301189220117965514E2L
++ /* 1.0E0L */
++};
++
++
++/* log gamma(x + 1) = x P(x)/Q(x)
++ 0.0 <= x <= +0.125
++ 1.0 <= x+1 <= 1.125
++ Peak relative error 1.1e-35 */
++#define NRN1 8
++static const long double RN1[NRN1 + 1] =
++{
++ -9.987560186094800756471055681088744738818E3L,
++ -2.506039379419574361949680225279376329742E4L,
++ -1.386770737662176516403363873617457652991E4L,
++ 1.439445846078103202928677244188837130744E4L,
++ 2.159612048879650471489449668295139990693E4L,
++ 1.047439813638144485276023138173676047079E4L,
++ 2.250316398054332592560412486630769139961E3L,
++ 1.958510425467720733041971651126443864041E2L,
++ 4.516830313569454663374271993200291219855E0L
++};
++#define NRD1 7
++static const long double RD1[NRD1 + 1] =
++{
++ 1.730299573175751778863269333703788214547E4L,
++ 6.807080914851328611903744668028014678148E4L,
++ 1.090071629101496938655806063184092302439E5L,
++ 9.124354356415154289343303999616003884080E4L,
++ 4.262071638655772404431164427024003253954E4L,
++ 1.096981664067373953673982635805821283581E4L,
++ 1.431229503796575892151252708527595787588E3L,
++ 7.734110684303689320830401788262295992921E1L
++ /* 1.0E0 */
++};
++
++
++/* log gamma(x + 1) = x P(x)/Q(x)
++ -0.125 <= x <= 0
++ 0.875 <= x+1 <= 1.0
++ Peak relative error 7.0e-37 */
++#define NRNr9 8
++static const long double RNr9[NRNr9 + 1] =
++{
++ 4.441379198241760069548832023257571176884E5L,
++ 1.273072988367176540909122090089580368732E6L,
++ 9.732422305818501557502584486510048387724E5L,
++ -5.040539994443998275271644292272870348684E5L,
++ -1.208719055525609446357448132109723786736E6L,
++ -7.434275365370936547146540554419058907156E5L,
++ -2.075642969983377738209203358199008185741E5L,
++ -2.565534860781128618589288075109372218042E4L,
++ -1.032901669542994124131223797515913955938E3L,
++};
++#define NRDr9 8
++static const long double RDr9[NRDr9 + 1] =
++{
++ -7.694488331323118759486182246005193998007E5L,
++ -3.301918855321234414232308938454112213751E6L,
++ -5.856830900232338906742924836032279404702E6L,
++ -5.540672519616151584486240871424021377540E6L,
++ -3.006530901041386626148342989181721176919E6L,
++ -9.350378280513062139466966374330795935163E5L,
++ -1.566179100031063346901755685375732739511E5L,
++ -1.205016539620260779274902967231510804992E4L,
++ -2.724583156305709733221564484006088794284E2L
++/* 1.0E0 */
++};
++
++
++/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
++
++static long double
++neval (long double x, const long double *p, int n)
++{
++ long double y;
++
++ p += n;
++ y = *p--;
++ do
++ {
++ y = y * x + *p--;
++ }
++ while (--n > 0);
++ return y;
++}
++
++
++/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */
++
++static long double
++deval (long double x, const long double *p, int n)
++{
++ long double y;
++
++ p += n;
++ y = x + *p--;
++ do
++ {
++ y = y * x + *p--;
++ }
++ while (--n > 0);
++ return y;
++}
++
++
++long double
++__ieee754_lgammal_r (long double x, int *signgamp)
++{
++ long double p, q, w, z, nx;
++ int i, nn;
++
++ *signgamp = 1;
++
++ if (! isfinite (x))
++ return x * x;
++
++ if (x == 0)
++ {
++ if (signbit (x))
++ *signgamp = -1;
++ }
++
++ if (x < 0)
++ {
++ if (x < -2 && x > -48)
++ return __lgamma_negl (x, signgamp);
++ q = -x;
++ p = __floorl (q);
++ if (p == q)
++ return (one / fabsl (p - p));
++ long double halfp = p * 0.5L;
++ if (halfp == __floorl (halfp))
++ *signgamp = -1;
++ else
++ *signgamp = 1;
++ if (q < 0x1p-120L)
++ return -__logl (q);
++ z = q - p;
++ if (z > 0.5L)
++ {
++ p += 1;
++ z = p - q;
++ }
++ z = q * __sinl (PIL * z);
++ w = __ieee754_lgammal_r (q, &i);
++ z = __logl (PIL / z) - w;
++ return (z);
++ }
++
++ if (x < 13.5L)
++ {
++ p = 0;
++ nx = __floorl (x + 0.5L);
++ nn = nx;
++ switch (nn)
++ {
++ case 0:
++ /* log gamma (x + 1) = log(x) + log gamma(x) */
++ if (x < 0x1p-120L)
++ return -__logl (x);
++ else if (x <= 0.125)
++ {
++ p = x * neval (x, RN1, NRN1) / deval (x, RD1, NRD1);
++ }
++ else if (x <= 0.375)
++ {
++ z = x - 0.25L;
++ p = z * neval (z, RN1r25, NRN1r25) / deval (z, RD1r25, NRD1r25);
++ p += lgam1r25b;
++ p += lgam1r25a;
++ }
++ else if (x <= 0.625)
++ {
++ z = x + (1 - x0a);
++ z = z - x0b;
++ p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5);
++ p = p * z * z;
++ p = p + y0b;
++ p = p + y0a;
++ }
++ else if (x <= 0.875)
++ {
++ z = x - 0.75L;
++ p = z * neval (z, RN1r75, NRN1r75) / deval (z, RD1r75, NRD1r75);
++ p += lgam1r75b;
++ p += lgam1r75a;
++ }
++ else
++ {
++ z = x - 1;
++ p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2);
++ }
++ p = p - __logl (x);
++ break;
++
++ case 1:
++ if (x < 0.875L)
++ {
++ if (x <= 0.625)
++ {
++ z = x + (1 - x0a);
++ z = z - x0b;
++ p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5);
++ p = p * z * z;
++ p = p + y0b;
++ p = p + y0a;
++ }
++ else if (x <= 0.875)
++ {
++ z = x - 0.75L;
++ p = z * neval (z, RN1r75, NRN1r75)
++ / deval (z, RD1r75, NRD1r75);
++ p += lgam1r75b;
++ p += lgam1r75a;
++ }
++ else
++ {
++ z = x - 1;
++ p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2);
++ }
++ p = p - __logl (x);
++ }
++ else if (x < 1)
++ {
++ z = x - 1;
++ p = z * neval (z, RNr9, NRNr9) / deval (z, RDr9, NRDr9);
++ }
++ else if (x == 1)
++ p = 0;
++ else if (x <= 1.125L)
++ {
++ z = x - 1;
++ p = z * neval (z, RN1, NRN1) / deval (z, RD1, NRD1);
++ }
++ else if (x <= 1.375)
++ {
++ z = x - 1.25L;
++ p = z * neval (z, RN1r25, NRN1r25) / deval (z, RD1r25, NRD1r25);
++ p += lgam1r25b;
++ p += lgam1r25a;
++ }
++ else
++ {
++ /* 1.375 <= x+x0 <= 1.625 */
++ z = x - x0a;
++ z = z - x0b;
++ p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5);
++ p = p * z * z;
++ p = p + y0b;
++ p = p + y0a;
++ }
++ break;
++
++ case 2:
++ if (x < 1.625L)
++ {
++ z = x - x0a;
++ z = z - x0b;
++ p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5);
++ p = p * z * z;
++ p = p + y0b;
++ p = p + y0a;
++ }
++ else if (x < 1.875L)
++ {
++ z = x - 1.75L;
++ p = z * neval (z, RN1r75, NRN1r75) / deval (z, RD1r75, NRD1r75);
++ p += lgam1r75b;
++ p += lgam1r75a;
++ }
++ else if (x == 2)
++ p = 0;
++ else if (x < 2.375L)
++ {
++ z = x - 2;
++ p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2);
++ }
++ else
++ {
++ z = x - 2.5L;
++ p = z * neval (z, RN2r5, NRN2r5) / deval (z, RD2r5, NRD2r5);
++ p += lgam2r5b;
++ p += lgam2r5a;
++ }
++ break;
++
++ case 3:
++ if (x < 2.75)
++ {
++ z = x - 2.5L;
++ p = z * neval (z, RN2r5, NRN2r5) / deval (z, RD2r5, NRD2r5);
++ p += lgam2r5b;
++ p += lgam2r5a;
++ }
++ else
++ {
++ z = x - 3;
++ p = z * neval (z, RN3, NRN3) / deval (z, RD3, NRD3);
++ p += lgam3b;
++ p += lgam3a;
++ }
++ break;
++
++ case 4:
++ z = x - 4;
++ p = z * neval (z, RN4, NRN4) / deval (z, RD4, NRD4);
++ p += lgam4b;
++ p += lgam4a;
++ break;
++
++ case 5:
++ z = x - 5;
++ p = z * neval (z, RN5, NRN5) / deval (z, RD5, NRD5);
++ p += lgam5b;
++ p += lgam5a;
++ break;
++
++ case 6:
++ z = x - 6;
++ p = z * neval (z, RN6, NRN6) / deval (z, RD6, NRD6);
++ p += lgam6b;
++ p += lgam6a;
++ break;
++
++ case 7:
++ z = x - 7;
++ p = z * neval (z, RN7, NRN7) / deval (z, RD7, NRD7);
++ p += lgam7b;
++ p += lgam7a;
++ break;
++
++ case 8:
++ z = x - 8;
++ p = z * neval (z, RN8, NRN8) / deval (z, RD8, NRD8);
++ p += lgam8b;
++ p += lgam8a;
++ break;
++
++ case 9:
++ z = x - 9;
++ p = z * neval (z, RN9, NRN9) / deval (z, RD9, NRD9);
++ p += lgam9b;
++ p += lgam9a;
++ break;
++
++ case 10:
++ z = x - 10;
++ p = z * neval (z, RN10, NRN10) / deval (z, RD10, NRD10);
++ p += lgam10b;
++ p += lgam10a;
++ break;
++
++ case 11:
++ z = x - 11;
++ p = z * neval (z, RN11, NRN11) / deval (z, RD11, NRD11);
++ p += lgam11b;
++ p += lgam11a;
++ break;
++
++ case 12:
++ z = x - 12;
++ p = z * neval (z, RN12, NRN12) / deval (z, RD12, NRD12);
++ p += lgam12b;
++ p += lgam12a;
++ break;
++
++ case 13:
++ z = x - 13;
++ p = z * neval (z, RN13, NRN13) / deval (z, RD13, NRD13);
++ p += lgam13b;
++ p += lgam13a;
++ break;
++ }
++ return p;
++ }
++
++ if (x > MAXLGM)
++ return (*signgamp * huge * huge);
++
++ if (x > 0x1p120L)
++ return x * (__logl (x) - 1);
++ q = ls2pi - x;
++ q = (x - 0.5L) * __logl (x) + q;
++ if (x > 1.0e18L)
++ return (q);
++
++ p = 1 / (x * x);
++ q += neval (p, RASY, NRASY) / x;
++ return (q);
++}
++strong_alias (__ieee754_lgammal_r, __lgammal_r_finite)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_log10l.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_log10l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_log10l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_log10l.c 2017-10-22 17:02:23.603967252 +0000
+@@ -189,7 +189,7 @@ __ieee754_log10l (long double x)
+ xhi = ldbl_high (x);
+ EXTRACT_WORDS64 (hx, xhi);
+ if ((hx & 0x7fffffffffffffffLL) == 0)
+- return (-1.0L / __fabsl (x)); /* log10l(+-0)=-inf */
++ return (-1.0L / fabsl (x)); /* log10l(+-0)=-inf */
+ if (hx < 0)
+ return (x - x) / (x - x);
+ if (hx >= 0x7ff0000000000000LL)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_log2l.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_log2l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_log2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_log2l.c 2017-10-22 17:02:23.603967252 +0000
+@@ -183,7 +183,7 @@ __ieee754_log2l (long double x)
+ xhi = ldbl_high (x);
+ EXTRACT_WORDS64 (hx, xhi);
+ if ((hx & 0x7fffffffffffffffLL) == 0)
+- return (-1.0L / __fabsl (x)); /* log2l(+-0)=-inf */
++ return (-1.0L / fabsl (x)); /* log2l(+-0)=-inf */
+ if (hx < 0)
+ return (x - x) / (x - x);
+ if (hx >= 0x7ff0000000000000LL)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_powl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_powl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_powl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_powl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -260,12 +260,12 @@ __ieee754_powl (long double x, long doub
+ }
+
+ /* (x<0)**(non-int) is NaN */
+- if (((((u_int32_t) hx >> 31) - 1) | yisint) == 0)
++ if (((((uint32_t) hx >> 31) - 1) | yisint) == 0)
+ return (x - x) / (x - x);
+
+ /* sgn (sign of result -ve**odd) = -1 else = 1 */
+ sgn = one;
+- if (((((u_int32_t) hx >> 31) - 1) | (yisint - 1)) == 0)
++ if (((((uint32_t) hx >> 31) - 1) | (yisint - 1)) == 0)
+ sgn = -one; /* (-ve)**(odd int) */
+
+ /* |y| is huge.
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -31,7 +31,7 @@ long double
+ __ieee754_remainderl(long double x, long double p)
+ {
+ int64_t hx,hp;
+- u_int64_t sx,lx,lp;
++ uint64_t sx,lx,lp;
+ long double p_half;
+ double xhi, xlo, phi, plo;
+
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c 2017-10-22 17:02:23.603967252 +0000
+@@ -200,7 +200,7 @@ int32_t __ieee754_rem_pio2l(long double
+ double tx[8];
+ int exp;
+ int64_t n, ix, hx, ixd;
+- u_int64_t lxd;
++ uint64_t lxd;
+ double xhi;
+
+ xhi = ldbl_high (x);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/k_cosl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/k_cosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/k_cosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/k_cosl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -86,7 +86,7 @@ __kernel_cosl(long double x, long double
+
+ xhi = ldbl_high (x);
+ EXTRACT_WORDS64 (ix, xhi);
+- tix = ((u_int64_t)ix) >> 32;
++ tix = ((uint64_t)ix) >> 32;
+ tix &= ~0x80000000; /* tix = |x|'s high 32 bits */
+ if (tix < 0x3fc30000) /* |x| < 0.1484375 */
+ {
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/k_sinl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/k_sinl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/k_sinl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -82,12 +82,12 @@ __kernel_sinl(long double x, long double
+ {
+ long double h, l, z, sin_l, cos_l_m1;
+ int64_t ix;
+- u_int32_t tix, hix, index;
++ uint32_t tix, hix, index;
+ double xhi, hhi;
+
+ xhi = ldbl_high (x);
+ EXTRACT_WORDS64 (ix, xhi);
+- tix = ((u_int64_t)ix) >> 32;
++ tix = ((uint64_t)ix) >> 32;
+ tix &= ~0x80000000; /* tix = |x|'s high 32 bits */
+ if (tix < 0x3fc30000) /* |x| < 0.1484375 */
+ {
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,10 +1,102 @@
+-/* Looks like we can use ieee854 s_cbrtl.c as is for IBM extended format. */
++/* Implementation of cbrtl. IBM Extended Precision version.
++ Cephes Math Library Release 2.2: January, 1991
++ Copyright 1984, 1991 by Stephen L. Moshier
++ Adapted for glibc October, 2001.
++
++ This 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.
++
++ This 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 this library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++/* This file was copied from sysdeps/ieee754/ldbl-128/e_j0l.c. */
++
++
+ #include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
++#include <math.h>
++#include <math_private.h>
++
++static const long double CBRT2 = 1.259921049894873164767210607278228350570251L;
++static const long double CBRT4 = 1.587401051968199474751705639272308260391493L;
++static const long double CBRT2I = 0.7937005259840997373758528196361541301957467L;
++static const long double CBRT4I = 0.6299605249474365823836053036391141752851257L;
++
++
++long double
++__cbrtl (long double x)
++{
++ int e, rem, sign;
++ long double z;
++
++ if (!isfinite (x))
++ return x + x;
++
++ if (x == 0)
++ return (x);
++
++ if (x > 0)
++ sign = 1;
++ else
++ {
++ sign = -1;
++ x = -x;
++ }
++
++ z = x;
++ /* extract power of 2, leaving mantissa between 0.5 and 1 */
++ x = __frexpl (x, &e);
++
++ /* Approximate cube root of number between .5 and 1,
++ peak relative error = 1.2e-6 */
++ x = ((((1.3584464340920900529734e-1L * x
++ - 6.3986917220457538402318e-1L) * x
++ + 1.2875551670318751538055e0L) * x
++ - 1.4897083391357284957891e0L) * x
++ + 1.3304961236013647092521e0L) * x + 3.7568280825958912391243e-1L;
++
++ /* exponent divided by 3 */
++ if (e >= 0)
++ {
++ rem = e;
++ e /= 3;
++ rem -= 3 * e;
++ if (rem == 1)
++ x *= CBRT2;
++ else if (rem == 2)
++ x *= CBRT4;
++ }
++ else
++ { /* argument less than 1 */
++ e = -e;
++ rem = e;
++ e /= 3;
++ rem -= 3 * e;
++ if (rem == 1)
++ x *= CBRT2I;
++ else if (rem == 2)
++ x *= CBRT4I;
++ e = -e;
++ }
++
++ /* multiply by power of 2 */
++ x = __ldexpl (x, e);
++
++ /* Newton iteration */
++ x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
++ x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
++ x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
+
+-#define _Float128 long double
+-#define L(x) x ## L
++ if (sign < 0)
++ x = -x;
++ return (x);
++}
+
+-#include <sysdeps/ieee754/ldbl-128/s_cbrtl.c>
+ long_double_symbol (libm, __cbrtl, cbrtl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -28,7 +28,7 @@ static char rcsid[] = "$NetBSD: $";
+
+ long double __fabsl(long double x)
+ {
+- u_int64_t hx, lx;
++ uint64_t hx, lx;
+ double xhi, xlo;
+
+ ldbl_unpack (x, &xhi, &xlo);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -44,7 +44,7 @@
+ int
+ ___fpclassifyl (long double x)
+ {
+- u_int64_t hx, lx;
++ uint64_t hx, lx;
+ int retval = FP_NORMAL;
+ double xhi, xlo;
+
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_fromfpl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_fromfpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_fromfpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_fromfpl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 0
+-#define FUNC fromfpl
++#define FUNC __fromfpl
+ #include <s_fromfpl_main.c>
++weak_alias (__fromfpl, fromfpl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_fromfpxl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_fromfpxl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_fromfpxl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_fromfpxl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 1
+-#define FUNC fromfpxl
++#define FUNC __fromfpxl
+ #include <s_fromfpl_main.c>
++weak_alias (__fromfpxl, fromfpxl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -22,7 +22,7 @@
+ #include <stdint.h>
+
+ long double
+-getpayloadl (const long double *x)
++__getpayloadl (const long double *x)
+ {
+ double xhi = ldbl_high (*x);
+ uint64_t ix;
+@@ -32,3 +32,4 @@ getpayloadl (const long double *x)
+ return 0.0L;
+ return (long double) ix;
+ }
++weak_alias (__getpayloadl, getpayloadl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_modfl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_modfl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_modfl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_modfl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -36,7 +36,7 @@ static const long double one = 1.0;
+ long double __modfl(long double x, long double *iptr)
+ {
+ int64_t i0,i1,j0;
+- u_int64_t i;
++ uint64_t i;
+ double xhi, xlo;
+
+ ldbl_unpack (x, &xhi, &xlo);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c 2017-10-22 17:02:23.603967252 +0000
+@@ -43,7 +43,7 @@ float __nexttowardf(float x, long double
+ if((long double) x==y) return y; /* x=y, return y */
+ if(ix==0) { /* x == 0 */
+ float u;
+- SET_FLOAT_WORD(x,(u_int32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/
++ SET_FLOAT_WORD(x,(uint32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/
+ u = math_opt_barrier (x);
+ u = u * u;
+ math_force_eval (u); /* raise underflow flag */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_remquol.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_remquol.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_remquol.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_remquol.c 2017-10-22 17:02:23.603967252 +0000
+@@ -31,7 +31,7 @@ long double
+ __remquol (long double x, long double y, int *quo)
+ {
+ int64_t hx,hy;
+- u_int64_t sx,lx,ly,qs;
++ uint64_t sx,lx,ly,qs;
+ int cquo;
+ double xhi, xlo, yhi, ylo;
+
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_roundevenl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_roundevenl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_roundevenl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_roundevenl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -21,7 +21,7 @@
+ #include <math_private.h>
+
+ long double
+-roundevenl (long double x)
++__roundevenl (long double x)
+ {
+ double xh, xl, hi;
+
+@@ -29,7 +29,7 @@ roundevenl (long double x)
+
+ if (xh != 0 && isfinite (xh))
+ {
+- hi = roundeven (xh);
++ hi = __roundeven (xh);
+ if (hi != xh)
+ {
+ /* The high part is not an integer; the low part only
+@@ -56,7 +56,7 @@ roundevenl (long double x)
+ part to nearest, ties round to even, is always correct,
+ as a high part that is an odd integer together with a low
+ part with magnitude 0.5 is not a valid long double. */
+- xl = roundeven (xl);
++ xl = __roundeven (xl);
+ xh = hi;
+ ldbl_canonicalize_int (&xh, &xl);
+ }
+@@ -67,3 +67,4 @@ roundevenl (long double x)
+
+ return ldbl_pack (xh, xl);
+ }
++weak_alias (__roundevenl, roundevenl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_setpayloadl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_setpayloadl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_setpayloadl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_setpayloadl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,3 +1,4 @@
+ #define SIG 0
+-#define FUNC setpayloadl
++#define FUNC __setpayloadl
+ #include <s_setpayloadl_main.c>
++weak_alias (__setpayloadl, setpayloadl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_setpayloadsigl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_setpayloadsigl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_setpayloadsigl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_setpayloadsigl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,3 +1,4 @@
+ #define SIG 1
+-#define FUNC setpayloadsigl
++#define FUNC __setpayloadsigl
+ #include <s_setpayloadl_main.c>
++weak_alias (__setpayloadsigl, setpayloadsigl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -22,7 +22,7 @@
+ #include <stdint.h>
+
+ int
+-totalorderl (long double x, long double y)
++__totalorderl (long double x, long double y)
+ {
+ double xhi, xlo, yhi, ylo;
+ int64_t hx, hy, lx, ly;
+@@ -60,3 +60,4 @@ totalorderl (long double x, long double
+ ly ^= ly_sign >> 1;
+ return lx <= ly;
+ }
++weak_alias (__totalorderl, totalorderl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_totalordermagl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_totalordermagl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_totalordermagl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_totalordermagl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -22,7 +22,7 @@
+ #include <stdint.h>
+
+ int
+-totalordermagl (long double x, long double y)
++__totalordermagl (long double x, long double y)
+ {
+ double xhi, xlo, yhi, ylo;
+ int64_t hx, hy, lx, ly;
+@@ -62,3 +62,4 @@ totalordermagl (long double x, long doub
+ ly ^= ly_sign >> 1;
+ return lx <= ly;
+ }
++weak_alias (__totalordermagl, totalordermagl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_ufromfpl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_ufromfpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_ufromfpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_ufromfpl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 0
+-#define FUNC ufromfpl
++#define FUNC __ufromfpl
+ #include <s_fromfpl_main.c>
++weak_alias (__ufromfpl, ufromfpl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/s_ufromfpxl.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_ufromfpxl.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/s_ufromfpxl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/s_ufromfpxl.c 2017-10-22 17:02:23.603967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 1
+-#define FUNC ufromfpxl
++#define FUNC __ufromfpxl
+ #include <s_fromfpl_main.c>
++weak_alias (__ufromfpxl, ufromfpxl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/t_expl.h glibc-2.26/sysdeps/ieee754/ldbl-128ibm/t_expl.h
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/t_expl.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/t_expl.h 2017-10-22 17:02:23.604967252 +0000
+@@ -0,0 +1,970 @@
++/* Accurate table for expl().
++ Copyright (C) 1999-2017 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/>. */
++
++/* __expl_table basically consists of four tables, T_EXPL_ARG{1,2} and
++ T_EXPL_RES{1,2}. All tables use positive and negative indexes, the 0 points
++ are marked by T_EXPL_* defines.
++ For ARG1 and RES1 tables lets B be 89 and S 256.0, for ARG2 and RES2 B is 65
++ and S 32768.0.
++ These table have the property that, for all integers -B <= i <= B
++ expl(__expl_table[T_EXPL_ARGN+2*i]+__expl_table[T_EXPL_ARGN+2*i+1]+r) ==
++ __expl_table[T_EXPL_RESN+i], __expl_table[T_EXPL_RESN+i] is some exact number
++ with the low 58 bits of the mantissa 0,
++ __expl_table[T_EXPL_ARGN+2*i] == i/S+s
++ where absl(s) <= 2^-54 and absl(r) <= 2^-212. */
++
++
++static const long double __expl_table [] = {
++ -3.47656250000000000584188889839535373E-01L, /* bffd640000000000002b1b04213cf000 */
++ 6.90417668990715641167244540876988960E-32L, /* 3f97667c3fdb588a6ae1af8748357a17 */
++ -3.43749999999999981853132895957607418E-01L, /* bffd5ffffffffffffac4ff5f4050b000 */
++ -7.16021898043268093462818380603370350E-33L, /* bf94296c8219427edc1431ac2498583e */
++ -3.39843750000000013418643523138766329E-01L, /* bffd5c000000000003de1f027a30e000 */
++ 8.16920774283317801641347327589583265E-32L, /* 3f97a82b65774bdca1b4440d749ed8d3 */
++ -3.35937500000000014998092453039303051E-01L, /* bffd5800000000000452a9f4d8857000 */
++ -6.55865578425428447938248396879359670E-32L, /* bf97548b7d240f3d034b395e6eecfac8 */
++ -3.32031250000000000981984049529998541E-01L, /* bffd540000000000004875277cda5000 */
++ 6.91213046334032232108944519541512737E-32L, /* 3f9766e5f925338a19045c94443b66e1 */
++ -3.28124999999999986646017645350399708E-01L, /* bffd4ffffffffffffc26a667bf44d000 */
++ -6.16281060996110316602421505683742661E-32L, /* bf973ffdcdcffb6fbffc86b2b8d42f5d */
++ -3.24218749999999991645717430645867963E-01L, /* bffd4bfffffffffffd97901063e48000 */
++ -7.90797211087760527593856542417304137E-32L, /* bf979a9afaaca1ada6a8ed1c80584d60 */
++ -3.20312499999999998918211610690789652E-01L, /* bffd47ffffffffffffb02d9856d71000 */
++ 8.64024799457616856987630373786503376E-32L, /* 3f97c0a098623f95579d5d9b2b67342d */
++ -3.16406249999999998153974811017181883E-01L, /* bffd43ffffffffffff77c991f1076000 */
++ -2.73176610180696076418536105483668404E-32L, /* bf961baeccb32f9b1fcbb8e60468e95a */
++ -3.12500000000000011420976192575972779E-01L, /* bffd400000000000034ab8240483d000 */
++ 7.16573502812389453744433792609989420E-32L, /* 3f977410f4c2cfc4335f28446c0fb363 */
++ -3.08593750000000001735496343854851414E-01L, /* bffd3c000000000000800e995c176000 */
++ -1.56292999645122272621237565671593071E-32L, /* bf95449b9cbdaff6ac1246adb2c826ac */
++ -3.04687499999999982592401295899221626E-01L, /* bffd37fffffffffffafb8bc1e061a000 */
++ 6.48993208584888904958594509625158417E-32L, /* 3f9750f9fe8366d82d77afa0031a92e1 */
++ -3.00781249999999999230616898937763959E-01L, /* bffd33ffffffffffffc73ac39da54000 */
++ 6.57082437496961397305801409357792029E-32L, /* 3f97552d3cb598ea80135cf3feb27ec4 */
++ -2.96874999999999998788769281703245722E-01L, /* bffd2fffffffffffffa6a07fa5021000 */
++ -3.26588297198283968096426564544269170E-32L, /* bf9653260fc1802f46b629aee171809b */
++ -2.92968750000000015318089182805941695E-01L, /* bffd2c0000000000046a468614bd6000 */
++ -1.73291974845198589684358727559290718E-32L, /* bf9567e9d158f52e483c8d8dcb5961dd */
++ -2.89062500000000007736778942676309681E-01L, /* bffd280000000000023adf9f4c3d3000 */
++ -6.83629745986675744404029225571026236E-32L, /* bf9762f5face6281c1daf1c6aedbdb45 */
++ -2.85156250000000001367091555763661937E-01L, /* bffd2400000000000064dfa11e3fb000 */
++ -5.44898442619766878281110054067026237E-32L, /* bf971aed6d2db9f542986a785edae072 */
++ -2.81249999999999986958718100227029406E-01L, /* bffd1ffffffffffffc3db9265ca9d000 */
++ 1.13007318374506125723591889451107046E-32L, /* 3f94d569fe387f456a97902907ac3856 */
++ -2.77343750000000000356078829380495179E-01L, /* bffd1c0000000000001a462390083000 */
++ -4.98979365468978332358409063436543102E-32L, /* bf970315bbf3e0d14b5c94c900702d4c */
++ -2.73437499999999990276993957508540484E-01L, /* bffd17fffffffffffd32919bcdc94000 */
++ -8.79390484115892344533724650295100871E-32L, /* bf97c89b0b89cc19c3ab2b60da9bbbc3 */
++ -2.69531250000000002434203866460082225E-01L, /* bffd14000000000000b39ccf9e130000 */
++ 9.44060754687026590886751809927191596E-32L, /* 3f97ea2f32cfecca5c64a26137a9210f */
++ -2.65624999999999997296320716986257179E-01L, /* bffd0fffffffffffff3880f13a2bc000 */
++ 2.07142664067265697791007875348396921E-32L, /* 3f95ae37ee685b9122fbe377bd205ee4 */
++ -2.61718750000000010237478733739017956E-01L, /* bffd0c000000000002f3648179d40000 */
++ -6.10552936159265665298996309192680256E-32L, /* bf973d0467d31e407515a3cca0f3b4e2 */
++ -2.57812500000000011948220522778370303E-01L, /* bffd08000000000003719f81275bd000 */
++ 6.72477169058908902499239631466443836E-32L, /* 3f975d2b8c475d3160cf72d227d8e6f9 */
++ -2.53906249999999991822993360536596860E-01L, /* bffd03fffffffffffda4a4b62f818000 */
++ -2.44868296623215865054704392917190994E-32L, /* bf95fc92516c6d057d29fc2528855976 */
++ -2.49999999999999986862019457428548084E-01L, /* bffcfffffffffffff86d2d20d5ff4000 */
++ -3.85302898949105073614122724961613078E-32L, /* bf96901f147cb7d643af71b6129ce929 */
++ -2.46093750000000000237554160737318435E-01L, /* bffcf8000000000000230e8ade26b000 */
++ -1.52823675242678363494345369284988589E-32L, /* bf953d6700c5f3fc303f79d0ec8c680a */
++ -2.42187500000000003023380963205457065E-01L, /* bffcf0000000000001be2c1a78bb0000 */
++ -7.78402037952209709489481182714311699E-34L, /* bf9102ab1f3998e887f0ee4cf940faa5 */
++ -2.38281249999999995309623303145485725E-01L, /* bffce7fffffffffffd4bd2940f43f000 */
++ -3.54307216794236899443913216397197696E-32L, /* bf966fef03ab69c3f289436205b21d02 */
++ -2.34374999999999998425804947623207526E-01L, /* bffcdfffffffffffff17b097a6092000 */
++ -2.86038428948386602859761879407549696E-32L, /* bf96290a0eba0131efe3a05fe188f2e3 */
++ -2.30468749999999993822207406785200832E-01L, /* bffcd7fffffffffffc70519834eae000 */
++ -2.54339521031747516806893838749365762E-32L, /* bf96081f0ad7f9107ae6cddb32c178ab */
++ -2.26562499999999997823524030344489884E-01L, /* bffccffffffffffffebecf10093df000 */
++ 4.31904611473158635644635628922959401E-32L, /* 3f96c083f0b1faa7c4c686193e38d67c */
++ -2.22656250000000004835132405125162742E-01L, /* bffcc8000000000002c98a233f19f000 */
++ 2.54709791629335691650310168420597566E-33L, /* 3f92a735903f5eed07a716ab931e20d9 */
++ -2.18749999999999988969454021829236626E-01L, /* bffcbffffffffffff9a42dc14ce36000 */
++ -3.77236096429336082213752014054909454E-32L, /* bf9687be8e5b2fca54d3e81157eac660 */
++ -2.14843750000000010613256919115758495E-01L, /* bffcb80000000000061e3d828ecac000 */
++ -4.55194148712216691177097854305964738E-32L, /* bf96d8b35c776aa3e1a4768271380503 */
++ -2.10937499999999993204656148110447201E-01L, /* bffcaffffffffffffc152f2aea118000 */
++ -2.95044199165561453749332254271716417E-32L, /* bf96326433b00b2439094d9bef22ddd1 */
++ -2.07031250000000012233944895423355677E-01L, /* bffca80000000000070d695ee0e94000 */
++ 1.93146788688385419095981415411012357E-32L, /* 3f959126729135a5e390d4bb802a0bde */
++ -2.03125000000000008030983633336321863E-01L, /* bffca0000000000004a129fbc51af000 */
++ 2.37361904671826193563212931215900137E-32L, /* 3f95ecfb3c4ba1b97ea3ad45cbb1e68a */
++ -1.99218750000000001763815712796132779E-01L, /* bffc98000000000001044b12d9950000 */
++ -3.63171243370923753295192486732883239E-33L, /* bf932db5fb3f27c38e0fa7bbcfc64f55 */
++ -1.95312500000000004883660234506677272E-01L, /* bffc90000000000002d0b3779d1f9000 */
++ -3.19989507343607877747980892249711601E-33L, /* bf9309d63de96bb3ef744c865f22f1bd */
++ -1.91406250000000013720152363227519348E-01L, /* bffc88000000000007e8bcb387121000 */
++ -1.89295754093147174148371614722178860E-32L, /* bf958926e2e67dfe812c508290add2e7 */
++ -1.87500000000000000182342082774432620E-01L, /* bffc800000000000001ae8b06a39f000 */
++ -2.96812835183184815200854214892983927E-32L, /* bf96343a62d156bbe71f55d14ca4b6e5 */
++ -1.83593750000000012410147185883290345E-01L, /* bffc78000000000007276a1adda8d000 */
++ -2.02191931237489669058466239995304587E-32L, /* bf95a3efab92d26ec2df90df036a117f */
++ -1.79687499999999997439177363346082917E-01L, /* bffc6ffffffffffffe8616db2927d000 */
++ -9.92752326937775530007399526834009465E-33L, /* bf949c5f88ed17041e1a3f1829d543cd */
++ -1.75781249999999995824373974504785174E-01L, /* bffc67fffffffffffd97c94f13ea3000 */
++ 1.44184772065335613487885714828816178E-32L, /* 3f952b75c63476e7fcc2f5841c27bcce */
++ -1.71874999999999986685050259043077809E-01L, /* bffc5ffffffffffff8530f6bc531a000 */
++ -3.49007014971241147689894940544402482E-32L, /* bf966a6dfaa012aea8ffe6d90b02330f */
++ -1.67968749999999997316058782350439701E-01L, /* bffc57fffffffffffe73eb914f2aa000 */
++ 3.34025733574205019081305778794376391E-32L, /* 3f965adf4572561fd5456a6c13d8babf */
++ -1.64062499999999993322730602128318480E-01L, /* bffc4ffffffffffffc269be4f68f3000 */
++ -1.83345916769684984022099095506340635E-32L, /* bf957ccb69026cb2f6024c211576d5f4 */
++ -1.60156249999999992419000744447607979E-01L, /* bffc47fffffffffffba13df21784a000 */
++ 2.73442789798110494773517431626534726E-32L, /* 3f961bf58ff22c9b30f1e2b39f26d7d5 */
++ -1.56249999999999987665010524130393080E-01L, /* bffc3ffffffffffff8e3ad45e7508000 */
++ 2.02695576464836145806428118889332191E-32L, /* 3f95a4fb7435a4a2f71de81eb8ae75d1 */
++ -1.52343749999999989905291167951491803E-01L, /* bffc37fffffffffffa2e48aecfc24000 */
++ -3.61436631548815190395331054871041524E-32L, /* bf967756567ebd108075ae527cc2e7f0 */
++ -1.48437500000000006686107754967759751E-01L, /* bffc30000000000003dab20261b3c000 */
++ -2.15524270159131591469319477922198390E-32L, /* bf95bfa05b82ef3a708c4f0395e9fcf6 */
++ -1.44531250000000005132889939177166485E-01L, /* bffc28000000000002f57b1969e7b000 */
++ 2.74741116529653547935086189244019604E-32L, /* 3f961d4eb77c1185d34fe1b04a3f3cf5 */
++ -1.40625000000000000707469094533647325E-01L, /* bffc2000000000000068676d3d5c4000 */
++ 4.40607097220049957013547629906723266E-33L, /* 3f936e0ac425daf795b42913cf0ef881 */
++ -1.36718749999999995713752139187543306E-01L, /* bffc17fffffffffffd87762255991000 */
++ -3.73751317180116492404578048203389108E-32L, /* bf9684202491e9cbb7ceb67d9ff7e0c9 */
++ -1.32812500000000007198453630478482191E-01L, /* bffc10000000000004264de3a4379000 */
++ -3.97050085179660203884930593717220728E-32L, /* bf969c52048de14be3c9c1971e50869c */
++ -1.28906250000000006070486371645733082E-01L, /* bffc080000000000037fd87db2cb0000 */
++ 3.59610068058504988294019521946586131E-32L, /* 3f967570c10687cb8e9ebd0b280abf5a */
++ -1.25000000000000003700729208608337966E-01L, /* bffc00000000000002222198bbc74000 */
++ 3.23464851393124362331846965931995969E-33L, /* 3f930cb95da3bfc847e593716c91d57a */
++ -1.21093750000000013729038501177102555E-01L, /* bffbf000000000000fd418d1f5fda000 */
++ 2.45242487730722066611358741283977619E-32L, /* 3f95fd5945ad86a464292e26ac192a84 */
++ -1.17187499999999999765305306880205578E-01L, /* bffbdfffffffffffffbabaf869845000 */
++ -1.14557520298960389903199646350205537E-32L, /* bf94dbda735322179d9bcf392e1dd06d */
++ -1.13281250000000009579647893740755690E-01L, /* bffbd000000000000b0b69bae7ab9000 */
++ 2.37873962873837390105423621772752350E-32L, /* 3f95ee0b7e0bd5ac1f6fab1e2a71abc3 */
++ -1.09375000000000008981153004560108539E-01L, /* bffbc000000000000a5ac4bc1d2c3000 */
++ 1.53152444860014076105003555837231015E-32L, /* 3f953e15ce931e12ef9a152522e32bdd */
++ -1.05468749999999992399063850363228723E-01L, /* bffbaffffffffffff73c998091408000 */
++ -8.75920903597804862471749360196688834E-33L, /* bf946bd7e310a01bae5687ebdc47fcc5 */
++ -1.01562500000000007685885179918350550E-01L, /* bffba0000000000008dc7910a648c000 */
++ -4.63820993797174451904075397785059501E-33L, /* bf938153d0e54001a472da180fb5e8aa */
++ -9.76562499999999887262211517861331814E-02L, /* bffb8ffffffffffff300915aa6fd6000 */
++ -2.63767025974952608658936466715705903E-33L, /* bf92b64215bb8d520be5404620d38088 */
++ -9.37499999999999939650246024457439795E-02L, /* bffb7ffffffffffff90aca26bd0fc000 */
++ -1.72047822349322956713582039121348377E-32L, /* bf9565545015c5b9b56d02cfefca2c7d */
++ -8.98437500000000033088896383977486369E-02L, /* bffb70000000000003d09ca1e3cbe000 */
++ 3.04831994420989436248526129869697270E-33L, /* 3f92fa7d30d2ed90e7ebbd6231fd08b1 */
++ -8.59374999999999947312400115121319225E-02L, /* bffb5ffffffffffff9ecefc03376e000 */
++ 1.50416954438393392150792422537312281E-32L, /* 3f9538675ee99bd722fad0023c09c915 */
++ -8.20312500000000054182280847004695514E-02L, /* bffb500000000000063f2dbd40200000 */
++ 2.68399664523430004488075638997207289E-33L, /* 3f92bdf49766629882c49a3da88928ed */
++ -7.81250000000000114767533968079748798E-02L, /* bffb4000000000000d3b56f81ba70000 */
++ 1.72318124201659121296305402819694281E-32L, /* 3f9565e407aaabfb359e8a567d760de3 */
++ -7.42187500000000035531829472486812869E-02L, /* bffb3000000000000418b6e9b5388000 */
++ 2.09401756478514117051383998628099655E-32L, /* 3f95b2e91221fcd74be0a86d8ad658d2 */
++ -7.03124999999999987474933134860732535E-02L, /* bffb1ffffffffffffe8e53453d2ac000 */
++ 2.28515798224350800271565551341211666E-32L, /* 3f95da9bd6adf00894f05b5cc5530125 */
++ -6.64062500000000042267533361089054159E-02L, /* bffb10000000000004df8473dbcf2000 */
++ 1.97576478800281368377376002585430031E-32L, /* 3f959a59acbddb2f53bd3096b66370e9 */
++ -6.25000000000000066329769382774201686E-02L, /* bffb00000000000007a5b5914e336000 */
++ -1.46422615813786836245343723048221678E-33L, /* bf91e69295f069fc0c4a9db181ea25a3 */
++ -5.85937500000000002823707957982406053E-02L, /* bffae0000000000000a6aeab10592000 */
++ 9.25637741701318872896718218457555829E-33L, /* 3f94807eb021f1f40a37d4015b1eb76b */
++ -5.46875000000000081586888005226044448E-02L, /* bffac0000000000012d00a3171e3a000 */
++ -4.87144542459404765480424673678105050E-33L, /* bf9394b42faba6b7036fe7b36269daf3 */
++ -5.07812499999999927720348253140567013E-02L, /* bffa9fffffffffffef555cc8dd914000 */
++ -3.01901021987395945826043649523451725E-33L, /* bf92f59e7e3025691f290f8f67277faf */
++ -4.68749999999999935349476738962633103E-02L, /* bffa7ffffffffffff117b4ea2b876000 */
++ 1.21521638219189777347767475937119750E-32L, /* 3f94f8c7f88c5b56674b94d984ac8ecb */
++ -4.29687500000000056305562847814228219E-02L, /* bffa6000000000000cfbb19be30c0000 */
++ -1.18643699217679276275559592978275214E-32L, /* bf94ecd39f0833a876550e83eb012b99 */
++ -3.90624999999999962692914526031373542E-02L, /* bffa3ffffffffffff765c743922f9000 */
++ -4.91277156857520035712509544689973679E-33L, /* bf939823189996193872e58ac0dececb */
++ -3.51562500000000108152468207687602886E-02L, /* bffa20000000000018f031e41177f000 */
++ 1.18599806302656253755207072755609820E-32L, /* 3f94eca4f23e787fab73ce8f6b9b8d64 */
++ -3.12500000000000077376981036742289578E-02L, /* bffa00000000000011d787e0b386f000 */
++ 9.97730386477005171963635210799577079E-33L, /* 3f949e70e498c46a0173ac0d46c699fc */
++ -2.73437500000000139436129596418623235E-02L, /* bff9c00000000000404db66e70a08000 */
++ 2.25755321633070123579875157841633859E-33L, /* 3f927719b1a93074bdf9f3c2cb784785 */
++ -2.34375000000000088003629211828324876E-02L, /* bff98000000000002895a27d45feb000 */
++ 2.84374279216848803102126617873942975E-33L, /* 3f92d87f70e749d6da6c260b68dc210b */
++ -1.95312500000000107408831063404855424E-02L, /* bff9400000000000318898ba69f71000 */
++ 2.47348089686935458989103979140011912E-33L, /* 3f929afa3de45086fe909fdddb41edce */
++ -1.56250000000000081443917555362290635E-02L, /* bff9000000000000258f335e9cdd6000 */
++ -2.43379314483517422161458863218426254E-33L, /* bf9294621c8a9ccacf2b020ec19cad27 */
++ -1.17187500000000051490597418161403184E-02L, /* bff88000000000002f7ddfa26221f000 */
++ 1.83405297208145390679150568810924707E-33L, /* 3f9230bbfc5d5fe1b534fbcda0465bb9 */
++ -7.81249999999999715861805208310174953E-03L, /* bff7ffffffffffffcb95f3fff157d000 */
++ 3.51548384878710915171654413641872451E-34L, /* 3f8fd349b76c22966f77a39fc37ed704 */
++ -3.90625000000000309326013918295097128E-03L, /* bff7000000000000390f820c8e153000 */
++ 6.38058004651791109324060099097251911E-36L, /* 3f8a0f665d3ac25a1ac94d688273dbcd */
++#define T_EXPL_ARG1 (2*89)
++ 0.00000000000000000000000000000000000E+00L, /* 00000000000000000000000000000000 */
++ 0.00000000000000000000000000000000000E+00L, /* 00000000000000000000000000000000 */
++ 3.90625000000000245479958859972588985E-03L, /* 3ff70000000000002d48769ac9874000 */
++ -6.58439598384342854976169982902779828E-36L, /* bf8a1811b923e6c626b07ef29761482a */
++ 7.81250000000001311374391093664996358E-03L, /* 3ff800000000000078f3f3cd89111000 */
++ 2.60265650555493781464273319671555602E-33L, /* 3f92b070c3b635b87af426735a71fc87 */
++ 1.17187500000000269581156218247101912E-02L, /* 3ff8800000000000f8a50d02fe20d000 */
++ 1.00961747974945520631836275894919326E-33L, /* 3f914f80c1a4f8042044fe3b757b030b */
++ 1.56249999999999797878275270751825475E-02L, /* 3ff8ffffffffffff45935b69da62e000 */
++ 2.03174577741375590087897353146748580E-33L, /* 3f925194e863496e0f6e91cbf6b22e26 */
++ 1.95312499999999760319884511789111533E-02L, /* 3ff93fffffffffff917790ff9a8f4000 */
++ 4.62788519658803722282100289809515007E-33L, /* 3f9380783ba81295feeb3e4879d7d52d */
++ 2.34374999999999822953909016349145918E-02L, /* 3ff97fffffffffffae5a163bd3cd5000 */
++ -3.19499956304699705390404384504876533E-33L, /* bf93096e2037ced8194cf344c692f8d6 */
++ 2.73437500000000137220327275871555682E-02L, /* 3ff9c000000000003f481dea5dd51000 */
++ -2.25757776523031994464630107442723424E-33L, /* bf92771abcf988a02b414bf2614e3734 */
++ 3.12499999999999790857640618332718621E-02L, /* 3ff9ffffffffffff9f8cd40b51509000 */
++ -4.22479470489989916319395454536511458E-33L, /* bf935efb7245612f371deca17cb7b30c */
++ 3.51562499999999840753382405747597346E-02L, /* 3ffa1fffffffffffdb47bd275f722000 */
++ 1.08459658374118041980976756063083500E-34L, /* 3f8e2055d18b7117c9db1c318b1e889b */
++ 3.90624999999999989384433621470426757E-02L, /* 3ffa3ffffffffffffd8d5e18b042e000 */
++ -7.41674226146122000759491297811091830E-33L, /* bf94341454e48029e5b0205d91baffdc */
++ 4.29687500000000107505739500500200462E-02L, /* 3ffa60000000000018ca04cd9085c000 */
++ -4.74689012756713017494437969420919847E-34L, /* bf903b7c268103c6f7fbaaa24142e287 */
++ 4.68749999999999978700749928325717352E-02L, /* 3ffa7ffffffffffffb16b6d5479e3000 */
++ -1.06208165308448830117773486334902917E-32L, /* bf94b92be4b3b5b5a596a0a5187cc955 */
++ 5.07812499999999815072625435955786253E-02L, /* 3ffa9fffffffffffd55bd086d5cbc000 */
++ -9.37038897148383660401929567549111394E-33L, /* bf94853b111b0175b491c80d00419416 */
++ 5.46874999999999809511553152189867394E-02L, /* 3ffabfffffffffffd4138bfa74a61000 */
++ 1.06642963074562437340498606682822123E-32L, /* 3f94bafa3fe991b39255d563dfa05d89 */
++ 5.85937500000000184331996330905145551E-02L, /* 3ffae000000000002a810a5f2f8bf000 */
++ -1.76639977694797200820296641773791945E-34L, /* bf8ed596f07ce4408f1705c8ec16864c */
++ 6.25000000000000021544696744852045001E-02L, /* 3ffb000000000000027be32045e2b000 */
++ 1.68616371995798354366633034788947149E-32L, /* 3f955e33d7440794d8a1b25233d086ab */
++ 6.64062499999999965563110718495802889E-02L, /* 3ffb0ffffffffffffc079a38a3fed000 */
++ -1.82463217667830160048872113565316215E-32L, /* bf957af6163bcdb97cefab44a942482a */
++ 7.03124999999999759989183341261898222E-02L, /* 3ffb1fffffffffffe454218acea05000 */
++ -1.07843770101525495515646940862541503E-32L, /* bf94bff72aada26d94e76e71c07e0580 */
++ 7.42187499999999898968873730710101412E-02L, /* 3ffb2ffffffffffff45a166496dc1000 */
++ 1.28629441689592874462780757154138223E-32L, /* 3f950b2724597b8b93ce1e9d1cf4d035 */
++ 7.81249999999999957198938523510804668E-02L, /* 3ffb3ffffffffffffb10bc52adbc5000 */
++ 1.13297573459968118467100063135856856E-33L, /* 3f91787eea895b3c245899cf34ad0abd */
++ 8.20312500000000199911640621145851159E-02L, /* 3ffb500000000000170c59a661a89000 */
++ -1.51161335208135146756554123073528707E-32L, /* bf9539f326c5ca84e7db5401566f3775 */
++ 8.59375000000000134175373433347670743E-02L, /* 3ffb6000000000000f78287547af0000 */
++ 1.09763629458404270323909815379924900E-32L, /* 3f94c7f0b61b6e3e27d44b9f5bbc7e9d */
++ 8.98437500000000036533922600308306335E-02L, /* 3ffb70000000000004364a83b7a14000 */
++ 3.11459653680110433194288029777718358E-33L, /* 3f9302c0248136d65cebeab69488d949 */
++ 9.37500000000000184977946245216914691E-02L, /* 3ffb800000000000155395d870b17000 */
++ -4.66656154468277949130395786965043927E-33L, /* bf9383aec9b993b6db492b1ede786d8a */
++ 9.76562500000000237839723100419376084E-02L, /* 3ffb9000000000001b6bca237f6c4000 */
++ -1.03028043424658760249140747856831301E-32L, /* bf94abf6352e3d2bb398e47919a343fb */
++ 1.01562500000000012345545575236836572E-01L, /* 3ffba000000000000e3bc30cd9a1f000 */
++ 2.15755372310795701322789783729456319E-32L, /* 3f95c01b3b819edd9d07548fafd61550 */
++ 1.05468749999999976493840484471911438E-01L, /* 3ffbafffffffffffe4e634cd77985000 */
++ 1.78771847038773333029677216592309083E-32L, /* 3f95734b6ae650f33dd43c49a1df9fc0 */
++ 1.09375000000000002267015055992785402E-01L, /* 3ffbc00000000000029d1ad08de7b000 */
++ 6.23263106693943817730045115112427717E-33L, /* 3f9402e4b39ce2198a45e1d045868cd6 */
++ 1.13281250000000022354208618429577398E-01L, /* 3ffbd0000000000019c5cc3f9d2b5000 */
++ 5.40514416644786448581426756221178868E-33L, /* 3f93c10ab4021472c662f69435de9269 */
++ 1.17187500000000013252367133076817603E-01L, /* 3ffbe000000000000f47688cc561b000 */
++ -7.12412585457324989451327215568641325E-33L, /* bf9427ecb343a8d1758990565fcfbf45 */
++ 1.21093750000000020759863992944300792E-01L, /* 3ffbf0000000000017ef3af97bf04000 */
++ 6.26591408357572503875647872077266444E-33L, /* 3f940446a09a2da771b45fc075514d12 */
++ 1.25000000000000004739659392396765618E-01L, /* 3ffc00000000000002bb7344ecd89000 */
++ -1.55611398459729463981000080101758830E-32L, /* bf95433135febefa9e6aa4db39e263d2 */
++ 1.28906249999999982360888081057894783E-01L, /* 3ffc07fffffffffff5d4ed3154361000 */
++ -1.77531518652835570781208599686606474E-32L, /* bf9570b7f225ea076f97f418d11359c1 */
++ 1.32812500000000010568583998727400436E-01L, /* 3ffc1000000000000617a5d09526a000 */
++ 2.12104021624990594668286391598300893E-32L, /* 3f95b885d767a1048d93055927a27adc */
++ 1.36718749999999998434125157367005292E-01L, /* 3ffc17ffffffffffff18eaebc7970000 */
++ 2.50454798592543203967309921276955297E-32L, /* 3f9604164e5598528a76faff26cd1c97 */
++ 1.40625000000000015550032422969330356E-01L, /* 3ffc20000000000008f6c79d8928c000 */
++ 7.80972982879849783680252962992639832E-33L, /* 3f9444674acf2b3225c7647e0d95edf3 */
++ 1.44531250000000012402535562111122522E-01L, /* 3ffc28000000000007264a8bc1ff1000 */
++ 2.79662468716455159585514763921671876E-32L, /* 3f96226b095bd78aa650faf95a221993 */
++ 1.48437500000000007761020440087419948E-01L, /* 3ffc3000000000000479530ff8fe3000 */
++ 2.15518492972728435680556239996258527E-32L, /* 3f95bf9d49295e73a957906a029768cb */
++ 1.52343750000000001733189947520484032E-01L, /* 3ffc38000000000000ffc6109f71f000 */
++ 8.34032236093545825619420380704500188E-33L, /* 3f945a71851226a1d0ce5e656693153e */
++ 1.56249999999999988073295321246958484E-01L, /* 3ffc3ffffffffffff91fedd62ae0f000 */
++ 2.44119337150624789345260194989620908E-32L, /* 3f95fb041a57bc1c1280680ac1620bea */
++ 1.60156250000000002076894210913572460E-01L, /* 3ffc48000000000001327ed84a199000 */
++ -7.36124501128859978061216696286151753E-33L, /* bf9431c62f01e59d2c1e00f195a0037f */
++ 1.64062500000000000950861276373482172E-01L, /* 3ffc500000000000008c5285fba85000 */
++ -4.80566184447001164583855800470217373E-33L, /* bf938f3d1fcafd390f22f80e6c19421f */
++ 1.67968749999999989878071706155265999E-01L, /* 3ffc57fffffffffffa2a445c548c5000 */
++ -4.42154428718618459799673088733365064E-32L, /* bf96cb28cf1c1b28006d53ffe633b22a */
++ 1.71874999999999999459734108403218175E-01L, /* 3ffc5fffffffffffffb04554e9dd4000 */
++ -3.29736288190321377985697972236270628E-32L, /* bf96566af0ebc852e84be12859b24a31 */
++ 1.75781249999999997987525759778901845E-01L, /* 3ffc67fffffffffffed702df6ffff000 */
++ -1.28800728638468399687523924685844352E-32L, /* bf950b8236b88ca0c1b739dc91a7e3fc */
++ 1.79687500000000004929565820437175783E-01L, /* 3ffc70000000000002d779bb32d2e000 */
++ 1.60624461317978482424582320675174225E-32L, /* 3f954d9a9cc0c963fd081f3dc922d04e */
++ 1.83593750000000016873727045739708856E-01L, /* 3ffc78000000000009ba1f6263c9a000 */
++ -3.83390389582056606880506003118452558E-32L, /* bf968e22a5d826f77f19ee788474df22 */
++ 1.87500000000000013443068740761666872E-01L, /* 3ffc80000000000007bfd8c72a1bf000 */
++ -2.74141662712926256150154726565203091E-32L, /* bf961caf5ac59c7f941f928e324c2cc1 */
++ 1.91406249999999981494101786848611970E-01L, /* 3ffc87fffffffffff55502eeae001000 */
++ 3.68992437075565165346469517256118001E-32L, /* 3f967f2f03f9096793372a27b92ad79d */
++ 1.95312499999999989069921848800501648E-01L, /* 3ffc8ffffffffffff9b3015280394000 */
++ 3.69712249337856518452988332367785220E-32L, /* 3f967fee5fdb5bd501ff93516999faa0 */
++ 1.99218750000000021148042946919300804E-01L, /* 3ffc9800000000000c30e67939095000 */
++ 2.50142536781142175091322844848566649E-32L, /* 3f9603c34ae58e10b300b07137ee618a */
++ 2.03124999999999977732559198825437141E-01L, /* 3ffc9ffffffffffff329e7df079e4000 */
++ -2.41951877287895024779300892731537816E-32L, /* bf95f683aefe6965f080df8f59dd34a1 */
++ 2.07031249999999996744030653771913124E-01L, /* 3ffca7fffffffffffe1f80f4b73ca000 */
++ -1.94346475904454000031592792989765585E-32L, /* bf9593a44f87870a3d100d498501ecc7 */
++ 2.10937500000000000251399259834392298E-01L, /* 3ffcb000000000000025199873310000 */
++ -1.33528748788094249098998693871759411E-33L, /* bf91bbb9b25c813668d6103d08acac35 */
++ 2.14843749999999993936323609611875097E-01L, /* 3ffcb7fffffffffffc8128c866236000 */
++ 1.14839877977014974625242788556545292E-32L, /* 3f94dd06b4655c9b83a1305b240e7a42 */
++ 2.18750000000000015181732784749663837E-01L, /* 3ffcc0000000000008c06da5fff24000 */
++ 1.42689085313142539755499441881408391E-32L, /* 3f95285a87dfa7ea7dad5b3be8c669f4 */
++ 2.22656249999999992172647770539596569E-01L, /* 3ffcc7fffffffffffb7ce2fe531f6000 */
++ -3.34421462850496887359128610229650547E-32L, /* bf965b487962b5c2d9056ca6ac0c2e5c */
++ 2.26562499999999989595607223847082419E-01L, /* 3ffccffffffffffffa0095277be5c000 */
++ -3.08983588107248752517344356508205569E-32L, /* bf9640dded57157f8eded311213bdbcd */
++ 2.30468749999999979130462438434567117E-01L, /* 3ffcd7fffffffffff3f8332996560000 */
++ -3.01407539802851697849105682795217019E-32L, /* bf9638ffde35dbdfe1a1ffe45185de5d */
++ 2.34375000000000012194252337217891971E-01L, /* 3ffce0000000000007078dd402c86000 */
++ -8.46879710915628592284714319904522657E-33L, /* bf945fc7b29a2ac6c9eff9eb258a510f */
++ 2.38281249999999982991877076137149870E-01L, /* 3ffce7fffffffffff6320b486eece000 */
++ -2.93563878880439245627127095245798544E-32L, /* bf9630daaa4f40ff05caf29ace2ea7d4 */
++ 2.42187499999999981447559841442773990E-01L, /* 3ffceffffffffffff54e24a09a8d5000 */
++ -4.56766746558806021264215486909850481E-32L, /* bf96da556dee11f3113e5a3467b908e6 */
++ 2.46093749999999991067720539980207318E-01L, /* 3ffcf7fffffffffffad9d405dcb5d000 */
++ 2.14033004219908074003010247652128251E-32L, /* 3f95bc8776e8f9ae098884aa664cc3df */
++ 2.50000000000000016613825838126835953E-01L, /* 3ffd00000000000004c9e24c12bb3000 */
++ 2.57617532593749185996714235009382870E-32L, /* 3f960b867cc01178c0ec68226c6cb47d */
++ 2.53906250000000013372004437827044321E-01L, /* 3ffd04000000000003daae05b3168000 */
++ 7.20177123439204414298152646284640101E-32L, /* 3f9775eff59ddad7e7530b83934af87f */
++ 2.57812499999999995765234725413886085E-01L, /* 3ffd07fffffffffffec7878bad9d5000 */
++ 6.51253187532920882777046064603770602E-32L, /* 3f975226659ca241402e71c2011583b0 */
++ 2.61718750000000007647689994011222248E-01L, /* 3ffd0c000000000002344cc793a0f000 */
++ 3.02370610028725823590045201871491395E-32L, /* 3f9639ffe55fa2fa011674448b4e5b96 */
++ 2.65624999999999986893899042596554269E-01L, /* 3ffd0ffffffffffffc38f0c0a1e9f000 */
++ -2.07683715950724761146070082510569258E-32L, /* bf95af579a92e872fef81abfdf06bae8 */
++ 2.69531249999999979842788204900639327E-01L, /* 3ffd13fffffffffffa30a908d67db000 */
++ 8.71465252506557329027658736641075706E-32L, /* 3f97c47d99e19830447a42b1c0ffac61 */
++ 2.73437500000000006712165837793818271E-01L, /* 3ffd18000000000001ef453a58edb000 */
++ -6.62704045767568912140550474455810301E-32L, /* bf9758187a204dcb06ece46588aeeaba */
++ 2.77343749999999994411329302988535617E-01L, /* 3ffd1bfffffffffffe63a0fec9c9e000 */
++ -4.87273466291944117406493607771338767E-32L, /* bf96fa0381b0844a0be46bac2d673f0c */
++ 2.81250000000000012677892447379453135E-01L, /* 3ffd20000000000003a7769e125d6000 */
++ -8.55871796664700790726282049552906783E-32L, /* bf97bc64e01332cf7616b0091b8dff2c */
++ 2.85156249999999998558643013736363981E-01L, /* 3ffd23ffffffffffff95a5894bccf000 */
++ -1.33068334720606220176455289635046875E-32L, /* bf95145f43290ecf5b7adcb24697bc73 */
++ 2.89062500000000008831431235621753924E-01L, /* 3ffd280000000000028ba504fac59000 */
++ -9.34157398616814623985483776710704237E-32L, /* bf97e50ad1115b941fcb5f0c88a428f7 */
++ 2.92968750000000019840235286110877063E-01L, /* 3ffd2c000000000005b7f372d184f000 */
++ 4.99302093775173155906059132992249671E-33L, /* 3f939ecdcfb97bad3f8dbec5df5ec67d */
++ 2.96875000000000015867911730971630513E-01L, /* 3ffd3000000000000492d860c79db000 */
++ 7.86107787827057767235127454590866211E-33L, /* 3f944689517ee8f16cdb97d6a6938f32 */
++ 3.00781250000000015814100002286124758E-01L, /* 3ffd340000000000048edfe73a17d000 */
++ -1.65419431293024229981937172317171504E-32L, /* bf9557900e3efca16c89646b57f68dc0 */
++ 3.04687499999999985213157159965287195E-01L, /* 3ffd37fffffffffffbbcec6f99b36000 */
++ 9.68753602893894024018934325652944198E-32L, /* 3f97f70170e5458660c33a7e8d43d049 */
++ 3.08593749999999989969324338045156215E-01L, /* 3ffd3bfffffffffffd1bdde4d0fb1000 */
++ 7.10268609610294706092252562643261106E-32L, /* 3f9770cae45cdf615010401a4b37d8d4 */
++ 3.12500000000000002971606591018488854E-01L, /* 3ffd40000000000000db440fbc06b000 */
++ 6.38924218802905979887732294952782964E-32L, /* 3f974bbf988bb5622bd8fbaa46e8b811 */
++ 3.16406250000000006594921047402056305E-01L, /* 3ffd44000000000001e69e8954814000 */
++ 3.96079878754651470094149874444850097E-32L, /* 3f969b5017b9fa7a1e86975258c73d3d */
++ 3.20312500000000006713799366908329147E-01L, /* 3ffd48000000000001ef64159c065000 */
++ -1.86401314975634286055150437995880517E-32L, /* bf958323f0434911794e5fb8bfe136ba */
++ 3.24218749999999987061246567584951210E-01L, /* 3ffd4bfffffffffffc4549db9b928000 */
++ -3.18643523744758601387071062700407431E-32L, /* bf964ae5fa7e26c2c3981bed12e14372 */
++ 3.28124999999999991782776266707412953E-01L, /* 3ffd4ffffffffffffda1ad0840ca8000 */
++ -4.46964199751314296839915534813144652E-32L, /* bf96d0277729ffd74727150df6d15547 */
++ 3.32031250000000000393816557756032682E-01L, /* 3ffd540000000000001d0efc04fad000 */
++ -9.03246333902065439930373230002688649E-33L, /* bf947731a008748cc6dee948839ef7ae */
++ 3.35937499999999983810482995064392173E-01L, /* 3ffd57fffffffffffb556cab8ae61000 */
++ 5.27742727066129518825981597650621794E-32L, /* 3f9712050a6ddbf1cabf1b971f4b5d0b */
++ 3.39843750000000004310441349760912471E-01L, /* 3ffd5c0000000000013e0def5ddc4000 */
++ -3.85927263474732591932884416445586106E-32L, /* bf9690c51088ef3db9ca000829c450c2 */
++ 3.43749999999999990248130003997484364E-01L, /* 3ffd5ffffffffffffd3070624a0af000 */
++ 9.62005170171527308106468341512327487E-34L, /* 3f913fae595cea84432eb01430817fca */
++ 3.47656250000000004085726414568625697E-01L, /* 3ffd640000000000012d79309e291000 */
++ -6.59664093705705297250259434519072507E-32L, /* bf97568465eafb0e662e64a5dbfaf35f */
++
++ -1.98364257812501251077851763965418372E-03L, /* bff6040000000001cd90f658cf0b1000 */
++ -3.71984513103117734260309047540278737E-34L, /* bf8fee73c54483194782aac4a6154d11 */
++ -1.95312500000000378520649630233891879E-03L, /* bff60000000000008ba643bb5e2e8000 */
++ -1.12194202736719050440745599339855038E-34L, /* bf8e2a436aeff7bc529873354f47a3f5 */
++ -1.92260742187499397430259771221991482E-03L, /* bff5f7fffffffffe4361cb51170da000 */
++ -2.30068299876822157331268484824540848E-34L, /* bf8f31d02f85cfe8c0cc02276ce0f437 */
++ -1.89208984375001137424603270262074989E-03L, /* bff5f0000000000347456ed490c23000 */
++ -1.15012507244426243338260435466985403E-34L, /* bf8e31c174d5677a937a34ad8d2a70b4 */
++ -1.86157226562500172319250342061336738E-03L, /* bff5e800000000007f262fa3617b4000 */
++ -3.12438344643346437509767736937785561E-34L, /* bf8f9f4d426a2457c273d34ef7d9bde9 */
++ -1.83105468749999505256246872355430379E-03L, /* bff5dffffffffffe92f18c1c2b6fa000 */
++ -5.91130415288336591179087455220308942E-35L, /* bf8d3a4c80b42dc036bae446c9807f78 */
++ -1.80053710937499445182387245573120522E-03L, /* bff5d7fffffffffe669dea82b4a4c000 */
++ -1.92396289352411531324908916321392100E-34L, /* bf8eff7a2123fb573ba9778550d669bd */
++ -1.77001953125000387737631542516323906E-03L, /* bff5d000000000011e19915c3ddb7000 */
++ 7.91101758977203355387806553469731354E-36L, /* 3f8a507f5a70faaccf469e3461873dea */
++ -1.73950195312500034854670281415554486E-03L, /* bff5c8000000000019b7dc6ef97bd000 */
++ 1.55906551582436824067407021178835755E-34L, /* 3f8e9e7880333e34955aebcde3cfb053 */
++ -1.70898437499998955782591472611429852E-03L, /* bff5bffffffffffcfd80e88aa6b96000 */
++ 8.22951661962611381718215899498500357E-35L, /* 3f8db58e6031a779b59f6ece191de7cc */
++ -1.67846679687500586652037711131708544E-03L, /* bff5b80000000001b0df6fd21c133000 */
++ -8.96642618848426299713145894522897419E-35L, /* bf8ddcbcab46d531801bfae4121f2f8a */
++ -1.64794921875000109499161354039904782E-03L, /* bff5b0000000000050cbce8915575000 */
++ -2.88077905394253859590587789680486639E-34L, /* bf8f7eebd4dd860ef73b674d5e707959 */
++ -1.61743164062501133830507079150388351E-03L, /* bff5a80000000003449e8700c3e82000 */
++ -3.68271725851639066312899986829350273E-34L, /* bf8fe9845fe20a5fe74059e0cae185d6 */
++ -1.58691406249999015546015764131101956E-03L, /* bff59ffffffffffd2999e668cdd28000 */
++ 8.48197657099957029953716507898788812E-35L, /* 3f8dc2faaebb97392e451b07b28c4b12 */
++ -1.55639648437500317366570219290722587E-03L, /* bff5980000000000ea2cd9a40d256000 */
++ -3.45156704719737676412949957712570373E-36L, /* bf8925a079505516c8e317ac1ff53255 */
++ -1.52587890625000568759013197767046039E-03L, /* bff5900000000001a3ab8a3f6b698000 */
++ -1.01902948542497496574967177677556729E-34L, /* bf8e0ee78d94d9b5ad3d63ae35c9b554 */
++ -1.49536132812500945889014955936485340E-03L, /* bff5880000000002b9f1621b57743000 */
++ -3.32264697086631598830366079048117140E-34L, /* bf8fb9a7d14c32289204fbb0c9eb20e0 */
++ -1.46484374999999931883259902869504725E-03L, /* bff57fffffffffffcdbd1c90e1b4a000 */
++ -1.76487524793892929381101031660811433E-34L, /* bf8ed52f2f724bc1ae870b18356337b4 */
++ -1.43432617187498876325946983333888768E-03L, /* bff577fffffffffcc2dff8faa5570000 */
++ -3.54550084538495708816233114576143814E-34L, /* bf8fd74724576915868c1e8ce9f430f1 */
++ -1.40380859374999215367421282192718062E-03L, /* bff56ffffffffffdbd0b18aac65ed000 */
++ -1.90585907028351204486765167064669639E-34L, /* bf8efaaa0c0e23e50c11b2120348054f */
++ -1.37329101562499692341771212945644892E-03L, /* bff567ffffffffff1cfd00f1b0577000 */
++ -3.59631150411372589637918252836880320E-34L, /* bf8fde08239ac74942a46298ea4fb715 */
++ -1.34277343749999137467356674296739172E-03L, /* bff55ffffffffffd839030b05d53d000 */
++ -1.49571076125940368185068762485268117E-35L, /* bf8b3e1a3d5c684b27a9f835b1d8d3c9 */
++ -1.31225585937499247038404301859788734E-03L, /* bff557fffffffffdd469936e691e3000 */
++ 3.10375845385355395586146533282311300E-34L, /* 3f8f9c8f6d63b7a4145716ffd92491fb */
++ -1.28173828124999024755581675764821898E-03L, /* bff54ffffffffffd306589b0ab21d000 */
++ -1.98541096105909793397376077900810019E-34L, /* bf8f07e808bbb1e35106c294ffbb9687 */
++ -1.25122070312500340204619591143332523E-03L, /* bff5480000000000fb06d5f16ad2c000 */
++ 3.62884195935761446237911443317457521E-34L, /* 3f8fe25b17d623178a386a6fa6c5afb2 */
++ -1.22070312499999591578388993012071279E-03L, /* bff53ffffffffffed2a356c440074000 */
++ -2.96756662615653130862526710937493307E-35L, /* bf8c3b90d8ff2a991e5bd16718fb0645 */
++ -1.19018554687498821966212632349422735E-03L, /* bff537fffffffffc9ac3b585dda89000 */
++ 1.44659971891167323357060028901142644E-34L, /* 3f8e809279ab249edf1dad9fe13fb0bf */
++ -1.15966796875000160938908064907298384E-03L, /* bff530000000000076c0800db9639000 */
++ 2.50088010538742402346270685365928513E-34L, /* 3f8f4c6c8a483b60201d30c1a83c3cb7 */
++ -1.12915039062500267151512523291939657E-03L, /* bff5280000000000c51f7e7315137000 */
++ 7.56402096465615210500092443924888831E-35L, /* 3f8d922c1e485d99aea2668ed32b55a6 */
++ -1.09863281249998665006360103291051571E-03L, /* bff51ffffffffffc26f2d4c9ce2ba000 */
++ 1.43982174467233642713619821353592061E-34L, /* 3f8e7ec530b3d92b6303bec1c81214d1 */
++ -1.06811523437500522742248711752028025E-03L, /* bff518000000000181b7380f10446000 */
++ 5.41265133745862349181293024531133174E-35L, /* 3f8d1fc9313d018b30e790e06b6be723 */
++ -1.03759765624999980942114138999770552E-03L, /* bff50ffffffffffff1f01130490e1000 */
++ 1.21525139612685854366189534669623436E-34L, /* 3f8e4311b96b6fcde412caf3f0d86fb9 */
++ -1.00708007812499602697537601515759439E-03L, /* bff507fffffffffedad7afcce7051000 */
++ 1.00020246351201558505328236381833392E-34L, /* 3f8e09e640992512b1300744a7e984ed */
++ -9.76562499999992592487302113340463694E-04L, /* bff4fffffffffffbbad8151f8adf6000 */
++ -1.64984406575162932060422892046851002E-34L, /* bf8eb69a919986e8054b86fc34300f24 */
++ -9.46044921874989085824996924138179594E-04L, /* bff4effffffffff9b55a204fd9792000 */
++ -9.29539174108308550334255350011347171E-35L, /* bf8dee3a50ed896b4656fa577a1df3d7 */
++ -9.15527343750013735214860599791540029E-04L, /* bff4e00000000007eaf5bf103f82d000 */
++ 3.07557018309280519949818825519490586E-35L, /* 3f8c470cfbef77d32c74cb8042f6ee81 */
++ -8.85009765625012292294986105781516428E-04L, /* bff4d000000000071605c65403b97000 */
++ 4.77499983783821950338363358545463558E-35L, /* 3f8cfbc3dc18884c4c4f9e07d90d7bd3 */
++ -8.54492187499986941239470706817188192E-04L, /* bff4bffffffffff878ddf9cab264a000 */
++ -1.60128240346239526958630011447901568E-34L, /* bf8ea9b1a21e19e2d5bd84b0fbffcf95 */
++ -8.23974609374996290174598690241743810E-04L, /* bff4affffffffffddc86c249ebe06000 */
++ 1.61677540391961912631535763471935882E-34L, /* 3f8eadd00841366b0dc2bc262c2c8c36 */
++ -7.93457031249988696952538334288757473E-04L, /* bff49ffffffffff97bf6f0aa85a5f000 */
++ 1.22318577008381887076634753347515709E-34L, /* 3f8e452db5b5d250878f71040da06d14 */
++ -7.62939453124996723316499040007097041E-04L, /* bff48ffffffffffe1c7265b431108000 */
++ -1.03845161748762410745671891558398468E-34L, /* bf8e14115ad884c96d1a820c73647220 */
++ -7.32421874999998242520117923997325794E-04L, /* bff47ffffffffffefca4498b7aa8a000 */
++ 5.64005211953031009549514026639438083E-35L, /* 3f8d2be06950f68f1a6d8ff829a6928e */
++ -7.01904296874999772890934814265622012E-04L, /* bff46fffffffffffde7c0fe5d8041000 */
++ 5.90245467325173644235991233229525762E-35L, /* 3f8d39d40cc49002189243c194b1db0e */
++ -6.71386718750008699269643939210658742E-04L, /* bff460000000000503c91d798b60c000 */
++ -5.20515801723324452151498579012322191E-35L, /* bf8d14c0f08a6a9285b32b8bda003eb5 */
++ -6.40869140625005499535275057463709988E-04L, /* bff45000000000032b969184e9751000 */
++ -6.69469163285461870099846471658294534E-35L, /* bf8d63f36bab7b24d936c9380e3d3fa6 */
++ -6.10351562499999293780097329596079841E-04L, /* bff43fffffffffff97c7c433e35ed000 */
++ -1.16941808547394177991845382085515086E-34L, /* bf8e36e27886f10b234a7dd8fc588bf0 */
++ -5.79833984375000068291972326409994795E-04L, /* bff43000000000000a13ff6dcf2bf000 */
++ 1.17885044988246219185041488459766001E-34L, /* 3f8e3964677e001a00412aab52790842 */
++ -5.49316406249990904622170867910987793E-04L, /* bff41ffffffffffac1c25739c716b000 */
++ -3.31875702128137033065075734368960972E-35L, /* bf8c60e928d8982c3c99aef4f885a121 */
++ -5.18798828125011293653756992177727236E-04L, /* bff410000000000682a62cff36775000 */
++ -5.69971237642088463334239430962628187E-35L, /* bf8d2f0c76f8757d61cd1abc7ea7d066 */
++ -4.88281249999990512232251384917893121E-04L, /* bff3fffffffffff50fb48992320df000 */
++ 1.02144616714408655325510171265051108E-35L, /* 3f8ab279a3626612710b9b3ac71734ac */
++ -4.57763671874997554564967307956493434E-04L, /* bff3dffffffffffd2e3c272e3cca9000 */
++ -8.25484058867957231164162481843653503E-35L, /* bf8db6e71158e7bf93e2e683f07aa841 */
++ -4.27246093749991203999790346349633286E-04L, /* bff3bffffffffff5dbe103cba0eb2000 */
++ -3.51191203319375193921924105905691755E-35L, /* bf8c757356d0f3dd7fbefc0dd419ab50 */
++ -3.96728515624986649402960638705483281E-04L, /* bff39ffffffffff09b996882706ec000 */
++ -5.51925962073095883016589497244931171E-36L, /* bf89d586d49f22289cfc860bebb99056 */
++ -3.66210937499999945095511981300980754E-04L, /* bff37fffffffffffefcb88bfc7df6000 */
++ -2.11696465278144529364423332249588595E-35L, /* bf8bc23a84d28e5496c874ef9833be25 */
++ -3.35693359374992480958458008559640163E-04L, /* bff35ffffffffff754c548a8798f2000 */
++ -8.58941791799705081104736787493668352E-35L, /* bf8dc8b1192fb7c3662826d43acb7c68 */
++ -3.05175781250009811036303273640122156E-04L, /* bff340000000000b4fb4f1aad1c76000 */
++ -8.61173897858769926480551302277426632E-35L, /* bf8dc9e0eabb1c0b33051011b64769fa */
++ -2.74658203124987298321920308390303850E-04L, /* bff31ffffffffff15b2056ac252fd000 */
++ 3.35152809454778381053519808988046631E-37L, /* 3f85c82fb59ff8d7c80d44e635420ab1 */
++ -2.44140624999999992770514819575735516E-04L, /* bff2fffffffffffffbbb82d6a7636000 */
++ 3.54445837111124472730013879165516908E-35L, /* 3f8c78e955b01378be647b1c92aa9a77 */
++ -2.13623046875012756463165168672749438E-04L, /* bff2c0000000001d6a1635fea6bbf000 */
++ 1.50050816288650121729916777279129473E-35L, /* 3f8b3f1f6f616a61129a58e131cbd31d */
++ -1.83105468749991323078784464300306893E-04L, /* bff27fffffffffebfe0cbd0c82399000 */
++ -9.14919506501448661140572099029756008E-37L, /* bf873754bacaa9d9513b6127e791eb47 */
++ -1.52587890625013337032336300236461546E-04L, /* bff240000000001ec0cb57f2cc995000 */
++ 2.84906084373176180870418394956384516E-35L, /* 3f8c2ef6d03a7e6ab087c4f099e4de89 */
++ -1.22070312499990746786116828458007518E-04L, /* bff1ffffffffffd553bbb49f35a34000 */
++ 6.71618008964968339584520728412444537E-36L, /* 3f8a1dacb99c60071fc9cd2349495bf0 */
++ -9.15527343750029275602791047595142231E-05L, /* bff180000000000d8040cd6ecde28000 */
++ -1.95753652091078750312541716951402172E-35L, /* bf8ba0526cfb24d8d59122f1c7a09a14 */
++ -6.10351562499913258461494008080572701E-05L, /* bff0ffffffffffaffebbb92d7f6a9000 */
++ 5.69868489273961111703398456218119973E-36L, /* 3f89e4ca5df09ef4a4386dd5b3bf0331 */
++ -3.05175781250092882818419203884960853E-05L, /* bff0000000000055ab55de88fac1d000 */
++ 9.03341100018476837609128961872915953E-36L, /* 3f8a803d229fa3a0e834a63abb06662b */
++#define T_EXPL_ARG2 (2*T_EXPL_ARG1 + 2 + 2*65)
++ 0.00000000000000000000000000000000000E+00L, /* 00000000000000000000000000000000 */
++ 0.00000000000000000000000000000000000E+00L, /* 00000000000000000000000000000000 */
++ 3.05175781249814607084128277672749162E-05L, /* 3feffffffffffeaa02abb9102f499000 */
++ 1.00271855391179733380665816525889949E-36L, /* 3f8755351afa042ac3f58114824d4c10 */
++ 6.10351562500179243748093427073421439E-05L, /* 3ff1000000000052a95de07a4c26d000 */
++ 1.67231624299180373502350811501181670E-36L, /* 3f881c87a53691cae9d77f4e40d66616 */
++ 9.15527343749970728685313252158399200E-05L, /* 3ff17ffffffffff28040cc2acde28000 */
++ 2.43665747834893104318707597514407880E-36L, /* 3f889e9366c7c6c6a2ecb78dc9b0509e */
++ 1.22070312500027751961838150070880064E-04L, /* 3ff200000000003ffddde6c153b53000 */
++ -1.73322146370624186623546452226755405E-35L, /* bf8b709d8d658ed5dbbe943de56ee84e */
++ 1.52587890624995916105682628143179430E-04L, /* 3ff23ffffffffff6954b56e285d23000 */
++ 1.23580432650945898349135528000443828E-35L, /* 3f8b06d396601dde16de7d7bc27346e6 */
++ 1.83105468750008670314358488289621794E-04L, /* 3ff2800000000013fe0cdc8c823b7000 */
++ 4.30446229148833293310207915930740796E-35L, /* 3f8cc9ba9bfe554a4f7f2fece291eb23 */
++ 2.13623046875005741337455947623248132E-04L, /* 3ff2c0000000000d3d1662de21a3f000 */
++ -3.96110759869520786681660669615255057E-35L, /* bf8ca5379b04ff4a31aab0ceacc917e6 */
++ 2.44140624999981493573336463433440506E-04L, /* 3ff2ffffffffffd553bbdf48e0534000 */
++ -1.39617373942387888957350179316792928E-35L, /* bf8b28eeedc286015802b63f96b8c5cd */
++ 2.74658203124984920706309918754626834E-04L, /* 3ff31fffffffffee9d60c8439ec1d000 */
++ -3.16168080483901830349738314447356223E-36L, /* bf890cf74f81c77a611abc1243812444 */
++ 3.05175781250008648918265055410966055E-04L, /* 3ff3400000000009f8b5c9a346636000 */
++ 8.54421306185008998867856704677221443E-35L, /* 3f8dc649cd40922fc08adc6b6b20ead0 */
++ 3.35693359374988945462612499316774515E-04L, /* 3ff35ffffffffff34146c540f15b2000 */
++ 7.96443137431639500475160850431097078E-35L, /* 3f8da77638ed3148fc4d99d1c9e13446 */
++ 3.66210937500027690542093987739604535E-04L, /* 3ff380000000001fecce34bea89c4000 */
++ 2.14507323877752361258862577769090367E-35L, /* 3f8bc834e554d38894cf91957b0253d3 */
++ 3.96728515625003928083564943615052121E-04L, /* 3ff3a00000000004875d9a4acf6ab000 */
++ 4.88358523466632050664019922448605508E-35L, /* 3f8d03a7eaeef1a9f78c71a12c44dd28 */
++ 4.27246093750017799227172345607351585E-04L, /* 3ff3c00000000014856794c3ee850000 */
++ 6.66520494592631402182216588784828935E-35L, /* 3f8d6262118fcdb59b8f16108f5f1a6c */
++ 4.57763671875002108342364320152138181E-04L, /* 3ff3e000000000026e45d855410b9000 */
++ 7.21799615960261390920033272189522298E-35L, /* 3f8d7fc645cff8879462296af975c9fd */
++ 4.88281249999999768797631616370963356E-04L, /* 3ff3ffffffffffffbbc2d7cc004df000 */
++ -5.30564629906905979452258114088325361E-35L, /* bf8d1a18b71929a30d67a217a27ae851 */
++ 5.18798828124997339054881383202487041E-04L, /* 3ff40ffffffffffe775055eea5851000 */
++ -4.03682911253647925867848180522846377E-35L, /* bf8cad44f0f3e5199d8a589d9332acad */
++ 5.49316406249980511907933706754958501E-04L, /* 3ff41ffffffffff4c410b29bb62fb000 */
++ -2.08166843948323917121806956728438051E-35L, /* bf8bbab8cf691403249fe5b699e25143 */
++ 5.79833984374989593561576568548497165E-04L, /* 3ff42ffffffffffa0047df328d817000 */
++ -1.72745033420153042445343706432627539E-34L, /* bf8ecb3c2d7d3a9e6e960576be901fdf */
++ 6.10351562500008540711511259540838154E-04L, /* 3ff4400000000004ec62f54f8c271000 */
++ 7.41889382604319545724663095428976499E-35L, /* 3f8d8a74c002c81a47c93b8e05d15f8e */
++ 6.40869140625020444702875407535884986E-04L, /* 3ff450000000000bc91b09718515d000 */
++ -4.47321009727305792048065440180490107E-35L, /* bf8cdbac5c8fe70822081d8993eb5cb6 */
++ 6.71386718750007531635964622352684074E-04L, /* 3ff460000000000457792973db05c000 */
++ 5.13698959677949336513874456684462092E-35L, /* 3f8d112114436949c5ef38d8049004ab */
++ 7.01904296875006634673332887754430334E-04L, /* 3ff4700000000003d31adf2cb8b1d000 */
++ -8.25665755717729437292989870760751482E-35L, /* bf8db6ffcc8ef71f8e648e3a8b160f5a */
++ 7.32421874999998244664170215504673504E-04L, /* 3ff47ffffffffffefcf5498bd5c8a000 */
++ -5.64005234937832153139057628112753364E-35L, /* bf8d2be06a1dfe90e7bf90fba7c12a98 */
++ 7.62939453125017456345986752604096408E-04L, /* 3ff490000000000a101a1b093d4a8000 */
++ -1.11084094120417622468550608896588329E-34L, /* bf8e274feabd2d94f6694507a46accb1 */
++ 7.93457031249987558617598988993908016E-04L, /* 3ff49ffffffffff8d3f9dcab74bbf000 */
++ -1.22966480225449015129079129940978828E-34L, /* bf8e46e6a65eef8fa9e42eddf3da305e */
++ 8.23974609374997378723747633335135819E-04L, /* 3ff4affffffffffe7d2afbaa55b26000 */
++ -1.62270010016794279091906973366704963E-34L, /* bf8eaf633f057ebdb664a34566401c4e */
++ 8.54492187500023938282350821569920958E-04L, /* 3ff4c0000000000dccaabce399e59000 */
++ -1.39076361712838158775374263169606160E-34L, /* bf8e71ba779364b3bbdba7841f2c4ca1 */
++ 8.85009765624987932362186815286691297E-04L, /* 3ff4cffffffffff90b218886edc2a000 */
++ 4.07328275060905585228261577392403980E-35L, /* 3f8cb1254dbb6ea4b8cfa5ed4cf28d24 */
++ 9.15527343749975579461305518559161974E-04L, /* 3ff4dffffffffff1ec2a21f25df33000 */
++ 1.16855112459192484947855553716334015E-35L, /* 3f8af10bf319e9f5270cf249eeffbe5c */
++ 9.46044921875016761584725882821122521E-04L, /* 3ff4f00000000009a992c46c16d71000 */
++ 9.51660680007524262741115611071680436E-35L, /* 3f8df9fd56e81f8edf133843910ee831 */
++ 9.76562499999974118878133088548272636E-04L, /* 3ff4fffffffffff1149edc46a6df6000 */
++ -5.65271128977550656964071208289181661E-36L, /* bf89e0e12689dd721aa2314c81eb6429 */
++ 1.00708007812498671732140389760347830E-03L, /* 3ff507fffffffffc2be94b90ed091000 */
++ -1.43355074891483635310132767255371379E-34L, /* bf8e7d1a688c247b16022daab1316d55 */
++ 1.03759765625002637786192745235343007E-03L, /* 3ff51000000000079a57b966bc158000 */
++ 2.95905815240957629366749917020106928E-34L, /* 3f8f895387fc73bb38f8a1b254c01a60 */
++ 1.06811523437500860568717813047520763E-03L, /* 3ff51800000000027afcd5b35f5e6000 */
++ -5.98328495358586628195372356742878314E-35L, /* bf8d3e204130013bf6328f1b70ff8c76 */
++ 1.09863281250001439958487251556220070E-03L, /* 3ff5200000000004268077c6c66bd000 */
++ 2.41371837889426603334113000868144760E-34L, /* 3f8f40d6948edf864054ccf151f9815e */
++ 1.12915039062501298413451613770002366E-03L, /* 3ff5280000000003be0f5dd8fe81b000 */
++ -1.28815268997394164973472617519705703E-34L, /* bf8e567321172ea089dce4bc8354ecb7 */
++ 1.15966796874997272036339054191407232E-03L, /* 3ff52ffffffffff8231e3bcfff1e8000 */
++ 1.02996064554316248496839462594377804E-34L, /* 3f8e11cf7d402789244f68e2d4f985b1 */
++ 1.19018554687502744121802585360546796E-03L, /* 3ff5380000000007e8cdf3f8f6c20000 */
++ -1.43453217726255628994625761307322163E-34L, /* bf8e7d5d3370d85a374f5f4802fc517a */
++ 1.22070312499997743541996266398850614E-03L, /* 3ff53ffffffffff97f0722561f454000 */
++ -1.41086259180534339713692694428211646E-34L, /* bf8e77125519ff76244dfec5fbd58402 */
++ 1.25122070312501024092560690174507039E-03L, /* 3ff5480000000002f3a59d8820691000 */
++ 3.84102646020099293168698506729765213E-34L, /* 3f8ffe8f5b86f9c3569c8f26e19b1f50 */
++ 1.28173828124997986521442660131425390E-03L, /* 3ff54ffffffffffa3250a764439d9000 */
++ 1.44644589735033114377952806106652650E-34L, /* 3f8e808801b80dcf38323cdbfdca2549 */
++ 1.31225585937501665804856968749058137E-03L, /* 3ff5580000000004cd25a414c6d62000 */
++ 1.67474574742200577294563576414361377E-34L, /* 3f8ebd394a151dbda4f81d5d83c0f1e9 */
++ 1.34277343749997290265837386401818888E-03L, /* 3ff55ffffffffff83091b042cfd59000 */
++ -1.55650565030381326742591837551559103E-34L, /* bf8e9dca490d7fecfadba9625ffb91c5 */
++ 1.37329101562497720784949380297774268E-03L, /* 3ff567fffffffff96e3c7312f5ccf000 */
++ 1.65279335325630026116581677369221748E-34L, /* 3f8eb763496f5bd7404f2298b402074f */
++ 1.40380859374999099958354100336136647E-03L, /* 3ff56ffffffffffd67e2f09f2a381000 */
++ 1.89919944388961890195706641264717076E-34L, /* 3f8ef8e4d0ffdfeba982aa8829501389 */
++ 1.43432617187497484122173130998160625E-03L, /* 3ff577fffffffff8bf9c1d71af8a8000 */
++ 2.57638517142061429772064578590009568E-34L, /* 3f8f5675d82c1cc4ada70fd3a957b89a */
++ 1.46484374999999929342158925502052945E-03L, /* 3ff57fffffffffffcbdd1c7671b46000 */
++ 1.76487201934184070490166772482073801E-34L, /* 3f8ed52ef732458f6e4c5c07504f33cc */
++ 1.49536132812502318451070466256902933E-03L, /* 3ff5880000000006aeb7066c8ad43000 */
++ 2.38068367275295804321313550609246656E-34L, /* 3f8f3c7277ae6fc390ace5e06c0b025b */
++ 1.52587890625000448053340248672949543E-03L, /* 3ff59000000000014a9ae2104b3bc000 */
++ 1.01174455568392813258454590274740959E-34L, /* 3f8e0cf7c434762991bb38e12acee215 */
++ 1.55639648437501113499837053523090913E-03L, /* 3ff5980000000003359e2c204355e000 */
++ -2.82398418808099749023517211651363693E-35L, /* bf8c2c4c2971d88caa95e15fb1ccb1a1 */
++ 1.58691406249999937955142588308171026E-03L, /* 3ff59fffffffffffd2380ecbc87c2000 */
++ -1.27361695572422741562701199136538047E-34L, /* bf8e5295e0e206dfb0f0266c07225448 */
++ 1.61743164062498000531048954475329309E-03L, /* 3ff5a7fffffffffa3ca6fe61ed94c000 */
++ -1.22606548862580061633942923016222044E-34L, /* bf8e45f1b17bb61039d21a351bb207b8 */
++ 1.64794921875001835451453858682255576E-03L, /* 3ff5b000000000054a52fa20f6565000 */
++ 1.39132339594152335892305491425264583E-34L, /* 3f8e71e0904c5449b414ee49b191cef2 */
++ 1.67846679687501263995029340691547953E-03L, /* 3ff5b80000000003a4a9e912c910b000 */
++ 6.67245854693585315412242764786197029E-35L, /* 3f8d62c4ccac1e7511a617d469468ccd */
++ 1.70898437500002646861403514115369655E-03L, /* 3ff5c00000000007a109fbaa7e015000 */
++ 6.87367172354719289559624829652240928E-36L, /* 3f8a245fa835eceb42bae8128d9336db */
++ 1.73950195312501174308226096992992128E-03L, /* 3ff5c80000000003627c8d637a005000 */
++ -2.20824271875474985927385878948759352E-34L, /* bf8f25869b1cbefb25e735992f232f57 */
++ 1.77001953124997491747605207736194513E-03L, /* 3ff5cffffffffff8c53c84b6883b8000 */
++ 3.43123048533596296514343180408963705E-34L, /* 3f8fc816b91d173ddadbbf09b1287906 */
++ 1.80053710937497698911127570705069398E-03L, /* 3ff5d7fffffffff95e1899f4a8430000 */
++ 3.99231237340890073475077494556136100E-35L, /* 3f8ca889148f62fa854da5674df41279 */
++ 1.83105468750002267094899598630423914E-03L, /* 3ff5e0000000000688d21e62ba674000 */
++ -3.22274595655810623999007524769365273E-34L, /* bf8fac605cb9ae01eb719675ced25560 */
++ 1.86157226562500499224728040579690330E-03L, /* 3ff5e80000000001705ce28a6d89e000 */
++ 3.07094985075881613489605622068441083E-34L, /* 3f8f98330225ec7e2c8f3c0d1c432b91 */
++ 1.89208984374998234666824993196980949E-03L, /* 3ff5effffffffffae969fdc7cd8cf000 */
++ -3.06287628722973914692165056776495733E-34L, /* bf8f9720477d9cfa10e464df7f91020c */
++ 1.92260742187501225343755557292811682E-03L, /* 3ff5f800000000038824e428ed49a000 */
++ 6.30049124729794620592961282769623368E-35L, /* 3f8d4efdd7cd4336d88a6aa49e1e96bc */
++ 1.95312499999998514894032051116231258E-03L, /* 3ff5fffffffffffbb82f6a04f1ae0000 */
++ -6.14610057507500948543216998736262902E-35L, /* bf8d46c862d39255370e7974d48daa7e */
++ 1.98364257812501222021119324146882732E-03L, /* 3ff6040000000001c2d8a1aa5188d000 */
++ 3.71942298418113774118754986159801984E-34L, /* 3f8fee6567d9940495519ffe62cbc9a4 */
++
++ 7.06341639425619532977052017486130353E-01L, /* 3ffe69a59c8245a9ac00000000000000 */
++ 7.09106182437398424589503065362805501E-01L, /* 3ffe6b0ff72deb89d000000000000000 */
++ 7.11881545564596485142772053222870454E-01L, /* 3ffe6c7bbce9a6d93000000000000000 */
++ 7.14667771155948150507697391731198877E-01L, /* 3ffe6de8ef213d71e000000000000000 */
++ 7.17464901725936049503573599395167548E-01L, /* 3ffe6f578f41e1a9e400000000000000 */
++ 7.20272979955439790478166628417966422E-01L, /* 3ffe70c79eba33c06c00000000000000 */
++ 7.23092048692387218133958981525211129E-01L, /* 3ffe72391efa434c7400000000000000 */
++ 7.25922150952408251622927082280511968E-01L, /* 3ffe73ac117390acd800000000000000 */
++ 7.28763329919491220643124052003258839E-01L, /* 3ffe752077990e79d000000000000000 */
++ 7.31615628946641782803794740175362676E-01L, /* 3ffe769652df22f7e000000000000000 */
++ 7.34479091556544505525749855223693885E-01L, /* 3ffe780da4bba98c4800000000000000 */
++ 7.37353761442226890432394270646909717E-01L, /* 3ffe79866ea5f432d400000000000000 */
++ 7.40239682467726090031590047146892175E-01L, /* 3ffe7b00b216ccf53000000000000000 */
++ 7.43136898668758316688354170764796436E-01L, /* 3ffe7c7c70887763c000000000000000 */
++ 7.46045454253390638577059235103661194E-01L, /* 3ffe7df9ab76b20fd000000000000000 */
++ 7.48965393602715662213498148958024103E-01L, /* 3ffe7f78645eb8076400000000000000 */
++ 7.51896761271528629722027403659012634E-01L, /* 3ffe80f89cbf42526400000000000000 */
++ 7.54839601989007347171423134568613023E-01L, /* 3ffe827a561889716000000000000000 */
++ 7.57793960659394638668118204805068672E-01L, /* 3ffe83fd91ec46ddc000000000000000 */
++ 7.60759882362683631518152083117456641E-01L, /* 3ffe858251bdb68b8c00000000000000 */
++ 7.63737412355305483879774897104653064E-01L, /* 3ffe87089711986c9400000000000000 */
++ 7.66726596070820082262642358728044201E-01L, /* 3ffe8890636e31f54400000000000000 */
++ 7.69727479120609181517664865168626420E-01L, /* 3ffe8a19b85b4fa2d800000000000000 */
++ 7.72740107294572486917871856348938309E-01L, /* 3ffe8ba4976246833800000000000000 */
++ 7.75764526561826289752232810315035749E-01L, /* 3ffe8d31020df5be4400000000000000 */
++ 7.78800783071404878477039801509818062E-01L, /* 3ffe8ebef9eac820b000000000000000 */
++ 7.81848923152964780936002853195532225E-01L, /* 3ffe904e8086b5a87800000000000000 */
++ 7.84908993317491698871180005880887620E-01L, /* 3ffe91df97714512d800000000000000 */
++ 7.87981040258010162480317717381694820E-01L, /* 3ffe9372403b8d6bcc00000000000000 */
++ 7.91065110850296016042904057030682452E-01L, /* 3ffe95067c78379f2800000000000000 */
++ 7.94161252153591734614934694036492147E-01L, /* 3ffe969c4dbb800b4800000000000000 */
++ 7.97269511411324433014513601847284008E-01L, /* 3ffe9833b59b38154400000000000000 */
++ 8.00389936051826789142893403550260700E-01L, /* 3ffe99ccb5aec7bec800000000000000 */
++ 8.03522573689060742863077280162542593E-01L, /* 3ffe9b674f8f2f3d7c00000000000000 */
++ 8.06667472123343942680406826184480451E-01L, /* 3ffe9d0384d70893f800000000000000 */
++ 8.09824679342079301047618855591281317E-01L, /* 3ffe9ea15722892c7800000000000000 */
++ 8.12994243520486992160556383169023320E-01L, /* 3ffea040c80f8374f000000000000000 */
++ 8.16176213022339780422953481320291758E-01L, /* 3ffea1e1d93d687d0000000000000000 */
++ 8.19370636400700819157449927843117621E-01L, /* 3ffea3848c4d49954c00000000000000 */
++ 8.22577562398664585696650419777142815E-01L, /* 3ffea528e2e1d9f09800000000000000 */
++ 8.25797039950100647542896581398963463E-01L, /* 3ffea6cede9f70467c00000000000000 */
++ 8.29029118180400342863478613253391813E-01L, /* 3ffea876812c0877bc00000000000000 */
++ 8.32273846407226292054559735333896242E-01L, /* 3ffeaa1fcc2f45343800000000000000 */
++ 8.35531274141265073440720811959181447E-01L, /* 3ffeabcac15271a2a400000000000000 */
++ 8.38801451086982535754188461396552157E-01L, /* 3ffead7762408309bc00000000000000 */
++ 8.42084427143382358016410194068157580E-01L, /* 3ffeaf25b0a61a7b4c00000000000000 */
++ 8.45380252404767357221615498019673396E-01L, /* 3ffeb0d5ae318680c400000000000000 */
++ 8.48688977161503960155997106085123960E-01L, /* 3ffeb2875c92c4c99400000000000000 */
++ 8.52010651900789478530029441571969073E-01L, /* 3ffeb43abd7b83db1c00000000000000 */
++ 8.55345327307422548246407245642330963E-01L, /* 3ffeb5efd29f24c26400000000000000 */
++ 8.58693054264576483003423845730139874E-01L, /* 3ffeb7a69db2bcc77800000000000000 */
++ 8.62053883854575708767242758767679334E-01L, /* 3ffeb95f206d17228000000000000000 */
++ 8.65427867359675251357487013592617586E-01L, /* 3ffebb195c86b6b29000000000000000 */
++ 8.68815056262843166123843730019871145E-01L, /* 3ffebcd553b9d7b62000000000000000 */
++ 8.72215502248546159513864495238522068E-01L, /* 3ffebe9307c271855000000000000000 */
++ 8.75629257203538208242932228131394368E-01L, /* 3ffec0527a5e384ddc00000000000000 */
++ 8.79056373217652342599848225290770642E-01L, /* 3ffec213ad4c9ed0d800000000000000 */
++ 8.82496902584595399599010079327854328E-01L, /* 3ffec3d6a24ed8221800000000000000 */
++ 8.85950897802745995779361010136199184E-01L, /* 3ffec59b5b27d9696800000000000000 */
++ 8.89418411575955636383383762222365476E-01L, /* 3ffec761d99c5ba58800000000000000 */
++ 8.92899496814352794382685374330321793E-01L, /* 3ffec92a1f72dd70d400000000000000 */
++ 8.96394206635150403439382671422208659E-01L, /* 3ffecaf42e73a4c7d800000000000000 */
++ 8.99902594363456265202927397695020773E-01L, /* 3ffeccc00868c0d18800000000000000 */
++ 9.03424713533086704009278378180169966E-01L, /* 3ffece8daf1e0ba94c00000000000000 */
++ 9.06960617887383580004723171441582963E-01L, /* 3ffed05d24612c2af000000000000000 */
++ 9.10510361380034133338412516422977205E-01L, /* 3ffed22e6a0197c02c00000000000000 */
++ 9.14073998175894436579724811053893063E-01L, /* 3ffed40181d094303400000000000000 */
++ 9.17651582651815816982221463149471674E-01L, /* 3ffed5d66da13970f400000000000000 */
++ 9.21243169397474526149949269893113524E-01L, /* 3ffed7ad2f48737a2000000000000000 */
++ 9.24848813216204823639543519675498828E-01L, /* 3ffed985c89d041a3000000000000000 */
++ 9.28468569125835141431224428743007593E-01L, /* 3ffedb603b7784cd1800000000000000 */
++ 9.32102492359527579068867453315760940E-01L, /* 3ffedd3c89b26894e000000000000000 */
++ 9.35750638366620729469147477175283711E-01L, /* 3ffedf1ab529fdd41c00000000000000 */
++ 9.39413062813475779888605643463961314E-01L, /* 3ffee0fabfbc702a3c00000000000000 */
++ 9.43089821584325888048638830696290825E-01L, /* 3ffee2dcab49ca51b400000000000000 */
++ 9.46780970782128888929563004239753354E-01L, /* 3ffee4c079b3f8000400000000000000 */
++ 9.50486566729423443256052905780961737E-01L, /* 3ffee6a62cdec7c7b000000000000000 */
++ 9.54206665969188322362626308859034907E-01L, /* 3ffee88dc6afecfbfc00000000000000 */
++ 9.57941325265705301283958306157728657E-01L, /* 3ffeea77490f0196b000000000000000 */
++ 9.61690601605425299247542625380447134E-01L, /* 3ffeec62b5e5881fb000000000000000 */
++ 9.65454552197837823079851204965962097E-01L, /* 3ffeee500f1eed967000000000000000 */
++ 9.69233234476344074348475032820715569E-01L, /* 3ffef03f56a88b5d7800000000000000 */
++ 9.73026706099133165128733935489435680E-01L, /* 3ffef2308e71a927a800000000000000 */
++ 9.76835024950062025261843245971249416E-01L, /* 3ffef423b86b7ee79000000000000000 */
++ 9.80658249139538557015427500118676107E-01L, /* 3ffef618d68936c09c00000000000000 */
++ 9.84496437005408397968864164795377292E-01L, /* 3ffef80feabfeefa4800000000000000 */
++ 9.88349647113845042323276857132441364E-01L, /* 3ffefa08f706bbf53800000000000000 */
++ 9.92217938260243514925207364285597578E-01L, /* 3ffefc03fd56aa225000000000000000 */
++ 9.96101369470117486981664001177705359E-01L, /* 3ffefe00ffaabffbbc00000000000000 */
++#define T_EXPL_RES1 (T_EXPL_ARG2 + 2 + 2*65 + 89)
++ 1.00000000000000000000000000000000000E+00L, /* 3fff0000000000000000000000000000 */
++ 1.00391388933834757590801700644078664E+00L, /* 3fff0100802ab5577800000000000000 */
++ 1.00784309720644799091004983893071767E+00L, /* 3fff0202015600445c00000000000000 */
++ 1.01178768355933151879000320150225889E+00L, /* 3fff0304848362076c00000000000000 */
++ 1.01574770858668572692806719715008512E+00L, /* 3fff04080ab55de39000000000000000 */
++ 1.01972323271377413034244341361045372E+00L, /* 3fff050c94ef7a206c00000000000000 */
++ 1.02371431660235789884438872832106426E+00L, /* 3fff06122436410dd000000000000000 */
++ 1.02772102115162167201845022646011785E+00L, /* 3fff0718b98f42085000000000000000 */
++ 1.03174340749910264936062276319717057E+00L, /* 3fff08205601127ec800000000000000 */
++ 1.03578153702162378824169763902318664E+00L, /* 3fff0928fa934ef90800000000000000 */
++ 1.03983547133622999947277776300325058E+00L, /* 3fff0a32a84e9c1f5800000000000000 */
++ 1.04390527230112850620713516036630608E+00L, /* 3fff0b3d603ca7c32800000000000000 */
++ 1.04799100201663270004459604933799710E+00L, /* 3fff0c49236829e8bc00000000000000 */
++ 1.05209272282610977189420964350574650E+00L, /* 3fff0d55f2dce5d1e800000000000000 */
++ 1.05621049731693195106174698594259098E+00L, /* 3fff0e63cfa7ab09d000000000000000 */
++ 1.06034438832143151909548350886325352E+00L, /* 3fff0f72bad65671b800000000000000 */
++ 1.06449445891785943185681162503897212E+00L, /* 3fff1082b577d34ed800000000000000 */
++ 1.06866077243134810492719566354935523E+00L, /* 3fff1193c09c1c595c00000000000000 */
++ 1.07284339243487741866189821848820429E+00L, /* 3fff12a5dd543ccc4c00000000000000 */
++ 1.07704238275024494209120007326419000E+00L, /* 3fff13b90cb25176a400000000000000 */
++ 1.08125780744903959851299646288680378E+00L, /* 3fff14cd4fc989cd6400000000000000 */
++ 1.08548973085361949442173568058933597E+00L, /* 3fff15e2a7ae28fecc00000000000000 */
++ 1.08973821753809324563988525369495619E+00L, /* 3fff16f9157587069400000000000000 */
++ 1.09400333232930546678574046381982043E+00L, /* 3fff18109a3611c35000000000000000 */
++ 1.09828514030782586896606289883493446E+00L, /* 3fff192937074e0cd800000000000000 */
++ 1.10258370680894224324930519287590869E+00L, /* 3fff1a42ed01d8cbc800000000000000 */
++ 1.10689909742365749645287564817408565E+00L, /* 3fff1b5dbd3f68122400000000000000 */
++ 1.11123137799969046168868658241990488E+00L, /* 3fff1c79a8dacc350c00000000000000 */
++ 1.11558061464248076122274255794764031E+00L, /* 3fff1d96b0eff0e79400000000000000 */
++ 1.11994687371619722204840741142106708E+00L, /* 3fff1eb4d69bde569c00000000000000 */
++ 1.12433022184475073235176978414529003E+00L, /* 3fff1fd41afcba45e800000000000000 */
++ 1.12873072591281087273529237791080959E+00L, /* 3fff20f47f31c92e4800000000000000 */
++ 1.13314845306682632219974493636982515E+00L, /* 3fff2216045b6f5cd000000000000000 */
++ 1.13758347071604959399593326452304609E+00L, /* 3fff2338ab9b32134800000000000000 */
++ 1.14203584653356560174586320499656722E+00L, /* 3fff245c7613b8a9b000000000000000 */
++ 1.14650564845732405583333957110880874E+00L, /* 3fff258164e8cdb0d800000000000000 */
++ 1.15099294469117646722011727433709893E+00L, /* 3fff26a7793f60164400000000000000 */
++ 1.15549780370591653744227755851170514E+00L, /* 3fff27ceb43d84490400000000000000 */
++ 1.16002029424032515603215642840950750E+00L, /* 3fff28f7170a755fd800000000000000 */
++ 1.16456048530221917269855680387991015E+00L, /* 3fff2a20a2ce96406400000000000000 */
++ 1.16911844616950438835445424956560601E+00L, /* 3fff2b4b58b372c79400000000000000 */
++ 1.17369424639123270948104504896036815E+00L, /* 3fff2c7739e3c0f32c00000000000000 */
++ 1.17828795578866324378353169777255971E+00L, /* 3fff2da4478b620c7400000000000000 */
++ 1.18289964445632783673900689791480545E+00L, /* 3fff2ed282d763d42400000000000000 */
++ 1.18752938276310060494722620205720887E+00L, /* 3fff3001ecf601af7000000000000000 */
++ 1.19217724135327157730657177125976887E+00L, /* 3fff31328716a5d63c00000000000000 */
++ 1.19684329114762477708211463323095813E+00L, /* 3fff32645269ea829000000000000000 */
++ 1.20152760334452030077656559114984702E+00L, /* 3fff339750219b212c00000000000000 */
++ 1.20623024942098072687102217059873510E+00L, /* 3fff34cb8170b5835400000000000000 */
++ 1.21095130113378179892436037334846333E+00L, /* 3fff3600e78b6b11d000000000000000 */
++ 1.21569083052054743854242246925423387E+00L, /* 3fff373783a722012400000000000000 */
++ 1.22044890990084875515009343871497549E+00L, /* 3fff386f56fa7686e800000000000000 */
++ 1.22522561187730755216662714701669756E+00L, /* 3fff39a862bd3c106400000000000000 */
++ 1.23002100933670455162882717559114099E+00L, /* 3fff3ae2a8287e7a8000000000000000 */
++ 1.23483517545109100499445276000187732E+00L, /* 3fff3c1e2876834aa800000000000000 */
++ 1.23966818367890557750499169742397498E+00L, /* 3fff3d5ae4e2cae92c00000000000000 */
++ 1.24452010776609517384017067342938390E+00L, /* 3fff3e98deaa11dcbc00000000000000 */
++ 1.24939102174724003813111039562500082E+00L, /* 3fff3fd8170a52071800000000000000 */
++ 1.25428099994668373895478907797951251E+00L, /* 3fff41188f42c3e32000000000000000 */
++ 1.25919011697966698459794088194030337E+00L, /* 3fff425a4893dfc3f800000000000000 */
++ 1.26411844775346637881341393949696794E+00L, /* 3fff439d443f5f159000000000000000 */
++ 1.26906606746853711786826579555054195E+00L, /* 3fff44e183883d9e4800000000000000 */
++ 1.27403305161966090564007458851847332E+00L, /* 3fff462707b2bac20c00000000000000 */
++ 1.27901947599709753244923149395617656E+00L, /* 3fff476dd2045ac67800000000000000 */
++ 1.28402541668774150540599521264084615E+00L, /* 3fff48b5e3c3e8186800000000000000 */
++ 1.28905095007628295311619126550795045E+00L, /* 3fff49ff3e397492bc00000000000000 */
++ 1.29409615284637330434591717676084954E+00L, /* 3fff4b49e2ae5ac67400000000000000 */
++ 1.29916110198179535206719492634874769E+00L, /* 3fff4c95d26d3f440800000000000000 */
++ 1.30424587476763775839572190307080746E+00L, /* 3fff4de30ec211e60000000000000000 */
++ 1.30935054879147461104338390214252286E+00L, /* 3fff4f3198fa0f1cf800000000000000 */
++ 1.31447520194454914310711046709911898E+00L, /* 3fff50817263c13cd000000000000000 */
++ 1.31961991242296217130558488861424848E+00L, /* 3fff51d29c4f01cb3000000000000000 */
++ 1.32478475872886558573071624778094701E+00L, /* 3fff5325180cfacf7800000000000000 */
++ 1.32996981967165983640200010995613411E+00L, /* 3fff5478e6f02823d000000000000000 */
++ 1.33517517436919680440254865061433520E+00L, /* 3fff55ce0a4c58c7bc00000000000000 */
++ 1.34040090224898678084031189428060316E+00L, /* 3fff57248376b033d800000000000000 */
++ 1.34564708304941055283521222918352578E+00L, /* 3fff587c53c5a7af0400000000000000 */
++ 1.35091379682093615244298234756570309E+00L, /* 3fff59d57c910fa4e000000000000000 */
++ 1.35620112392734021300455538039386738E+00L, /* 3fff5b2fff3210fd9400000000000000 */
++ 1.36150914504693443252136830778908916E+00L, /* 3fff5c8bdd032e770800000000000000 */
++ 1.36683794117379636690046140756749082E+00L, /* 3fff5de9176045ff5400000000000000 */
++ 1.37218759361900544124779344201670028E+00L, /* 3fff5f47afa69210a800000000000000 */
++ 1.37755818401188367960941150158760138E+00L, /* 3fff60a7a734ab0e8800000000000000 */
++ 1.38294979430124120867162673675920814E+00L, /* 3fff6208ff6a88a46000000000000000 */
++ 1.38836250675662681297595213436579797E+00L, /* 3fff636bb9a983258400000000000000 */
++ 1.39379640396958309755959248832368758E+00L, /* 3fff64cfd75454ee7c00000000000000 */
++ 1.39925156885490681313299887733592186E+00L, /* 3fff663559cf1bc7c400000000000000 */
++ 1.40472808465191417726103395580139477E+00L, /* 3fff679c427f5a49f400000000000000 */
++ 1.41022603492571069194738697660795879E+00L, /* 3fff690492cbf9432c00000000000000 */
++ 1.41574550356846662335641440222389065E+00L, /* 3fff6a6e4c1d491e1800000000000000 */
++
++ 9.98018323540573404351050612604012713E-01L, /* 3ffefefc41f8d4bdb000000000000000 */
++ 9.98048781107475468932221929208026268E-01L, /* 3ffeff003ff556aa8800000000000000 */
++ 9.98079239603882895082165305211674422E-01L, /* 3ffeff043df9d4986000000000000000 */
++ 9.98109699029824021243584297735651489E-01L, /* 3ffeff083c064e972c00000000000000 */
++ 9.98140159385327269125909310787392315E-01L, /* 3ffeff0c3a1ac4b6ec00000000000000 */
++ 9.98170620670420977171843901487591211E-01L, /* 3ffeff10383737079400000000000000 */
++ 9.98201082885133511579667242585856002E-01L, /* 3ffeff14365ba5991c00000000000000 */
++ 9.98231546029493238547658506831794512E-01L, /* 3ffeff183488107b7c00000000000000 */
++ 9.98262010103528552029672482603928074E-01L, /* 3ffeff1c32bc77beb000000000000000 */
++ 9.98292475107267818223988342651864514E-01L, /* 3ffeff2030f8db72b000000000000000 */
++ 9.98322941040739375573309644096298143E-01L, /* 3ffeff242f3d3ba77000000000000000 */
++ 9.98353407903971645787066790944663808E-01L, /* 3ffeff282d89986cf000000000000000 */
++ 9.98383875696992967307963340317655820E-01L, /* 3ffeff2c2bddf1d32400000000000000 */
++ 9.98414344419831761845429696222709026E-01L, /* 3ffeff302a3a47ea0c00000000000000 */
++ 9.98444814072516340086593800151604228E-01L, /* 3ffeff34289e9ac19800000000000000 */
++ 9.98475284655075123740886056111776270E-01L, /* 3ffeff38270aea69c800000000000000 */
++ 9.98505756167536479006585636852832977E-01L, /* 3ffeff3c257f36f29400000000000000 */
++ 9.98536228609928799837547330753295682E-01L, /* 3ffeff4023fb806bf800000000000000 */
++ 9.98566701982280452432050310562772211E-01L, /* 3ffeff44227fc6e5ec00000000000000 */
++ 9.98597176284619802988373749030870385E-01L, /* 3ffeff48210c0a706800000000000000 */
++ 9.98627651516975245460372434536111541E-01L, /* 3ffeff4c1fa04b1b6800000000000000 */
++ 9.98658127679375173801901155457017012E-01L, /* 3ffeff501e3c88f6e800000000000000 */
++ 9.98688604771847954211239084543194622E-01L, /* 3ffeff541ce0c412e000000000000000 */
++ 9.98719082794421980642241010173165705E-01L, /* 3ffeff581b8cfc7f4c00000000000000 */
++ 9.98749561747125619293186105096538085E-01L, /* 3ffeff5c1a41324c2400000000000000 */
++ 9.98780041629987291873504773320746608E-01L, /* 3ffeff6018fd65896800000000000000 */
++ 9.98810522443035364581476187595399097E-01L, /* 3ffeff6417c196471000000000000000 */
++ 9.98841004186298203615379520670103375E-01L, /* 3ffeff68168dc4951400000000000000 */
++ 9.98871486859804230684645176552294288E-01L, /* 3ffeff6c1561f0837400000000000000 */
++ 9.98901970463581839743127943620493170E-01L, /* 3ffeff70143e1a222c00000000000000 */
++ 9.98932454997659369233531378995394334E-01L, /* 3ffeff74132241813000000000000000 */
++ 9.98962940462065268620861502313346136E-01L, /* 3ffeff78120e66b08400000000000000 */
++ 9.98993426856827904103397486323956400E-01L, /* 3ffeff7c110289c02000000000000000 */
++ 9.99023914181975669634994119405746460E-01L, /* 3ffeff800ffeaac00000000000000000 */
++ 9.99054402437536959169506189937237650E-01L, /* 3ffeff840f02c9c02000000000000000 */
++ 9.99084891623540138905212870668037795E-01L, /* 3ffeff880e0ee6d07800000000000000 */
++ 9.99115381740013658307120181234495249E-01L, /* 3ffeff8c0d2302010c00000000000000 */
++ 9.99145872786985911329082910015131347E-01L, /* 3ffeff900c3f1b61d800000000000000 */
++ 9.99176364764485236413804614130640402E-01L, /* 3ffeff940b633302d000000000000000 */
++ 9.99206857672540083026291313217370771E-01L, /* 3ffeff980a8f48f3f800000000000000 */
++ 9.99237351511178817364822180024930276E-01L, /* 3ffeff9c09c35d454800000000000000 */
++ 9.99267846280429861138827618560753763E-01L, /* 3ffeffa008ff7006c000000000000000 */
++ 9.99298341980321608302162417203362565E-01L, /* 3ffeffa4084381485c00000000000000 */
++ 9.99328838610882452808681364331278019E-01L, /* 3ffeffa8078f911a1800000000000000 */
++ 9.99359336172140816367814863951934967E-01L, /* 3ffeffac06e39f8bf400000000000000 */
++ 9.99389834664125092933417704443854745E-01L, /* 3ffeffb0063facadec00000000000000 */
++ 9.99420334086863676459344674185558688E-01L, /* 3ffeffb405a3b88ffc00000000000000 */
++ 9.99450834440384988655026177184481639E-01L, /* 3ffeffb8050fc3422400000000000000 */
++ 9.99481335724717395718741386190231424E-01L, /* 3ffeffbc0483ccd45c00000000000000 */
++ 9.99511837939889374871071936468069907E-01L, /* 3ffeffc003ffd556ac00000000000000 */
++ 9.99542341085929264554721385138691403E-01L, /* 3ffeffc40383dcd90800000000000000 */
++ 9.99572845162865514234695751838444266E-01L, /* 3ffeffc8030fe36b7400000000000000 */
++ 9.99603350170726517864849824945849832E-01L, /* 3ffeffcc02a3e91dec00000000000000 */
++ 9.99633856109540669399038392839429434E-01L, /* 3ffeffd0023fee006c00000000000000 */
++ 9.99664362979336418302267475155531429E-01L, /* 3ffeffd401e3f222f800000000000000 */
++ 9.99694870780142130772816244643763639E-01L, /* 3ffeffd8018ff5958800000000000000 */
++ 9.99725379511986284031266336569387931E-01L, /* 3ffeffdc0143f8682400000000000000 */
++ 9.99755889174897216520321308053098619E-01L, /* 3ffeffe000fffaaac000000000000000 */
++ 9.99786399768903377704987178731244057E-01L, /* 3ffeffe400c3fc6d6000000000000000 */
++ 9.99816911294033217050269968240172602E-01L, /* 3ffeffe8008ffdc00800000000000000 */
++ 9.99847423750315072998873233700578567E-01L, /* 3ffeffec0063feb2ac00000000000000 */
++ 9.99877937137777450526954226006637327E-01L, /* 3ffefff0003fff555800000000000000 */
++ 9.99908451456448688077216502279043198E-01L, /* 3ffefff40023ffb80000000000000000 */
++ 9.99938966706357262870241697783058044E-01L, /* 3ffefff8000fffeaac00000000000000 */
++ 9.99969482887531541104308985268289689E-01L, /* 3ffefffc0003fffd5400000000000000 */
++#define T_EXPL_RES2 (T_EXPL_RES1 + 1 + 89 + 65)
++ 1.00000000000000000000000000000000000E+00L, /* 3fff0000000000000000000000000000 */
++ 1.00003051804379100575559391472779680E+00L, /* 3fff0002000200015400000000000000 */
++ 1.00006103701893306334724798034585547E+00L, /* 3fff00040008000aac00000000000000 */
++ 1.00009155692545448346209013834595680E+00L, /* 3fff0006001200240000000000000000 */
++ 1.00012207776338379883185325525118969E+00L, /* 3fff0008002000555800000000000000 */
++ 1.00015259953274932014366527255333494E+00L, /* 3fff000a003200a6ac00000000000000 */
++ 1.00018312223357958012925905677548144E+00L, /* 3fff000c004801200400000000000000 */
++ 1.00021364586590294498691378066723701E+00L, /* 3fff000e006201c95c00000000000000 */
++ 1.00024417042974783642605984823603649E+00L, /* 3fff0010008002aab400000000000000 */
++ 1.00027469592514273166727889474714175E+00L, /* 3fff001200a203cc1000000000000000 */
++ 1.00030522235211605242000132420798764E+00L, /* 3fff001400c805357000000000000000 */
++ 1.00033574971069616488250630936818197E+00L, /* 3fff001600f206eed000000000000000 */
++ 1.00036627800091160178652671675081365E+00L, /* 3fff0018012009003800000000000000 */
++ 1.00039680722279067381919048784766346E+00L, /* 3fff001a01520b71a000000000000000 */
++ 1.00042733737636191371223048918182030E+00L, /* 3fff001c01880e4b1000000000000000 */
++ 1.00045786846165368766392589350289200E+00L, /* 3fff001e01c211948400000000000000 */
++ 1.00048840047869447289485833607614040E+00L, /* 3fff0020020015560000000000000000 */
++ 1.00051893342751269111445822090900037E+00L, /* 3fff0022024219978400000000000000 */
++ 1.00054946730813676403215595200890675E+00L, /* 3fff002402881e611000000000000000 */
++ 1.00058000212059516886853316464112140E+00L, /* 3fff002602d223baa800000000000000 */
++ 1.00061053786491632733302026281307917E+00L, /* 3fff0028032029ac4c00000000000000 */
++ 1.00064107454112866113504765053221490E+00L, /* 3fff002a0372303dfc00000000000000 */
++ 1.00067161214926059198404573180596344E+00L, /* 3fff002c03c83777b800000000000000 */
++ 1.00070215068934059710059614189958666E+00L, /* 3fff002e04223f618400000000000000 */
++ 1.00073269016139709819412928482051939E+00L, /* 3fff0030048048036000000000000000 */
++ 1.00076323056545857248522679583402351E+00L, /* 3fff003204e251655000000000000000 */
++ 1.00079377190155338617216784768970683E+00L, /* 3fff003405485b8f5000000000000000 */
++ 1.00082431416971007198668530691065826E+00L, /* 3fff003605b266896800000000000000 */
++ 1.00085485736995705163820957750431262E+00L, /* 3fff00380620725b9800000000000000 */
++ 1.00088540150232269132501983222027775E+00L, /* 3fff003a06927f0ddc00000000000000 */
++ 1.00091594656683552377884893758164253E+00L, /* 3fff003c07088ca83c00000000000000 */
++ 1.00094649256352402622027852885366883E+00L, /* 3fff003e07829b32bc00000000000000 */
++ 1.00097703949241650933643654752813745E+00L, /* 3fff00400800aab55400000000000000 */
++ 1.00100758735354156137020709138596430E+00L, /* 3fff00420882bb381000000000000000 */
++ 1.00103813614692760403102056443458423E+00L, /* 3fff00440908ccc2f000000000000000 */
++ 1.00106868587260300351715613942360505E+00L, /* 3fff00460992df5df000000000000000 */
++ 1.00109923653059629256034668287611566E+00L, /* 3fff00480a20f3111800000000000000 */
++ 1.00112978812093589287002259879955091E+00L, /* 3fff004a0ab307e46800000000000000 */
++ 1.00116034064365022615561429120134562E+00L, /* 3fff004c0b491ddfe000000000000000 */
++ 1.00119089409876788066000585786241572E+00L, /* 3fff004e0be3350b8c00000000000000 */
++ 1.00122144848631711155917400901671499E+00L, /* 3fff00500c814d6f6000000000000000 */
++ 1.00125200380632656260715407370298635E+00L, /* 3fff00520d2367136c00000000000000 */
++ 1.00128256005882454449107399341301061E+00L, /* 3fff00540dc981ffa800000000000000 */
++ 1.00131311724383964545381786592770368E+00L, /* 3fff00560e739e3c2000000000000000 */
++ 1.00134367536140017618251363273884635E+00L, /* 3fff00580f21bbd0cc00000000000000 */
++ 1.00137423441153472492004539162735455E+00L, /* 3fff005a0fd3dac5b800000000000000 */
++ 1.00140479439427171337584354660066310E+00L, /* 3fff005c1089fb22e400000000000000 */
++ 1.00143535530963956325933850166620687E+00L, /* 3fff005e11441cf05000000000000000 */
++ 1.00146591715766680730226312334707472E+00L, /* 3fff0060120240360400000000000000 */
++ 1.00149647993838186721404781565070152E+00L, /* 3fff006212c464fc0000000000000000 */
++ 1.00152704365181316470412298258452211E+00L, /* 3fff0064138a8b4a4400000000000000 */
++ 1.00155760829798923250422149067162536E+00L, /* 3fff00661454b328d800000000000000 */
++ 1.00158817387693849232377374391944613E+00L, /* 3fff00681522dc9fbc00000000000000 */
++ 1.00161874038868942138336137759324629E+00L, /* 3fff006a15f507b6f400000000000000 */
++ 1.00164930783327055241471725821611471E+00L, /* 3fff006c16cb34768800000000000000 */
++ 1.00167987621071025161612055853765924E+00L, /* 3fff006e17a562e67400000000000000 */
++ 1.00171044552103705171930414508096874E+00L, /* 3fff00701883930ec000000000000000 */
++ 1.00174101576427937443369842185347807E+00L, /* 3fff00721965c4f76c00000000000000 */
++ 1.00177158694046569697988502412044909E+00L, /* 3fff00741a4bf8a87c00000000000000 */
++ 1.00180215904962455208959681840497069E+00L, /* 3fff00761b362e29f800000000000000 */
++ 1.00183273209178441698341543997230474E+00L, /* 3fff00781c246583e400000000000000 */
++ 1.00186330606697365785962006157205906E+00L, /* 3fff007a1d169ebe3c00000000000000 */
++ 1.00189388097522080744994354972732253E+00L, /* 3fff007c1e0cd9e10800000000000000 */
++ 1.00192445681655439848611877096118405E+00L, /* 3fff007e1f0716f45000000000000000 */
++ 1.00195503359100279716642489802325144E+00L, /* 3fff0080200556001000000000000000 */
++ 1.00198561129859459173374602869444061E+00L, /* 3fff00822107970c5400000000000000 */
++};
+diff -purN glibc-org/sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,21 +0,0 @@
+-#include <math.h>
+-#include <math_private.h>
+-#include <math_ldbl_opt.h>
+-
+-long double __expl(long double x) /* wrapper exp */
+-{
+- long double z;
+- z = __ieee754_expl(x);
+- if (_LIB_VERSION == _IEEE_)
+- return z;
+- if (isfinite(x))
+- {
+- if (!isfinite (z))
+- return __kernel_standard_l(x,x,206); /* exp overflow */
+- else if (z == 0.0L)
+- return __kernel_standard_l(x,x,207); /* exp underflow */
+- }
+- return z;
+-}
+-hidden_def (__expl)
+-long_double_symbol (libm, __expl, expl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,2 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/ldbl-128/e_ilogbl.c>
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_asinhl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_asinhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_asinhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_asinhl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_asinhl.c>
+-long_double_symbol (libm, __asinhl, asinhl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_atanl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_atanl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_atanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_atanl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_atanl.c>
+-long_double_symbol (libm, __atanl, atanl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_cbrtl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_cbrtl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_cbrtl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_cbrtl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_cbrtl.c>
+-long_double_symbol (libm, __cbrtl, cbrtl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_ceill.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_ceill.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_ceill.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_ceill.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_ceill.c>
+-long_double_symbol (libm, __ceill, ceill);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_copysignl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_copysignl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_copysignl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -1,9 +1,10 @@
+ #include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
++#include <libm-alias-ldouble.h>
++#if IS_IN (libc)
++# undef libm_alias_ldouble
++# define libm_alias_ldouble(from, to)
++#endif
+ #include <sysdeps/ieee754/ldbl-128/s_copysignl.c>
+-#if IS_IN (libm)
+-long_double_symbol (libm, __copysignl, copysignl);
+-#else
++#if IS_IN (libc)
+ long_double_symbol (libc, __copysignl, copysignl);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_cosl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_cosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_cosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_cosl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_cosl.c>
+-long_double_symbol (libm, __cosl, cosl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_erfl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_erfl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_erfl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_erfl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_erfl.c>
+-long_double_symbol (libm, __erfl, erfl);
+-long_double_symbol (libm, __erfcl, erfcl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_expm1l.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_expm1l.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_expm1l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_expm1l.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_expm1l.c>
+-long_double_symbol (libm, __expm1l, expm1l);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_fabsl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_fabsl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_fabsl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_fabsl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_fabsl.c>
+-long_double_symbol (libm, __fabsl, fabsl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_floorl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_floorl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_floorl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_floorl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_floorl.c>
+-long_double_symbol (libm, __floorl, floorl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_fmal.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_fmal.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_fmal.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_fmal.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_fmal.c>
+-long_double_symbol (libm, __fmal, fmal);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_frexpl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_frexpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_frexpl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -1,9 +1,10 @@
+ #include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
++#include <libm-alias-ldouble.h>
++#if IS_IN (libc)
++# undef libm_alias_ldouble
++# define libm_alias_ldouble(from, to)
++#endif
+ #include <sysdeps/ieee754/ldbl-128/s_frexpl.c>
+-#if IS_IN (libm)
+-long_double_symbol (libm, __frexpl, frexpl);
+-#else
++#if IS_IN (libc)
+ long_double_symbol (libc, __frexpl, frexpl);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_llrintl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_llrintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_llrintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_llrintl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_llrintl.c>
+-long_double_symbol (libm, __llrintl, llrintl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_llroundl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_llroundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_llroundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_llroundl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_llroundl.c>
+-long_double_symbol (libm, __llroundl, llroundl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_log1pl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_log1pl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_log1pl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_log1pl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,2 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/ldbl-128/s_log1pl.c>
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_logbl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_logbl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_logbl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_logbl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_logbl.c>
+-long_double_symbol (libm, __logbl, logbl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_lrintl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_lrintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_lrintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_lrintl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_lrintl.c>
+-long_double_symbol (libm, __lrintl, lrintl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_lroundl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_lroundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_lroundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_lroundl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_lroundl.c>
+-long_double_symbol (libm, __lroundl, lroundl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_modfl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_modfl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_modfl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_modfl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -1,9 +1,10 @@
+ #include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
++#include <libm-alias-ldouble.h>
++#if IS_IN (libc)
++# undef libm_alias_ldouble
++# define libm_alias_ldouble(from, to)
++#endif
+ #include <sysdeps/ieee754/ldbl-128/s_modfl.c>
+-#if IS_IN (libm)
+-long_double_symbol (libm, __modfl, modfl);
+-#else
++#if IS_IN (libc)
+ long_double_symbol (libc, __modfl, modfl);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_nearbyintl.c>
+-long_double_symbol (libm, __nearbyintl, nearbyintl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_nextafterl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_nextafterl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_nextafterl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_nextafterl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -4,3 +4,6 @@
+ #include <sysdeps/ieee754/ldbl-128/s_nextafterl.c>
+ long_double_symbol (libm, __nextafterl, nextafterl);
+ long_double_symbol (libm, __nexttowardl, nexttowardl);
++#undef weak_alias
++#define weak_alias(name, aliasname) _weak_alias (name, aliasname)
++libm_alias_ldouble_other (__nextafter, nextafter)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_remquol.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_remquol.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_remquol.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_remquol.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_remquol.c>
+-long_double_symbol (libm, __remquol, remquol);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_rintl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_rintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_rintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_rintl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_rintl.c>
+-long_double_symbol (libm, __rintl, rintl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_roundl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_roundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_roundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_roundl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_roundl.c>
+-long_double_symbol (libm, __roundl, roundl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_scalblnl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_scalblnl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_scalblnl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_scalblnl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,4 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_scalblnl.c>
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,4 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_scalbnl.c>
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_sincosl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_sincosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_sincosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_sincosl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_sincosl.c>
+-long_double_symbol (libm, __sincosl, sincosl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_sinl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_sinl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_sinl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_sinl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_sinl.c>
+-long_double_symbol (libm, __sinl, sinl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_tanhl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_tanhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_tanhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_tanhl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_tanhl.c>
+-long_double_symbol (libm, __tanhl, tanhl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_tanl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_tanl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_tanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_tanl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_tanl.c>
+-long_double_symbol (libm, __tanl, tanl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/strtold_l.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/strtold_l.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/strtold_l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/strtold_l.c 2017-10-22 17:02:23.604967252 +0000
+@@ -15,6 +15,13 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include <bits/floatn.h>
++
++#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
++# define strtof128_l __hide_strtof128_l
++# define wcstof128_l __hide_wcstof128_l
++#endif
++
+ #include <math.h>
+ #include <stdlib.h>
+ #include <wchar.h>
+@@ -57,3 +64,13 @@ long_double_symbol (libc, ___new_strtold
+ long_double_symbol (libc, ____new_strtold_l, __strtold_l);
+ # endif
+ #endif
++
++#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
++# undef strtof128_l
++# undef wcstof128_l
++# ifdef USE_WIDE_CHAR
++weak_alias (____new_wcstold_l, wcstof128_l)
++# else
++weak_alias (____new_strtold_l, strtof128_l)
++# endif
++#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/s_truncl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_truncl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/s_truncl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/s_truncl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/s_truncl.c>
+-long_double_symbol (libm, __truncl, truncl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/w_expl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/w_expl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/w_expl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/w_expl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <sysdeps/ieee754/ldbl-128/w_expl_compat.c>
+-long_double_symbol (libm, __expl, expl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-64-128/w_scalblnl.c glibc-2.26/sysdeps/ieee754/ldbl-64-128/w_scalblnl.c
+--- glibc-org/sysdeps/ieee754/ldbl-64-128/w_scalblnl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-64-128/w_scalblnl.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,26 +0,0 @@
+-/* Wrapper for __scalblnl handles setting errno.
+- Copyright (C) 2014-2017 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/>. */
+-
+-#define declare_mgen_alias(from, to)
+-#include <math-type-macros-ldouble.h>
+-#include <w_scalbln_template.c>
+-#if IS_IN (libm)
+-long_double_symbol (libm, __w_scalblnl, scalblnl);
+-#else
+-long_double_symbol (libc, __w_scalblnl, scalblnl);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/bits/iscanonical.h glibc-2.26/sysdeps/ieee754/ldbl-96/bits/iscanonical.h
+--- glibc-org/sysdeps/ieee754/ldbl-96/bits/iscanonical.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/bits/iscanonical.h 2017-10-22 17:02:23.604967252 +0000
+@@ -34,4 +34,21 @@ extern int __iscanonicall (long double _
+ conversion, before being discarded; in extended precision, there
+ are encodings that are not consistently handled as corresponding to
+ any particular value of the type, and we return 0 for those. */
+-#define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
++#ifndef __cplusplus
++# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
++#else
++/* In C++ mode, __MATH_TG cannot be used, because it relies on
++ __builtin_types_compatible_p, which is a C-only builtin. On the
++ other hand, overloading provides the means to distinguish between
++ the floating-point types. The overloading resolution will match
++ the correct parameter (regardless of type qualifiers (i.e.: const
++ and volatile)). */
++extern "C++" {
++inline int iscanonical (float __val) { return __iscanonicalf (__val); }
++inline int iscanonical (double __val) { return __iscanonical (__val); }
++inline int iscanonical (long double __val) { return __iscanonicall (__val); }
++# if __HAVE_DISTINCT_FLOAT128
++inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
++# endif
++}
++#endif /* __cplusplus */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_acoshl.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_acoshl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_acoshl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_acoshl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -39,7 +39,7 @@ long double
+ __ieee754_acoshl(long double x)
+ {
+ long double t;
+- u_int32_t se,i0,i1;
++ uint32_t se,i0,i1;
+ GET_LDOUBLE_WORDS(se,i0,i1,x);
+ if(se<0x3fff || se & 0x8000) { /* x < 1 */
+ return (x-x)/(x-x);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_asinl.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_asinl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_asinl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_asinl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -96,7 +96,7 @@ __ieee754_asinl (long double x)
+ {
+ long double t, w, p, q, c, r, s;
+ int32_t ix;
+- u_int32_t se, i0, i1, k;
++ uint32_t se, i0, i1, k;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_atanhl.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_atanhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_atanhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_atanhl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -45,7 +45,7 @@ __ieee754_atanhl(long double x)
+ {
+ long double t;
+ int32_t ix;
+- u_int32_t se,i0,i1;
++ uint32_t se,i0,i1;
+ GET_LDOUBLE_WORDS(se,i0,i1,x);
+ ix = se&0x7fff;
+ if ((ix+((((i0&0x7fffffff)|i1)|(-((i0&0x7fffffff)|i1)))>>31))>0x3fff)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_coshl.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_coshl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_coshl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_coshl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -44,7 +44,7 @@ __ieee754_coshl (long double x)
+ {
+ long double t,w;
+ int32_t ex;
+- u_int32_t mx,lx;
++ uint32_t mx,lx;
+
+ /* High word of |x|. */
+ GET_LDOUBLE_WORDS(ex,mx,lx,x);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_gammal_r.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_gammal_r.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_gammal_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_gammal_r.c 2017-10-22 17:02:23.604967252 +0000
+@@ -115,7 +115,7 @@ gammal_positive (long double x, int *exp
+ long double
+ __ieee754_gammal_r (long double x, int *signgamp)
+ {
+- u_int32_t es, hx, lx;
++ uint32_t es, hx, lx;
+ long double ret;
+
+ GET_LDOUBLE_WORDS (es, hx, lx, x);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_hypotl.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_hypotl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_hypotl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_hypotl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -52,7 +52,7 @@
+ long double __ieee754_hypotl(long double x, long double y)
+ {
+ long double a,b,t1,t2,y1,y2,w;
+- u_int32_t j,k,ea,eb;
++ uint32_t j,k,ea,eb;
+
+ GET_LDOUBLE_EXP(ea,x);
+ ea &= 0x7fff;
+@@ -65,8 +65,8 @@ long double __ieee754_hypotl(long double
+ k=0;
+ if(__builtin_expect(ea > 0x5f3f,0)) { /* a>2**8000 */
+ if(ea == 0x7fff) { /* Inf or NaN */
+- u_int32_t exp __attribute__ ((unused));
+- u_int32_t high,low;
++ uint32_t exp __attribute__ ((unused));
++ uint32_t high,low;
+ w = a+b; /* for sNaN */
+ if (issignaling (a) || issignaling (b))
+ return w;
+@@ -83,8 +83,8 @@ long double __ieee754_hypotl(long double
+ }
+ if(__builtin_expect(eb < 0x20bf, 0)) { /* b < 2**-8000 */
+ if(eb == 0) { /* subnormal b or 0 */
+- u_int32_t exp __attribute__ ((unused));
+- u_int32_t high,low;
++ uint32_t exp __attribute__ ((unused));
++ uint32_t high,low;
+ GET_LDOUBLE_WORDS(exp,high,low,b);
+ if((high|low)==0) return a;
+ SET_LDOUBLE_WORDS(t1, 0x7ffd, 0x80000000, 0); /* t1=2^16382 */
+@@ -113,13 +113,13 @@ long double __ieee754_hypotl(long double
+ /* medium size a and b */
+ w = a-b;
+ if (w>b) {
+- u_int32_t high;
++ uint32_t high;
+ GET_LDOUBLE_MSW(high,a);
+ SET_LDOUBLE_WORDS(t1,ea,high,0);
+ t2 = a-t1;
+ w = __ieee754_sqrtl(t1*t1-(b*(-b)-t2*(a+t1)));
+ } else {
+- u_int32_t high;
++ uint32_t high;
+ GET_LDOUBLE_MSW(high,b);
+ a = a+a;
+ SET_LDOUBLE_WORDS(y1,eb,high,0);
+@@ -130,7 +130,7 @@ long double __ieee754_hypotl(long double
+ w = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b)));
+ }
+ if(k!=0) {
+- u_int32_t exp;
++ uint32_t exp;
+ t1 = 1.0;
+ GET_LDOUBLE_EXP(exp,t1);
+ SET_LDOUBLE_EXP(t1,exp+k);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_j0l.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_j0l.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_j0l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_j0l.c 2017-10-22 17:02:23.604967252 +0000
+@@ -108,7 +108,7 @@ __ieee754_j0l (long double x)
+ {
+ long double z, s, c, ss, cc, r, u, v;
+ int32_t ix;
+- u_int32_t se;
++ uint32_t se;
+
+ GET_LDOUBLE_EXP (se, x);
+ ix = se & 0x7fff;
+@@ -194,7 +194,7 @@ __ieee754_y0l (long double x)
+ {
+ long double z, s, c, ss, cc, u, v;
+ int32_t ix;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+@@ -352,7 +352,7 @@ pzero (long double x)
+ const long double *p, *q;
+ long double z, r, s;
+ int32_t ix;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+@@ -490,7 +490,7 @@ qzero (long double x)
+ const long double *p, *q;
+ long double s, r, z;
+ int32_t ix;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_j1l.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_j1l.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_j1l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_j1l.c 2017-10-22 17:02:23.604967252 +0000
+@@ -112,7 +112,7 @@ __ieee754_j1l (long double x)
+ {
+ long double z, c, r, s, ss, cc, u, v, y;
+ int32_t ix;
+- u_int32_t se;
++ uint32_t se;
+
+ GET_LDOUBLE_EXP (se, x);
+ ix = se & 0x7fff;
+@@ -195,7 +195,7 @@ __ieee754_y1l (long double x)
+ {
+ long double z, s, c, ss, cc, u, v;
+ int32_t ix;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+@@ -362,7 +362,7 @@ pone (long double x)
+ const long double *p, *q;
+ long double z, r, s;
+ int32_t ix;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+@@ -509,7 +509,7 @@ qone (long double x)
+ const long double *p, *q;
+ static long double s, r, z;
+ int32_t ix;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_jnl.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_jnl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_jnl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_jnl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -69,7 +69,7 @@ static const long double zero = 0.0L;
+ long double
+ __ieee754_jnl (int n, long double x)
+ {
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+ int32_t i, ix, sgn;
+ long double a, b, temp, di, ret;
+ long double z, w;
+@@ -302,7 +302,7 @@ strong_alias (__ieee754_jnl, __jnl_finit
+ long double
+ __ieee754_ynl (int n, long double x)
+ {
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+ int32_t i, ix;
+ int32_t sign;
+ long double a, b, temp, ret;
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_lgammal_r.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_lgammal_r.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_lgammal_r.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_lgammal_r.c 2017-10-22 17:02:23.604967252 +0000
+@@ -208,7 +208,7 @@ sin_pi (long double x)
+ {
+ long double y, z;
+ int n, ix;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+@@ -275,7 +275,7 @@ __ieee754_lgammal_r (long double x, int
+ {
+ long double t, y, z, nadj, p, p1, p2, q, r, w;
+ int i, ix;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ *signgamp = 1;
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c 2017-10-22 17:02:23.604967252 +0000
+@@ -186,7 +186,7 @@ __ieee754_rem_pio2l (long double x, long
+ {
+ double tx[3], ty[3];
+ int32_t se, j0;
+- u_int32_t i0, i1;
++ uint32_t i0, i1;
+ int sx;
+ int n, exp;
+
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/e_sinhl.c glibc-2.26/sysdeps/ieee754/ldbl-96/e_sinhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/e_sinhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/e_sinhl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -46,7 +46,7 @@ long double
+ __ieee754_sinhl(long double x)
+ {
+ long double t,w,h;
+- u_int32_t jx,ix,i0,i1;
++ uint32_t jx,ix,i0,i1;
+
+ /* Words of |x|. */
+ GET_LDOUBLE_WORDS(jx,i0,i1,x);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_asinhl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_asinhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_asinhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_asinhl.c 2017-10-22 17:02:23.604967252 +0000
+@@ -32,6 +32,7 @@ static char rcsid[] = "$NetBSD: $";
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const long double
+ one = 1.000000000000000000000e+00L, /* 0x3FFF, 0x00000000, 0x00000000 */
+@@ -62,4 +63,4 @@ long double __asinhl(long double x)
+ }
+ return __copysignl(w, x);
+ }
+-weak_alias (__asinhl, asinhl)
++libm_alias_ldouble (__asinh, asinh)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_cbrtl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_cbrtl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_cbrtl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_cbrtl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -20,6 +20,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ #define CBRT2 1.2599210498948731648 /* 2^(1/3) */
+@@ -67,4 +68,4 @@ __cbrtl (long double x)
+ u -= (u - (x / (u * u))) * third;
+ return u;
+ }
+-weak_alias (__cbrtl, cbrtl)
++libm_alias_ldouble (__cbrt, cbrt)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_copysignl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_copysignl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_copysignl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_copysignl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -26,13 +26,14 @@ static char rcsid[] = "$NetBSD: $";
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ long double __copysignl(long double x, long double y)
+ {
+- u_int32_t es1,es2;
++ uint32_t es1,es2;
+ GET_LDOUBLE_EXP(es1,x);
+ GET_LDOUBLE_EXP(es2,y);
+ SET_LDOUBLE_EXP(x,(es1&0x7fff)|(es2&0x8000));
+ return x;
+ }
+-weak_alias (__copysignl, copysignl)
++libm_alias_ldouble (__copysign, copysign)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_cosl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_cosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_cosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_cosl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -52,6 +52,7 @@ static char rcsid[] = "$NetBSD: $";
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ long double __cosl(long double x)
+ {
+@@ -85,4 +86,4 @@ long double __cosl(long double x)
+ }
+ }
+ }
+-weak_alias (__cosl, cosl)
++libm_alias_ldouble (__cos, cos)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_erfl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_erfl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_erfl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_erfl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -108,6 +108,7 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const long double
+ tiny = 1e-4931L,
+@@ -254,7 +255,7 @@ __erfl (long double x)
+ {
+ long double R, S, P, Q, s, y, z, r;
+ int32_t ix, i;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+@@ -335,13 +336,13 @@ __erfl (long double x)
+ return r / x - one;
+ }
+
+-weak_alias (__erfl, erfl)
++libm_alias_ldouble (__erf, erf)
+ long double
+ __erfcl (long double x)
+ {
+ int32_t hx, ix;
+ long double R, S, P, Q, s, y, z, r;
+- u_int32_t se, i0, i1;
++ uint32_t se, i0, i1;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ ix = se & 0x7fff;
+@@ -448,4 +449,4 @@ __erfcl (long double x)
+ }
+ }
+
+-weak_alias (__erfcl, erfcl)
++libm_alias_ldouble (__erfc, erfc)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_fma.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_fma.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_fma.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_fma.c 2017-10-22 17:02:23.605967252 +0000
+@@ -22,6 +22,7 @@
+ #include <fenv.h>
+ #include <ieee754.h>
+ #include <math_private.h>
++#include <libm-alias-double.h>
+
+ /* This implementation uses rounding to odd to avoid problems with
+ double rounding. See a paper by Boldo and Melquiond:
+@@ -97,5 +98,5 @@ __fma (double x, double y, double z)
+ return u.d;
+ }
+ #ifndef __fma
+-weak_alias (__fma, fma)
++libm_alias_double (__fma, fma)
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_fmal.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_fmal.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_fmal.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_fmal.c 2017-10-22 17:02:23.605967252 +0000
+@@ -22,6 +22,7 @@
+ #include <fenv.h>
+ #include <ieee754.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <tininess.h>
+
+ /* This implementation uses rounding to odd to avoid problems with
+@@ -293,4 +294,4 @@ __fmal (long double x, long double y, lo
+ return v.d * 0x1p-130L;
+ }
+ }
+-weak_alias (__fmal, fmal)
++libm_alias_ldouble (__fma, fma)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_frexpl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_frexpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_frexpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_frexpl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -31,6 +31,7 @@ static char rcsid[] = "$NetBSD: $";
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const long double
+ #if LDBL_MANT_DIG == 64
+@@ -42,7 +43,7 @@ two65 = 3.68934881474191032320e+19L; /*
+
+ long double __frexpl(long double x, int *eptr)
+ {
+- u_int32_t se, hx, ix, lx;
++ uint32_t se, hx, ix, lx;
+ GET_LDOUBLE_WORDS(se,hx,lx,x);
+ ix = 0x7fff&se;
+ *eptr = 0;
+@@ -58,4 +59,4 @@ long double __frexpl(long double x, int
+ SET_LDOUBLE_EXP(x,se);
+ return x;
+ }
+-weak_alias (__frexpl, frexpl)
++libm_alias_ldouble (__frexp, frexp)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_fromfpl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_fromfpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_fromfpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_fromfpl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 0
+-#define FUNC fromfpl
++#define FUNC __fromfpl
+ #include <s_fromfpl_main.c>
++libm_alias_ldouble (__fromfp, fromfp)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_fromfpl_main.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_fromfpl_main.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_fromfpl_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_fromfpl_main.c 2017-10-22 17:02:23.605967252 +0000
+@@ -20,6 +20,7 @@
+ #include <fenv.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <stdbool.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_fromfpxl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_fromfpxl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_fromfpxl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_fromfpxl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 0
+ #define INEXACT 1
+-#define FUNC fromfpxl
++#define FUNC __fromfpxl
+ #include <s_fromfpl_main.c>
++libm_alias_ldouble (__fromfpx, fromfpx)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_getpayloadl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_getpayloadl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_getpayloadl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_getpayloadl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -18,10 +18,11 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <stdint.h>
+
+ long double
+-getpayloadl (const long double *x)
++__getpayloadl (const long double *x)
+ {
+ uint16_t se __attribute__ ((unused));
+ uint32_t hx, lx;
+@@ -30,3 +31,4 @@ getpayloadl (const long double *x)
+ uint64_t ix = ((uint64_t) hx << 32) | lx;
+ return (long double) ix;
+ }
++libm_alias_ldouble (__getpayload, getpayload)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_issignalingl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_issignalingl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_issignalingl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_issignalingl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -23,7 +23,7 @@
+ int
+ __issignalingl (long double x)
+ {
+- u_int32_t exi, hxi, lxi;
++ uint32_t exi, hxi, lxi;
+ GET_LDOUBLE_WORDS (exi, hxi, lxi, x);
+ #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
+ # error not implemented
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_llrintl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_llrintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_llrintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_llrintl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -23,6 +23,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const long double two63[2] =
+ {
+@@ -35,7 +36,7 @@ long long int
+ __llrintl (long double x)
+ {
+ int32_t se,j0;
+- u_int32_t i0, i1;
++ uint32_t i0, i1;
+ long long int result;
+ long double w;
+ long double t;
+@@ -88,4 +89,4 @@ __llrintl (long double x)
+ return sx ? -result : result;
+ }
+
+-weak_alias (__llrintl, llrintl)
++libm_alias_ldouble (__llrint, llrint)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_llroundl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_llroundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_llroundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_llroundl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -22,13 +22,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ long long int
+ __llroundl (long double x)
+ {
+ int32_t j0;
+- u_int32_t se, i1, i0;
++ uint32_t se, i1, i0;
+ long long int result;
+ int sign;
+
+@@ -42,7 +43,7 @@ __llroundl (long double x)
+ return j0 < -1 ? 0 : sign;
+ else
+ {
+- u_int32_t j = i0 + (0x40000000 >> j0);
++ uint32_t j = i0 + (0x40000000 >> j0);
+ if (j < i0)
+ {
+ j >>= 1;
+@@ -59,7 +60,7 @@ __llroundl (long double x)
+ result = (((long long int) i0 << 32) | i1) << (j0 - 63);
+ else
+ {
+- u_int32_t j = i1 + (0x80000000 >> (j0 - 31));
++ uint32_t j = i1 + (0x80000000 >> (j0 - 31));
+
+ result = (long long int) i0;
+ if (j < i1)
+@@ -86,4 +87,4 @@ __llroundl (long double x)
+ return sign * result;
+ }
+
+-weak_alias (__llroundl, llroundl)
++libm_alias_ldouble (__llround, llround)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_lrintl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_lrintl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_lrintl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_lrintl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -23,6 +23,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const long double two63[2] =
+ {
+@@ -35,7 +36,7 @@ long int
+ __lrintl (long double x)
+ {
+ int32_t se,j0;
+- u_int32_t i0, i1;
++ uint32_t i0, i1;
+ long int result;
+ long double w;
+ long double t;
+@@ -123,4 +124,4 @@ __lrintl (long double x)
+ return sx ? -result : result;
+ }
+
+-weak_alias (__lrintl, lrintl)
++libm_alias_ldouble (__lrint, lrint)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_lroundl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_lroundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_lroundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_lroundl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -22,13 +22,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ long int
+ __lroundl (long double x)
+ {
+ int32_t j0;
+- u_int32_t se, i1, i0;
++ uint32_t se, i1, i0;
+ long int result;
+ int sign;
+
+@@ -42,7 +43,7 @@ __lroundl (long double x)
+ return j0 < -1 ? 0 : sign;
+ else
+ {
+- u_int32_t j = i0 + (0x40000000 >> j0);
++ uint32_t j = i0 + (0x40000000 >> j0);
+ if (j < i0)
+ {
+ j >>= 1;
+@@ -66,7 +67,7 @@ __lroundl (long double x)
+ result = ((long int) i0 << (j0 - 31)) | (i1 << (j0 - 63));
+ else
+ {
+- u_int32_t j = i1 + (0x80000000 >> (j0 - 31));
++ uint32_t j = i1 + (0x80000000 >> (j0 - 31));
+ unsigned long int ures = i0;
+
+ if (j < i1)
+@@ -108,4 +109,4 @@ __lroundl (long double x)
+ return sign * result;
+ }
+
+-weak_alias (__lroundl, lroundl)
++libm_alias_ldouble (__lround, lround)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_modfl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_modfl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_modfl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_modfl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -26,6 +26,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const long double one = 1.0;
+
+@@ -33,7 +34,7 @@ long double
+ __modfl(long double x, long double *iptr)
+ {
+ int32_t i0,i1,j0;
+- u_int32_t i,se;
++ uint32_t i,se;
+ GET_LDOUBLE_WORDS(se,i0,i1,x);
+ j0 = (se&0x7fff)-0x3fff; /* exponent of x */
+ if(j0<32) { /* integer part in high x */
+@@ -59,7 +60,7 @@ __modfl(long double x, long double *iptr
+ SET_LDOUBLE_WORDS(x,se&0x8000,0,0); /* return +-0 */
+ return x;
+ } else { /* fraction part in low x */
+- i = ((u_int32_t)(0x7fffffff))>>(j0-32);
++ i = ((uint32_t)(0x7fffffff))>>(j0-32);
+ if((i1&i)==0) { /* x is integral */
+ *iptr = x;
+ SET_LDOUBLE_WORDS(x,se&0x8000,0,0); /* return +-0 */
+@@ -70,4 +71,4 @@ __modfl(long double x, long double *iptr
+ }
+ }
+ }
+-weak_alias (__modfl, modfl)
++libm_alias_ldouble (__modf, modf)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_nexttoward.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_nexttoward.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_nexttoward.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_nexttoward.c 2017-10-22 17:02:23.605967252 +0000
+@@ -33,7 +33,7 @@ static char rcsid[] = "$NetBSD: $";
+ double __nexttoward(double x, long double y)
+ {
+ int32_t hx,ix,iy;
+- u_int32_t lx,hy,ly,esy;
++ uint32_t lx,hy,ly,esy;
+
+ EXTRACT_WORDS(hx,lx,x);
+ GET_LDOUBLE_WORDS(esy,hy,ly,y);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_nexttowardf.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_nexttowardf.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_nexttowardf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_nexttowardf.c 2017-10-22 17:02:23.605967252 +0000
+@@ -25,7 +25,7 @@ static char rcsid[] = "$NetBSD: $";
+ float __nexttowardf(float x, long double y)
+ {
+ int32_t hx,ix,iy;
+- u_int32_t hy,ly,esy;
++ uint32_t hy,ly,esy;
+
+ GET_FLOAT_WORD(hx,x);
+ GET_LDOUBLE_WORDS(esy,hy,ly,y);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_nextupl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_nextupl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_nextupl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_nextupl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -18,13 +18,14 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ /* Return the least floating-point number greater than X. */
+ long double
+ __nextupl (long double x)
+ {
+- u_int32_t hx, ix;
+- u_int32_t lx;
++ uint32_t hx, ix;
++ uint32_t lx;
+ int32_t esx;
+
+ GET_LDOUBLE_WORDS (esx, hx, lx, x);
+@@ -81,4 +82,4 @@ __nextupl (long double x)
+ return x;
+ }
+
+-weak_alias (__nextupl, nextupl)
++libm_alias_ldouble (__nextup, nextup)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_remquol.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_remquol.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_remquol.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_remquol.c 2017-10-22 17:02:23.605967252 +0000
+@@ -20,6 +20,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ static const long double zero = 0.0;
+@@ -29,7 +30,7 @@ long double
+ __remquol (long double x, long double p, int *quo)
+ {
+ int32_t ex,ep,hx,hp;
+- u_int32_t sx,lx,lp;
++ uint32_t sx,lx,lp;
+ int cquo,qs;
+
+ GET_LDOUBLE_WORDS (ex, hx, lx, x);
+@@ -108,4 +109,4 @@ __remquol (long double x, long double p,
+ x = -x;
+ return x;
+ }
+-weak_alias (__remquol, remquol)
++libm_alias_ldouble (__remquo, remquo)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_roundevenl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_roundevenl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_roundevenl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_roundevenl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -19,6 +19,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <stdint.h>
+
+ #define BIAS 0x3fff
+@@ -26,7 +27,7 @@
+ #define MAX_EXP (2 * BIAS + 1)
+
+ long double
+-roundevenl (long double x)
++__roundevenl (long double x)
+ {
+ uint16_t se;
+ uint32_t hx, lx;
+@@ -122,3 +123,4 @@ roundevenl (long double x)
+ SET_LDOUBLE_WORDS (x, se, hx, lx);
+ return x;
+ }
++libm_alias_ldouble (__roundeven, roundeven)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_roundl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_roundl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_roundl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_roundl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -20,13 +20,14 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ long double
+ __roundl (long double x)
+ {
+ int32_t j0;
+- u_int32_t se, i1, i0;
++ uint32_t se, i1, i0;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ j0 = (se & 0x7fff) - 0x3fff;
+@@ -44,12 +45,12 @@ __roundl (long double x)
+ }
+ else
+ {
+- u_int32_t i = 0x7fffffff >> j0;
++ uint32_t i = 0x7fffffff >> j0;
+ if (((i0 & i) | i1) == 0)
+ /* X is integral. */
+ return x;
+
+- u_int32_t j = i0 + (0x40000000 >> j0);
++ uint32_t j = i0 + (0x40000000 >> j0);
+ if (j < i0)
+ se += 1;
+ i0 = (j & ~i) | 0x80000000;
+@@ -66,15 +67,15 @@ __roundl (long double x)
+ }
+ else
+ {
+- u_int32_t i = 0xffffffff >> (j0 - 31);
++ uint32_t i = 0xffffffff >> (j0 - 31);
+ if ((i1 & i) == 0)
+ /* X is integral. */
+ return x;
+
+- u_int32_t j = i1 + (1 << (62 - j0));
++ uint32_t j = i1 + (1 << (62 - j0));
+ if (j < i1)
+ {
+- u_int32_t k = i0 + 1;
++ uint32_t k = i0 + 1;
+ if (k < i0)
+ {
+ se += 1;
+@@ -89,4 +90,4 @@ __roundl (long double x)
+ SET_LDOUBLE_WORDS (x, se, i0, i1);
+ return x;
+ }
+-weak_alias (__roundl, roundl)
++libm_alias_ldouble (__round, round)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_setpayloadl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_setpayloadl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_setpayloadl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_setpayloadl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,3 +1,4 @@
+ #define SIG 0
+-#define FUNC setpayloadl
++#define FUNC __setpayloadl
+ #include <s_setpayloadl_main.c>
++libm_alias_ldouble (__setpayload, setpayload)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_setpayloadl_main.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_setpayloadl_main.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_setpayloadl_main.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_setpayloadl_main.c 2017-10-22 17:02:23.605967252 +0000
+@@ -18,6 +18,7 @@
+
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_setpayloadsigl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_setpayloadsigl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_setpayloadsigl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_setpayloadsigl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,3 +1,4 @@
+ #define SIG 1
+-#define FUNC setpayloadsigl
++#define FUNC __setpayloadsigl
+ #include <s_setpayloadl_main.c>
++libm_alias_ldouble (__setpayloadsig, setpayloadsig)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_sincosl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_sincosl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_sincosl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_sincosl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -21,6 +21,7 @@
+ #include <math.h>
+
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+
+ void
+@@ -73,4 +74,4 @@ __sincosl (long double x, long double *s
+ }
+ }
+ }
+-weak_alias (__sincosl, sincosl)
++libm_alias_ldouble (__sincos, sincos)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_sinl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_sinl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_sinl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_sinl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -52,6 +52,7 @@ static char rcsid[] = "$NetBSD: $";
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ long double __sinl(long double x)
+ {
+@@ -85,4 +86,4 @@ long double __sinl(long double x)
+ }
+ }
+ }
+-weak_alias (__sinl, sinl)
++libm_alias_ldouble (__sin, sin)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_tanhl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_tanhl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_tanhl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_tanhl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -45,6 +45,7 @@ static char rcsid[] = "$NetBSD: $";
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ static const long double one=1.0, two=2.0, tiny = 1.0e-4900L;
+
+@@ -52,7 +53,7 @@ long double __tanhl(long double x)
+ {
+ long double t,z;
+ int32_t se;
+- u_int32_t j0,j1,ix;
++ uint32_t j0,j1,ix;
+
+ /* High word of |x|. */
+ GET_LDOUBLE_WORDS(se,j0,j1,x);
+@@ -87,4 +88,4 @@ long double __tanhl(long double x)
+ }
+ return (se&0x8000)? -z: z;
+ }
+-weak_alias (__tanhl, tanhl)
++libm_alias_ldouble (__tanh, tanh)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_tanl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_tanl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_tanl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_tanl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -51,6 +51,7 @@ static char rcsid[] = "$NetBSD: $";
+ #include <errno.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+
+ long double __tanl(long double x)
+ {
+@@ -78,4 +79,4 @@ long double __tanl(long double x)
+ -1 -- n odd */
+ }
+ }
+-weak_alias (__tanl, tanl)
++libm_alias_ldouble (__tan, tan)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_totalorderl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_totalorderl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_totalorderl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_totalorderl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -19,11 +19,12 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+ int
+-totalorderl (long double x, long double y)
++__totalorderl (long double x, long double y)
+ {
+ int16_t expx, expy;
+ uint32_t hx, hy;
+@@ -55,3 +56,4 @@ totalorderl (long double x, long double
+ ly ^= y_sign;
+ return expx < expy || (expx == expy && (hx < hy || (hx == hy && lx <= ly)));
+ }
++libm_alias_ldouble (__totalorder, totalorder)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_totalordermagl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_totalordermagl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_totalordermagl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_totalordermagl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -19,11 +19,12 @@
+ #include <float.h>
+ #include <math.h>
+ #include <math_private.h>
++#include <libm-alias-ldouble.h>
+ #include <nan-high-order-bit.h>
+ #include <stdint.h>
+
+ int
+-totalordermagl (long double x, long double y)
++__totalordermagl (long double x, long double y)
+ {
+ uint16_t expx, expy;
+ uint32_t hx, hy;
+@@ -49,3 +50,4 @@ totalordermagl (long double x, long doub
+ #endif
+ return expx < expy || (expx == expy && (hx < hy || (hx == hy && lx <= ly)));
+ }
++libm_alias_ldouble (__totalordermag, totalordermag)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_ufromfpl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_ufromfpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_ufromfpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_ufromfpl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 0
+-#define FUNC ufromfpl
++#define FUNC __ufromfpl
+ #include <s_fromfpl_main.c>
++libm_alias_ldouble (__ufromfp, ufromfp)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/s_ufromfpxl.c glibc-2.26/sysdeps/ieee754/ldbl-96/s_ufromfpxl.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/s_ufromfpxl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/s_ufromfpxl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,4 +1,5 @@
+ #define UNSIGNED 1
+ #define INEXACT 1
+-#define FUNC ufromfpxl
++#define FUNC __ufromfpxl
+ #include <s_fromfpl_main.c>
++libm_alias_ldouble (__ufromfpx, ufromfpx)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-96/w_expl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-96/w_expl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-96/w_expl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-96/w_expl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,34 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+-
+- 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>
+-
+-/* wrapper expl */
+-long double
+-__expl (long double x)
+-{
+- long double z = __ieee754_expl (x);
+- if (__builtin_expect (!isfinite (z) || z == 0, 0)
+- && isfinite (x) && _LIB_VERSION != _IEEE_)
+- return __kernel_standard_l (x, x, 206 + !!signbit (x));
+-
+- return z;
+-}
+-hidden_def (__expl)
+-weak_alias (__expl, expl)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/libm-alias-double.h glibc-2.26/sysdeps/ieee754/ldbl-opt/libm-alias-double.h
+--- glibc-org/sysdeps/ieee754/ldbl-opt/libm-alias-double.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/libm-alias-double.h 2017-10-22 17:02:23.605967252 +0000
+@@ -0,0 +1,55 @@
++/* Define aliases for libm double functions. ldbl-opt version.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _LIBM_ALIAS_DOUBLE_H
++#define _LIBM_ALIAS_DOUBLE_H
++
++#include <math_ldbl_opt.h>
++#include <first-versions.h>
++#include <ldbl-compat-choose.h>
++
++/* Define _FloatN / _FloatNx aliases for a double libm function that
++ has internal name FROM ## R and public names TO ## suffix ## R for
++ each suffix of a supported _FloatN / _FloatNx floating-point type
++ with the same format as double. */
++#define libm_alias_double_other_r(from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_double_other(from, to) \
++ libm_alias_double_other_r (from, to, )
++
++/* Define aliases for a double libm function that has internal name
++ FROM ## R and public names TO ## suffix ## R for each suffix of a
++ supported floating-point type with the same format as double. This
++ should only be used for functions where such public names exist for
++ _FloatN types, not for implementation-namespace exported names
++ (where there is one name per format, not per type) or for
++ obsolescent functions not provided for _FloatN types. */
++#define libm_alias_double_r(from, to, r) \
++ weak_alias (from ## r, to ## r) \
++ LONG_DOUBLE_COMPAT_CHOOSE_libm_ ## to ## l ## r \
++ (compat_symbol (libm, \
++ from ## r, \
++ to ## l ## r, \
++ FIRST_VERSION_libm_ ## to ## l ## r), ); \
++ libm_alias_double_other_r (from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_double(from, to) libm_alias_double_r (from, to, )
++
++#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/libm-alias-ldouble.h glibc-2.26/sysdeps/ieee754/ldbl-opt/libm-alias-ldouble.h
+--- glibc-org/sysdeps/ieee754/ldbl-opt/libm-alias-ldouble.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/libm-alias-ldouble.h 2017-10-22 17:02:23.605967252 +0000
+@@ -0,0 +1,58 @@
++/* Define aliases for libm long double functions. ldbl-opt version.
++ Copyright (C) 2017 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/>. */
++
++#ifndef _LIBM_ALIAS_LDOUBLE_H
++#define _LIBM_ALIAS_LDOUBLE_H
++
++#include <bits/floatn.h>
++#include <math_ldbl_opt.h>
++#include <ldbl-compat-choose.h>
++
++/* Define _FloatN / _FloatNx aliases for a long double libm function
++ that has internal name FROM ## l ## R and public names TO ## suffix
++ ## R for each suffix of a supported _FloatN / _FloatNx
++ floating-point type with the same format as long double. */
++#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
++# define libm_alias_ldouble_other_r(from, to, r) \
++ weak_alias (from ## l ## r, to ## f128 ## r)
++#else
++# define libm_alias_ldouble_other_r(from, to, r)
++#endif
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_ldouble_other(from, to) \
++ libm_alias_ldouble_other_r (from, to, )
++
++/* Define aliases for a long double libm function that has internal
++ name FROM ## l ## R and public names TO ## suffix ## R for each
++ suffix of a supported floating-point type with the same format as
++ long double. This should only be used for functions where such
++ public names exist for _FloatN types, not for
++ implementation-namespace exported names (where there is one name
++ per format, not per type) or for obsolescent functions not provided
++ for _FloatN types. */
++#define libm_alias_ldouble_r(from, to, r) \
++ LONG_DOUBLE_COMPAT_CHOOSE_libm_ ## to ## l ## r \
++ (long_double_symbol (libm, from ## l ## r, to ## l ## r), \
++ weak_alias (from ## l ## r, to ## l ## r)); \
++ libm_alias_ldouble_other_r (from, to, r)
++
++/* Likewise, but without the R suffix. */
++#define libm_alias_ldouble(from, to) libm_alias_ldouble_r (from, to, )
++
++#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/Makefile glibc-2.26/sysdeps/ieee754/ldbl-opt/Makefile
+--- glibc-org/sysdeps/ieee754/ldbl-opt/Makefile 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/Makefile 2017-10-22 17:02:23.605967252 +0000
+@@ -29,7 +29,7 @@ libnldbl-calls = asprintf dprintf fprint
+ qecvt qfcvt qgcvt qecvt_r qfcvt_r \
+ isinf isnan finite signbit scalb log2 lgamma_r ceil \
+ significand acos asin atan atan2 cos sin tan cosh sinh \
+- tanh acosh asinh atanh exp log log10 exp10 pow10 expm1 \
++ tanh acosh asinh atanh exp log log10 exp10 expm1 \
+ log1p logb exp2 sqrt cbrt fabs floor j0 j1 y0 y1 erf erfc \
+ lgamma tgamma gamma rint nearbyint round trunc \
+ copysign fdim fmax fmin nextafter pow hypot fmod \
+@@ -136,7 +136,6 @@ CFLAGS-nldbl-nexttoward.c = -fno-builtin
+ CFLAGS-nldbl-nexttowardf.c = -fno-builtin-nexttowardf
+ CFLAGS-nldbl-nextup.c = -fno-builtin-nextupl
+ CFLAGS-nldbl-pow.c = -fno-builtin-powl
+-CFLAGS-nldbl-pow10.c = -fno-builtin-pow10l
+ CFLAGS-nldbl-remainder.c = -fno-builtin-remainderl -fno-builtin-dreml
+ CFLAGS-nldbl-remquo.c = -fno-builtin-remquol
+ CFLAGS-nldbl-rint.c = -fno-builtin-rintl
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/math-type-macros-double.h glibc-2.26/sysdeps/ieee754/ldbl-opt/math-type-macros-double.h
+--- glibc-org/sysdeps/ieee754/ldbl-opt/math-type-macros-double.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/math-type-macros-double.h 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Overrides for ldbl-opt versioning for double types.
+- Copyright (C) 2016-2017 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/>. */
+-
+-#ifndef _MATH_TYPE_MACROS_DOUBLE
+-
+-#include <math_ldbl_opt.h>
+-#include <first-versions.h>
+-
+-/* Define compat symbols for long double on platforms
+- where it was not always a distinct type. */
+-#if !defined M_LIBM_NEED_COMPAT
+-# define M_LIBM_NEED_COMPAT(f) \
+- LONG_DOUBLE_COMPAT (libm, FIRST_VERSION_libm_ ## f ## l)
+-#endif
+-
+-#if !defined declare_mgen_libm_compat
+-# define declare_mgen_libm_compat(from, to) \
+- compat_symbol (libm, from, to ## l, \
+- FIRST_VERSION_libm_ ## to ## l);
+-#endif
+-
+-#include_next <math-type-macros-double.h>
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h glibc-2.26/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h
+--- glibc-org/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Overrides for ldbl-opt versioning for long double types.
+- Copyright (C) 2016-2017 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/>. */
+-
+-#ifndef _MATH_TYPE_MACROS_LDOUBLE
+-
+-#include <math_ldbl_opt.h>
+-#include <ldbl-compat-choose.h>
+-
+-#define maybe_long_double_symbol(lib, from, to) \
+- LONG_DOUBLE_COMPAT_CHOOSE_ ## lib ## _ ## to (long_double_symbol (lib, \
+- from, \
+- to), \
+- weak_alias (from, to))
+-
+-/* Use properly versioned symbols for long double on platforms where
+- it was not always a distinct type. */
+-#if !defined declare_mgen_alias
+-# define declare_mgen_alias(from, to) \
+- maybe_long_double_symbol (libm, from ## l, to ## l);
+-#endif
+-
+-#include_next <math-type-macros-ldouble.h>
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c glibc-2.26/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,8 +0,0 @@
+-#include "nldbl-compat.h"
+-
+-double
+-attribute_hidden
+-pow10l (double x)
+-{
+- return pow10 (x);
+-}
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_asinh.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_asinh.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_asinh.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_asinh.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_asinh.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __asinh, asinhl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_atan.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_atan.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_atan.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_atan.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_atan.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, atan, atanl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_cbrt.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_cbrt.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_cbrt.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_cbrt.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_cbrt.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __cbrt, cbrtl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_ceil.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_ceil.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_ceil.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_ceil.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_ceil.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __ceil, ceill, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_clog10.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_clog10.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_clog10.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_clog10.c 2017-10-22 17:02:23.605967252 +0000
+@@ -0,0 +1,28 @@
++/* Define __clog10l compat symbol for clog10 for ldbl-opt.
++ Copyright (C) 2017 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_ldbl_opt.h>
++#include <first-versions.h>
++#include <math-type-macros-double.h>
++
++#include <s_clog10_template.c>
++
++#if LONG_DOUBLE_COMPAT (libm, FIRST_VERSION_libm___clog10l)
++strong_alias (__clog10, __clog10l_alias)
++compat_symbol (libm, __clog10l_alias, __clog10l, FIRST_VERSION_libm___clog10l);
++#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_clog10l.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_clog10l.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_clog10l.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_clog10l.c 2017-10-22 17:02:23.605967252 +0000
+@@ -26,6 +26,7 @@
+ #include <s_clog10_template.c>
+
+ /* __clog10l is also a public symbol. */
+-strong_alias (__clog10l_internal, __clog10l__internal)
++strong_alias (__clog10l_internal, __clog10_internal_l)
+ long_double_symbol (libm, __clog10l_internal, __clog10l);
+-long_double_symbol (libm, __clog10l__internal, clog10l);
++long_double_symbol (libm, __clog10_internal_l, clog10l);
++libm_alias_ldouble_other (__clog10_internal_, clog10)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_copysign.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_copysign.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_copysign.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_copysign.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,9 +1,5 @@
+ #include <math_ldbl_opt.h>
+ #include <sysdeps/ieee754/dbl-64/s_copysign.c>
+-#if IS_IN (libm)
+-# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
+-# endif
+-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
++#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
+ compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_erf.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_erf.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_erf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_erf.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_erf.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __erf, erfl, GLIBC_2_0);
+-compat_symbol (libm, __erfc, erfcl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_expm1.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_expm1.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_expm1.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_expm1.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_expm1.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __expm1, expm1l, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_fabs.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_fabs.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_fabs.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_fabs.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_fabs.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_floor.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_floor.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_floor.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_floor.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_floor.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __floor, floorl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_fma.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_fma.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_fma.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_fma.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_fma.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __fma, fmal, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_fmal.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_fmal.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_fmal.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_fmal.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/s_fmal.c>
+-long_double_symbol (libm, __fmal, fmal);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_frexp.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_frexp.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_frexp.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_frexp.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,9 +1,5 @@
+ #include <math_ldbl_opt.h>
+ #include <sysdeps/ieee754/dbl-64/s_frexp.c>
+-#if IS_IN (libm)
+-# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __frexp, frexpl, GLIBC_2_0);
+-# endif
+-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
++#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
+ compat_symbol (libc, __frexp, frexpl, GLIBC_2_0);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_ldexp.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_ldexp.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_ldexp.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_ldexp.c 2017-10-22 17:02:23.605967252 +0000
+@@ -17,14 +17,10 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+-#define M_LIBM_NEED_COMPAT(f) 0
+ #include <math-type-macros-double.h>
+ #include <s_ldexp_template.c>
+
+-#if IS_IN (libm)
+-# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __ldexp, ldexpl, GLIBC_2_0);
+-# endif
+-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
++#if IS_IN (libc) && LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
+ compat_symbol (libc, __ldexp, ldexpl, GLIBC_2_0);
++compat_symbol (libc, __wrap_scalbn, scalbnl, GLIBC_2_0);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_ldexpl.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_ldexpl.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_ldexpl.c 2017-10-22 17:02:23.605967252 +0000
+@@ -17,15 +17,13 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+-#define declare_mgen_alias(f,t)
++#if IS_IN (libc)
++# define declare_mgen_alias(f,t)
++#endif
+ #include <math-type-macros-ldouble.h>
+ #include <s_ldexp_template.c>
+
+-strong_alias (__ldexpl, __ldexpl_2)
+-#if IS_IN (libm)
+-long_double_symbol (libm, __ldexpl, ldexpl);
+-long_double_symbol (libm, __ldexpl_2, scalbnl);
+-#else
++#if IS_IN (libc)
+ long_double_symbol (libc, __ldexpl, ldexpl);
+-long_double_symbol (libc, __ldexpl_2, scalbnl);
++long_double_symbol (libc, __wrap_scalbnl, scalbnl);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_llrint.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_llrint.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_llrint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_llrint.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_llrint.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_llround.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_llround.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_llround.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_llround.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_llround.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_log1p.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_log1p.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_log1p.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_log1p.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_log1p.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __log1p, log1pl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_logb.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_logb.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_logb.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_logb.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_logb.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __logb, logbl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_lrint.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_lrint.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_lrint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_lrint.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_lrint.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_lround.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_lround.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_lround.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_lround.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_lround.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_modf.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_modf.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_modf.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_modf.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,9 +1,5 @@
+ #include <math_ldbl_opt.h>
+ #include <sysdeps/ieee754/dbl-64/s_modf.c>
+-#if IS_IN (libm)
+-# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __modf, modfl, GLIBC_2_0);
+-# endif
+-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
++#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
+ compat_symbol (libc, __modf, modfl, GLIBC_2_0);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_nearbyint.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_nearbyint.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_nearbyint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_nearbyint.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_nearbyint.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_nextafter.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_nextafter.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_nextafter.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_nextafter.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,8 +1,5 @@
+ #include <math_ldbl_opt.h>
+ #include <math/s_nextafter.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __nextafter, nextafterl, GLIBC_2_0);
+-#endif
+ #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+ strong_alias (__nextafter, __nexttowardd)
+ strong_alias (__nextafter, __nexttowardld)
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c 2017-10-22 17:02:23.605967252 +0000
+@@ -31,7 +31,7 @@ float __nldbl_nexttowardf(float x, doubl
+ float __nldbl_nexttowardf(float x, double y)
+ {
+ int32_t hx,hy,ix,iy;
+- u_int32_t ly;
++ uint32_t ly;
+
+ GET_FLOAT_WORD(hx,x);
+ EXTRACT_WORDS(hy,ly,y);
+@@ -44,7 +44,7 @@ float __nldbl_nexttowardf(float x, doubl
+ if((double) x==y) return y; /* x=y, return y */
+ if(ix==0) { /* x == 0 */
+ float u;
+- SET_FLOAT_WORD(x,(u_int32_t)(hy&0x80000000)|1);/* return +-minsub*/
++ SET_FLOAT_WORD(x,(uint32_t)(hy&0x80000000)|1);/* return +-minsub*/
+ u = math_opt_barrier (x);
+ u = u * u;
+ math_force_eval (u); /* raise underflow flag */
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_remquo.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_remquo.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_remquo.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_remquo.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_remquo.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __remquo, remquol, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_rint.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_rint.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_rint.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_rint.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_rint.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_round.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_round.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_round.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_round.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_round.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __round, roundl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_scalbln.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_scalbln.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_scalbln.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_scalbln.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,9 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_scalbln.c>
+-#if IS_IN (libm)
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __scalbln, scalblnl, GLIBC_2_1);
+-#endif
+-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_1)
+-compat_symbol (libc, __scalbln, scalblnl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_scalbn.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_scalbn.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_scalbn.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_scalbn.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,9 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_scalbn.c>
+-#if IS_IN (libm)
+-# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __scalbn, scalbnl, GLIBC_2_0);
+-# endif
+-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+-compat_symbol (libc, __scalbn, scalbnl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_sin.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_sin.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_sin.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_sin.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,15 +0,0 @@
+-/* dbl-64/s_sin.c uses NAN and sincos identifiers internally. */
+-#define sincos sincos_disable
+-/* These definitions needed for proper unfolding of __MATHDECL_VEC. */
+-#define __DECL_SIMD_sincos_disable
+-#define __DECL_SIMD_sincos_disablef
+-#define __DECL_SIMD_sincos_disablel
+-#define __DECL_SIMD_sincos_disablef128
+-#include <math_ldbl_opt.h>
+-#undef NAN
+-#undef sincos
+-#include <sysdeps/ieee754/dbl-64/s_sin.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __sin, sinl, GLIBC_2_0);
+-compat_symbol (libm, __cos, cosl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_sincos.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_sincos.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_sincos.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_sincos.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_sincos.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __sincos, sincosl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_tan.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_tan.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_tan.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_tan.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_tan.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, tan, tanl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_tanh.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_tanh.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_tanh.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_tanh.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_tanh.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __tanh, tanhl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/s_trunc.c glibc-2.26/sysdeps/ieee754/ldbl-opt/s_trunc.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/s_trunc.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/s_trunc.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/s_trunc.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __trunc, truncl, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_acos_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_acos_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_acos_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_acos_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_acos_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __acos, acosl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_acosh_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __acosh, acoshl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_acoshl_compat.c>
+-long_double_symbol (libm, __acoshl, acoshl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_acosl_compat.c>
+-long_double_symbol (libm, __acosl, acosl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_asin_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_asin_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_asin_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_asin_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_asin_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __asin, asinl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_asinl_compat.c>
+-long_double_symbol (libm, __asinl, asinl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_atan2_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __atan2, atan2l, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_atan2l_compat.c>
+-long_double_symbol (libm, __atan2l, atan2l);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_atanh_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __atanh, atanhl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_atanhl_compat.c>
+-long_double_symbol (libm, __atanhl, atanhl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_cosh_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __cosh, coshl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_coshl_compat.c>
+-long_double_symbol (libm, __coshl, coshl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c 2017-10-22 17:02:23.605967252 +0000
+@@ -1,6 +1,8 @@
+ #include <math_ldbl_opt.h>
+ #include <math/w_exp10_compat.c>
+ #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __exp10, exp10l, GLIBC_2_1);
+-compat_symbol (libm, __pow10, pow10l, GLIBC_2_1);
++# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
++strong_alias (__pow10, __pow10_pow10l)
++compat_symbol (libm, __pow10_pow10l, pow10l, GLIBC_2_1);
++# endif
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c 2017-10-22 17:02:23.606967252 +0000
+@@ -1,6 +1,17 @@
+ #include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
++#undef compat_symbol
++#define compat_symbol(l,n,a,v)
+ #include <math/w_exp10l_compat.c>
+-long_double_symbol (libm, __exp10l, exp10l);
+-long_double_symbol (libm, __pow10l, pow10l);
++#if LIBM_SVID_COMPAT
++# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
++/* compat_symbol was undefined and redefined above to avoid the
++ default pow10l compat symbol at version GLIBC_2_1 (as for ldbl-opt
++ configurations, that version should have the alias to exp10). So
++ it now needs to be redefined to define the compat symbol at version
++ LONG_DOUBLE_COMPAT_VERSION. */
++# undef compat_symbol
++# define compat_symbol(lib, local, symbol, version) \
++ compat_symbol_reference (lib, local, symbol, version)
++compat_symbol (libm, __pow10l, pow10l, LONG_DOUBLE_COMPAT_VERSION);
++# endif
++#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_exp_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_exp_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_exp_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_exp_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <sysdeps/ieee754/dbl-64/w_exp_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __exp, expl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_fmod_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __fmod, fmodl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_fmodl_compat.c>
+-long_double_symbol (libm, __fmodl, fmodl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_hypot_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __hypot, hypotl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_hypotl_compat.c>
+-long_double_symbol (libm, __hypotl, hypotl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_j0_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_j0_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_j0_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_j0_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_j0_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, j0, j0l, GLIBC_2_0);
+-compat_symbol (libm, y0, y0l, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_j0l_compat.c>
+-long_double_symbol (libm, __j0l, j0l);
+-long_double_symbol (libm, __y0l, y0l);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_j1_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_j1_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_j1_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_j1_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_j1_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, j1, j1l, GLIBC_2_0);
+-compat_symbol (libm, y1, y1l, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_j1l_compat.c>
+-long_double_symbol (libm, __j1l, j1l);
+-long_double_symbol (libm, __y1l, y1l);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_jn_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_jn_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_jn_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_jn_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_jn_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, jn, jnl, GLIBC_2_0);
+-compat_symbol (libm, yn, ynl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_jnl_compat.c>
+-long_double_symbol (libm, __jnl, jnl);
+-long_double_symbol (libm, __ynl, ynl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_lgammal_r_compat.c>
+-long_double_symbol (libm, __lgammal_r, lgammal_r);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_lgamma_r_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __lgamma_r, lgammal_r, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_log10_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log10_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_log10_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log10_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_log10_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __log10, log10l, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_log10l_compat.c>
+-long_double_symbol (libm, __log10l, log10l);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_log2_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log2_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_log2_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log2_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_log2_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __log2, log2l, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_log2l_compat.c>
+-long_double_symbol (libm, __log2l, log2l);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_log_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_log_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_log_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_log_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __log, logl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_logl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_logl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_logl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_logl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_logl_compat.c>
+-long_double_symbol (libm, __logl, logl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_pow_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_pow_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_pow_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_pow_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_pow_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __pow, powl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_powl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_powl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_powl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_powl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_powl_compat.c>
+-long_double_symbol (libm, __powl, powl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c 2017-10-22 17:02:23.606967252 +0000
+@@ -1,7 +1,6 @@
+ #include <math_ldbl_opt.h>
+ #include <math/w_remainder_compat.c>
+ #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __remainder, remainderl, GLIBC_2_0);
+ strong_alias (__remainder, __drem)
+ compat_symbol (libm, __drem, dreml, GLIBC_2_0);
+ #endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c 2017-10-22 17:02:23.606967252 +0000
+@@ -2,6 +2,18 @@
+ #undef weak_alias
+ #define weak_alias(n,a)
+ #include <math/w_remainderl_compat.c>
+-long_double_symbol (libm, __remainderl, remainderl);
++#if LIBM_SVID_COMPAT
++/* If ldbl-opt is used without special versioning for remainderl being
++ required, the generic code does not define remainderl because of
++ the undefine and redefine of weak_alias above. In any case, that
++ undefine and redefine mean _FloatN / _FloatNx aliases have not been
++ defined. */
++# undef weak_alias
++# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
++# if !LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
++weak_alias (__remainderl, remainderl)
++# endif
+ strong_alias (__remainderl, __dreml)
+ long_double_symbol (libm, __dreml, dreml);
++libm_alias_ldouble_other (__remainder, remainder)
++#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_sinh_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __sinh, sinhl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_sinhl_compat.c>
+-long_double_symbol (libm, __sinhl, sinhl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_sqrt_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+-compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_sqrtl_compat.c>
+-long_double_symbol (libm, __sqrtl, sqrtl);
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#include <math/w_tgamma_compat.c>
+-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+-compat_symbol (libm, __tgamma, tgammal, GLIBC_2_1);
+-#endif
+diff -purN glibc-org/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c glibc-2.26/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c
+--- glibc-org/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c 1970-01-01 00:00:00.000000000 +0000
+@@ -1,5 +0,0 @@
+-#include <math_ldbl_opt.h>
+-#undef weak_alias
+-#define weak_alias(n,a)
+-#include <math/w_tgammal_compat.c>
+-long_double_symbol (libm, __tgammal, tgammal);
+diff -purN glibc-org/sysdeps/ieee754/s_lib_version.c glibc-2.26/sysdeps/ieee754/s_lib_version.c
+--- glibc-org/sysdeps/ieee754/s_lib_version.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/s_lib_version.c 2017-10-22 17:02:23.606967252 +0000
+@@ -18,24 +18,13 @@ static char rcsid[] = "$NetBSD: s_lib_ve
+ * MACRO for standards
+ */
+
+-#include <math.h>
+-#include <math_private.h>
++#include <math-svid-compat.h>
+
+ /*
+ * define and initialize _LIB_VERSION
+ */
+-#ifdef _POSIX_MODE
++#undef _LIB_VERSION
++#if LIBM_SVID_COMPAT
+ _LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _POSIX_;
+-#else
+-#ifdef _XOPEN_MODE
+-_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _XOPEN_;
+-#else
+-#ifdef _SVID3_MODE
+-_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _SVID_;
+-#else /* default _IEEE_MODE */
+-_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _IEEE_;
++compat_symbol (libm, _LIB_VERSION_INTERNAL, _LIB_VERSION, GLIBC_2_0);
+ #endif
+-#endif
+-#endif
+-
+-weak_alias (_LIB_VERSION_INTERNAL, _LIB_VERSION)
+diff -purN glibc-org/sysdeps/ieee754/s_matherr.c glibc-2.26/sysdeps/ieee754/s_matherr.c
+--- glibc-org/sysdeps/ieee754/s_matherr.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/ieee754/s_matherr.c 2017-10-22 17:02:23.606967252 +0000
+@@ -14,9 +14,10 @@
+ static char rcsid[] = "$NetBSD: s_matherr.c,v 1.6 1995/05/10 20:47:53 jtc Exp $";
+ #endif
+
+-#include <math.h>
+-#include <math_private.h>
++#include <math-svid-compat.h>
+
++#undef matherr
++#if LIBM_SVID_COMPAT
+ int
+ weak_function
+ __matherr(struct exception *x)
+@@ -25,4 +26,5 @@ __matherr(struct exception *x)
+ if(x->arg1!=x->arg1) return 0;
+ return n;
+ }
+-weak_alias (__matherr, matherr)
++compat_symbol (libm, __matherr, matherr, GLIBC_2_0);
++#endif
+diff -purN glibc-org/sysdeps/x86/cpu-features.h glibc-2.26/sysdeps/x86/cpu-features.h
+--- glibc-org/sysdeps/x86/cpu-features.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86/cpu-features.h 2017-10-22 23:38:39.774900630 +0000
+@@ -40,6 +40,7 @@
+ #define bit_arch_Use_dl_runtime_resolve_opt (1 << 20)
+ #define bit_arch_Use_dl_runtime_resolve_slow (1 << 21)
+ #define bit_arch_Prefer_No_AVX512 (1 << 22)
++#define bit_arch_MathVec_Prefer_No_AVX512 (1 << 23)
+
+ /* CPUID Feature flags. */
+
+@@ -126,6 +127,7 @@
+ # define index_arch_Use_dl_runtime_resolve_opt FEATURE_INDEX_1*FEATURE_SIZE
+ # define index_arch_Use_dl_runtime_resolve_slow FEATURE_INDEX_1*FEATURE_SIZE
+ # define index_arch_Prefer_No_AVX512 FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_MathVec_Prefer_No_AVX512 FEATURE_INDEX_1*FEATURE_SIZE
+
+
+ # if defined (_LIBC) && !IS_IN (nonlib)
+@@ -329,6 +331,7 @@ extern const struct cpu_features *__get_
+ # define index_arch_Use_dl_runtime_resolve_opt FEATURE_INDEX_1
+ # define index_arch_Use_dl_runtime_resolve_slow FEATURE_INDEX_1
+ # define index_arch_Prefer_No_AVX512 FEATURE_INDEX_1
++# define index_arch_MathVec_Prefer_No_AVX512 FEATURE_INDEX_1
+
+ #endif /* !__ASSEMBLER__ */
+
+diff -purN glibc-org/sysdeps/x86/cpu-features.h~ glibc-2.26/sysdeps/x86/cpu-features.h~
+--- glibc-org/sysdeps/x86/cpu-features.h~ 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86/cpu-features.h~ 2017-10-22 23:23:09.000000000 +0000
+@@ -0,0 +1,365 @@
++/* This file is part of the GNU C Library.
++ Copyright (C) 2008-2017 Free Software Foundation, Inc.
++
++ 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/>. */
++
++#ifndef cpu_features_h
++#define cpu_features_h
++
++#define bit_arch_Fast_Rep_String (1 << 0)
++#define bit_arch_Fast_Copy_Backward (1 << 1)
++#define bit_arch_Slow_BSF (1 << 2)
++#define bit_arch_Fast_Unaligned_Load (1 << 4)
++#define bit_arch_Prefer_PMINUB_for_stringop (1 << 5)
++#define bit_arch_AVX_Usable (1 << 6)
++#define bit_arch_FMA_Usable (1 << 7)
++#define bit_arch_FMA4_Usable (1 << 8)
++#define bit_arch_Slow_SSE4_2 (1 << 9)
++#define bit_arch_AVX2_Usable (1 << 10)
++#define bit_arch_AVX_Fast_Unaligned_Load (1 << 11)
++#define bit_arch_AVX512F_Usable (1 << 12)
++#define bit_arch_AVX512DQ_Usable (1 << 13)
++#define bit_arch_I586 (1 << 14)
++#define bit_arch_I686 (1 << 15)
++#define bit_arch_Prefer_MAP_32BIT_EXEC (1 << 16)
++#define bit_arch_Prefer_No_VZEROUPPER (1 << 17)
++#define bit_arch_Fast_Unaligned_Copy (1 << 18)
++#define bit_arch_Prefer_ERMS (1 << 19)
++#define bit_arch_Use_dl_runtime_resolve_opt (1 << 20)
++#define bit_arch_Use_dl_runtime_resolve_slow (1 << 21)
++#define bit_arch_Prefer_No_AVX512 (1 << 22)
++#define bit_arch_MathVec_Prefer_No_AVX512 (1 << 23)
++
++/* CPUID Feature flags. */
++
++/* COMMON_CPUID_INDEX_1. */
++#define bit_cpu_CX8 (1 << 8)
++#define bit_cpu_CMOV (1 << 15)
++#define bit_cpu_SSE (1 << 25)
++#define bit_cpu_SSE2 (1 << 26)
++#define bit_cpu_SSSE3 (1 << 9)
++#define bit_cpu_SSE4_1 (1 << 19)
++#define bit_cpu_SSE4_2 (1 << 20)
++#define bit_cpu_OSXSAVE (1 << 27)
++#define bit_cpu_AVX (1 << 28)
++#define bit_cpu_POPCOUNT (1 << 23)
++#define bit_cpu_FMA (1 << 12)
++#define bit_cpu_FMA4 (1 << 16)
++#define bit_cpu_HTT (1 << 28)
++#define bit_cpu_LZCNT (1 << 5)
++#define bit_cpu_MOVBE (1 << 22)
++#define bit_cpu_POPCNT (1 << 23)
++
++/* COMMON_CPUID_INDEX_7. */
++#define bit_cpu_BMI1 (1 << 3)
++#define bit_cpu_BMI2 (1 << 8)
++#define bit_cpu_ERMS (1 << 9)
++#define bit_cpu_RTM (1 << 11)
++#define bit_cpu_AVX2 (1 << 5)
++#define bit_cpu_AVX512F (1 << 16)
++#define bit_cpu_AVX512DQ (1 << 17)
++#define bit_cpu_AVX512PF (1 << 26)
++#define bit_cpu_AVX512ER (1 << 27)
++#define bit_cpu_AVX512CD (1 << 28)
++#define bit_cpu_AVX512BW (1 << 30)
++#define bit_cpu_AVX512VL (1u << 31)
++
++/* XCR0 Feature flags. */
++#define bit_XMM_state (1 << 1)
++#define bit_YMM_state (1 << 2)
++#define bit_Opmask_state (1 << 5)
++#define bit_ZMM0_15_state (1 << 6)
++#define bit_ZMM16_31_state (1 << 7)
++
++/* The integer bit array index for the first set of internal feature bits. */
++#define FEATURE_INDEX_1 0
++
++/* The current maximum size of the feature integer bit array. */
++#define FEATURE_INDEX_MAX 1
++
++#ifdef __ASSEMBLER__
++
++# include <cpu-features-offsets.h>
++
++# define index_cpu_CX8 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET
++# define index_cpu_CMOV COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET
++# define index_cpu_SSE COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET
++# define index_cpu_SSE2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET
++# define index_cpu_SSSE3 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
++# define index_cpu_SSE4_1 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
++# define index_cpu_SSE4_2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
++# define index_cpu_AVX COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
++# define index_cpu_AVX2 COMMON_CPUID_INDEX_7*CPUID_SIZE+CPUID_EBX_OFFSET
++# define index_cpu_ERMS COMMON_CPUID_INDEX_7*CPUID_SIZE+CPUID_EBX_OFFSET
++# define index_cpu_MOVBE COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
++
++# define index_arch_Fast_Rep_String FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Fast_Copy_Backward FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Slow_BSF FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Prefer_PMINUB_for_stringop FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_AVX_Usable FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_FMA_Usable FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_FMA4_Usable FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Slow_SSE4_2 FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_AVX2_Usable FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_AVX_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_AVX512F_Usable FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_AVX512DQ_Usable FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_I586 FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_I686 FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Prefer_MAP_32BIT_EXEC FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Prefer_No_VZEROUPPER FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Fast_Unaligned_Copy FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Prefer_ERMS FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Use_dl_runtime_resolve_opt FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Use_dl_runtime_resolve_slow FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_Prefer_No_AVX512 FEATURE_INDEX_1*FEATURE_SIZE
++# define index_arch_MathVec_Prefer_No_AVX512 FEATURE_INDEX_1*FEATURE_SIZE
++
++
++# if defined (_LIBC) && !IS_IN (nonlib)
++# ifdef __x86_64__
++# ifdef SHARED
++# if IS_IN (rtld)
++# define LOAD_RTLD_GLOBAL_RO_RDX
++# define HAS_FEATURE(offset, field, name) \
++ testl $(bit_##field##_##name), \
++ _rtld_local_ro+offset+(index_##field##_##name)(%rip)
++# else
++# define LOAD_RTLD_GLOBAL_RO_RDX \
++ mov _rtld_global_ro@GOTPCREL(%rip), %RDX_LP
++# define HAS_FEATURE(offset, field, name) \
++ testl $(bit_##field##_##name), \
++ RTLD_GLOBAL_RO_DL_X86_CPU_FEATURES_OFFSET+offset+(index_##field##_##name)(%rdx)
++# endif
++# else /* SHARED */
++# define LOAD_RTLD_GLOBAL_RO_RDX
++# define HAS_FEATURE(offset, field, name) \
++ testl $(bit_##field##_##name), \
++ _dl_x86_cpu_features+offset+(index_##field##_##name)(%rip)
++# endif /* !SHARED */
++# else /* __x86_64__ */
++# ifdef SHARED
++# define LOAD_FUNC_GOT_EAX(func) \
++ leal func@GOTOFF(%edx), %eax
++# if IS_IN (rtld)
++# define LOAD_GOT_AND_RTLD_GLOBAL_RO \
++ LOAD_PIC_REG(dx)
++# define HAS_FEATURE(offset, field, name) \
++ testl $(bit_##field##_##name), \
++ offset+(index_##field##_##name)+_rtld_local_ro@GOTOFF(%edx)
++# else
++# define LOAD_GOT_AND_RTLD_GLOBAL_RO \
++ LOAD_PIC_REG(dx); \
++ mov _rtld_global_ro@GOT(%edx), %ecx
++# define HAS_FEATURE(offset, field, name) \
++ testl $(bit_##field##_##name), \
++ RTLD_GLOBAL_RO_DL_X86_CPU_FEATURES_OFFSET+offset+(index_##field##_##name)(%ecx)
++# endif
++# else /* SHARED */
++# define LOAD_FUNC_GOT_EAX(func) \
++ leal func, %eax
++# define LOAD_GOT_AND_RTLD_GLOBAL_RO
++# define HAS_FEATURE(offset, field, name) \
++ testl $(bit_##field##_##name), \
++ _dl_x86_cpu_features+offset+(index_##field##_##name)
++# endif /* !SHARED */
++# endif /* !__x86_64__ */
++# else /* _LIBC && !nonlib */
++# error "Sorry, <cpu-features.h> is unimplemented for assembler"
++# endif /* !_LIBC || nonlib */
++
++/* HAS_* evaluates to true if we may use the feature at runtime. */
++# define HAS_CPU_FEATURE(name) HAS_FEATURE (CPUID_OFFSET, cpu, name)
++# define HAS_ARCH_FEATURE(name) HAS_FEATURE (FEATURE_OFFSET, arch, name)
++
++#else /* __ASSEMBLER__ */
++
++enum
++ {
++ COMMON_CPUID_INDEX_1 = 0,
++ COMMON_CPUID_INDEX_7,
++ COMMON_CPUID_INDEX_80000001, /* for AMD */
++ /* Keep the following line at the end. */
++ COMMON_CPUID_INDEX_MAX
++ };
++
++struct cpu_features
++{
++ enum cpu_features_kind
++ {
++ arch_kind_unknown = 0,
++ arch_kind_intel,
++ arch_kind_amd,
++ arch_kind_other
++ } kind;
++ int max_cpuid;
++ struct cpuid_registers
++ {
++ unsigned int eax;
++ unsigned int ebx;
++ unsigned int ecx;
++ unsigned int edx;
++ } cpuid[COMMON_CPUID_INDEX_MAX];
++ unsigned int family;
++ unsigned int model;
++ unsigned int feature[FEATURE_INDEX_MAX];
++ /* Data cache size for use in memory and string routines, typically
++ L1 size. */
++ unsigned long int data_cache_size;
++ /* Shared cache size for use in memory and string routines, typically
++ L2 or L3 size. */
++ unsigned long int shared_cache_size;
++ /* Threshold to use non temporal store. */
++ unsigned long int non_temporal_threshold;
++};
++
++/* Used from outside of glibc to get access to the CPU features
++ structure. */
++extern const struct cpu_features *__get_cpu_features (void)
++ __attribute__ ((const));
++
++# if defined (_LIBC) && !IS_IN (nonlib)
++/* Unused for x86. */
++# define INIT_ARCH()
++# define __get_cpu_features() (&GLRO(dl_x86_cpu_features))
++# endif
++
++
++/* Only used directly in cpu-features.c. */
++# define CPU_FEATURES_CPU_P(ptr, name) \
++ ((ptr->cpuid[index_cpu_##name].reg_##name & (bit_cpu_##name)) != 0)
++# define CPU_FEATURES_ARCH_P(ptr, name) \
++ ((ptr->feature[index_arch_##name] & (bit_arch_##name)) != 0)
++
++/* HAS_* evaluates to true if we may use the feature at runtime. */
++# define HAS_CPU_FEATURE(name) \
++ CPU_FEATURES_CPU_P (__get_cpu_features (), name)
++# define HAS_ARCH_FEATURE(name) \
++ CPU_FEATURES_ARCH_P (__get_cpu_features (), name)
++
++# define index_cpu_CX8 COMMON_CPUID_INDEX_1
++# define index_cpu_CMOV COMMON_CPUID_INDEX_1
++# define index_cpu_SSE COMMON_CPUID_INDEX_1
++# define index_cpu_SSE2 COMMON_CPUID_INDEX_1
++# define index_cpu_SSSE3 COMMON_CPUID_INDEX_1
++# define index_cpu_SSE4_1 COMMON_CPUID_INDEX_1
++# define index_cpu_SSE4_2 COMMON_CPUID_INDEX_1
++# define index_cpu_AVX COMMON_CPUID_INDEX_1
++# define index_cpu_AVX2 COMMON_CPUID_INDEX_7
++# define index_cpu_AVX512F COMMON_CPUID_INDEX_7
++# define index_cpu_AVX512DQ COMMON_CPUID_INDEX_7
++# define index_cpu_AVX512PF COMMON_CPUID_INDEX_7
++# define index_cpu_AVX512ER COMMON_CPUID_INDEX_7
++# define index_cpu_AVX512CD COMMON_CPUID_INDEX_7
++# define index_cpu_AVX512BW COMMON_CPUID_INDEX_7
++# define index_cpu_AVX512VL COMMON_CPUID_INDEX_7
++# define index_cpu_ERMS COMMON_CPUID_INDEX_7
++# define index_cpu_RTM COMMON_CPUID_INDEX_7
++# define index_cpu_FMA COMMON_CPUID_INDEX_1
++# define index_cpu_FMA4 COMMON_CPUID_INDEX_80000001
++# define index_cpu_POPCOUNT COMMON_CPUID_INDEX_1
++# define index_cpu_OSXSAVE COMMON_CPUID_INDEX_1
++# define index_cpu_HTT COMMON_CPUID_INDEX_1
++# define index_cpu_BMI1 COMMON_CPUID_INDEX_7
++# define index_cpu_BMI2 COMMON_CPUID_INDEX_7
++# define index_cpu_LZCNT COMMON_CPUID_INDEX_1
++# define index_cpu_MOVBE COMMON_CPUID_INDEX_1
++# define index_cpu_POPCNT COMMON_CPUID_INDEX_1
++
++# define reg_CX8 edx
++# define reg_CMOV edx
++# define reg_SSE edx
++# define reg_SSE2 edx
++# define reg_SSSE3 ecx
++# define reg_SSE4_1 ecx
++# define reg_SSE4_2 ecx
++# define reg_AVX ecx
++# define reg_AVX2 ebx
++# define reg_AVX512F ebx
++# define reg_AVX512DQ ebx
++# define reg_AVX512PF ebx
++# define reg_AVX512ER ebx
++# define reg_AVX512CD ebx
++# define reg_AVX512BW ebx
++# define reg_AVX512VL ebx
++# define reg_ERMS ebx
++# define reg_RTM ebx
++# define reg_FMA ecx
++# define reg_FMA4 ecx
++# define reg_POPCOUNT ecx
++# define reg_OSXSAVE ecx
++# define reg_HTT edx
++# define reg_BMI1 ebx
++# define reg_BMI2 ebx
++# define reg_LZCNT ecx
++# define reg_MOVBE ecx
++# define reg_POPCNT ecx
++
++# define index_arch_Fast_Rep_String FEATURE_INDEX_1
++# define index_arch_Fast_Copy_Backward FEATURE_INDEX_1
++# define index_arch_Slow_BSF FEATURE_INDEX_1
++# define index_arch_Fast_Unaligned_Load FEATURE_INDEX_1
++# define index_arch_Prefer_PMINUB_for_stringop FEATURE_INDEX_1
++# define index_arch_AVX_Usable FEATURE_INDEX_1
++# define index_arch_FMA_Usable FEATURE_INDEX_1
++# define index_arch_FMA4_Usable FEATURE_INDEX_1
++# define index_arch_Slow_SSE4_2 FEATURE_INDEX_1
++# define index_arch_AVX2_Usable FEATURE_INDEX_1
++# define index_arch_AVX_Fast_Unaligned_Load FEATURE_INDEX_1
++# define index_arch_AVX512F_Usable FEATURE_INDEX_1
++# define index_arch_AVX512DQ_Usable FEATURE_INDEX_1
++# define index_arch_I586 FEATURE_INDEX_1
++# define index_arch_I686 FEATURE_INDEX_1
++# define index_arch_Prefer_MAP_32BIT_EXEC FEATURE_INDEX_1
++# define index_arch_Prefer_No_VZEROUPPER FEATURE_INDEX_1
++# define index_arch_Fast_Unaligned_Copy FEATURE_INDEX_1
++# define index_arch_Prefer_ERMS FEATURE_INDEX_1
++# define index_arch_Use_dl_runtime_resolve_opt FEATURE_INDEX_1
++# define index_arch_Use_dl_runtime_resolve_slow FEATURE_INDEX_1
++# define index_arch_Prefer_No_AVX512 FEATURE_INDEX_1
++
++#endif /* !__ASSEMBLER__ */
++
++#ifdef __x86_64__
++# define HAS_CPUID 1
++#elif defined __i586__ || defined __pentium__
++# define HAS_CPUID 1
++# define HAS_I586 1
++# define HAS_I686 HAS_ARCH_FEATURE (I686)
++#elif (defined __i686__ || defined __pentiumpro__ \
++ || defined __pentium4__ || defined __nocona__ \
++ || defined __atom__ || defined __core2__ \
++ || defined __corei7__ || defined __corei7_avx__ \
++ || defined __core_avx2__ || defined __nehalem__ \
++ || defined __sandybridge__ || defined __haswell__ \
++ || defined __knl__ || defined __bonnell__ \
++ || defined __silvermont__ \
++ || defined __k6__ || defined __k8__ \
++ || defined __athlon__ || defined __amdfam10__ \
++ || defined __bdver1__ || defined __bdver2__ \
++ || defined __bdver3__ || defined __bdver4__ \
++ || defined __btver1__ || defined __btver2__)
++# define HAS_CPUID 1
++# define HAS_I586 1
++# define HAS_I686 1
++#else
++# define HAS_CPUID 0
++# define HAS_I586 HAS_ARCH_FEATURE (I586)
++# define HAS_I686 HAS_ARCH_FEATURE (I686)
++#endif
++
++#endif /* cpu_features_h */
+diff -purN glibc-org/sysdeps/x86_64/fpu/e_expf.S glibc-2.26/sysdeps/x86_64/fpu/e_expf.S
+--- glibc-org/sysdeps/x86_64/fpu/e_expf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/e_expf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,339 +0,0 @@
+-/* Optimized __ieee754_expf function.
+- Copyright (C) 2012-2017 Free Software Foundation, Inc.
+- Contributed by Intel Corporation.
+- 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 <sysdep.h>
+-
+-/* Short algorithm description:
+- *
+- * Let K = 64 (table size).
+- * e^x = 2^(x/log(2)) = 2^n * T[j] * (1 + P(y))
+- * where
+- * x = m*log(2)/K + y, y in [0.0..log(2)/K]
+- * m = n*K + j, m,n,j - signed integer, j in [0..K-1]
+- * values of 2^(j/K) are tabulated as T[j].
+- *
+- * P(y) is a minimax polynomial approximation of expf(x)-1
+- * on small interval [0.0..log(2)/K].
+- *
+- * P(y) = P3*y*y*y*y + P2*y*y*y + P1*y*y + P0*y, calculated as
+- * z = y*y; P(y) = (P3*z + P1)*z + (P2*z + P0)*y
+- *
+- * Special cases:
+- * expf(NaN) = NaN
+- * expf(+INF) = +INF
+- * expf(-INF) = 0
+- * expf(x) = 1 for subnormals
+- * for finite argument, only expf(0)=1 is exact
+- * expf(x) overflows if x>88.7228317260742190
+- * expf(x) underflows if x<-103.972076416015620
+- */
+-
+- .text
+-ENTRY(__ieee754_expf)
+- /* Input: single precision x in %xmm0 */
+- cvtss2sd %xmm0, %xmm1 /* Convert x to double precision */
+- movd %xmm0, %ecx /* Copy x */
+- movsd L(DP_KLN2)(%rip), %xmm2 /* DP K/log(2) */
+- movsd L(DP_P2)(%rip), %xmm3 /* DP P2 */
+- movl %ecx, %eax /* x */
+- mulsd %xmm1, %xmm2 /* DP x*K/log(2) */
+- andl $0x7fffffff, %ecx /* |x| */
+- lea L(DP_T)(%rip), %rsi /* address of table T[j] */
+- cmpl $0x42ad496b, %ecx /* |x|<125*log(2) ? */
+- movsd L(DP_P3)(%rip), %xmm4 /* DP P3 */
+- addsd L(DP_RS)(%rip), %xmm2 /* DP x*K/log(2)+RS */
+- jae L(special_paths)
+-
+- /* Here if |x|<125*log(2) */
+- cmpl $0x31800000, %ecx /* |x|<2^(-28) ? */
+- jb L(small_arg)
+-
+- /* Main path: here if 2^(-28)<=|x|<125*log(2) */
+- cvtsd2ss %xmm2, %xmm2 /* SP x*K/log(2)+RS */
+- movd %xmm2, %eax /* bits of n*K+j with trash */
+- subss L(SP_RS)(%rip), %xmm2 /* SP t=round(x*K/log(2)) */
+- movl %eax, %edx /* n*K+j with trash */
+- cvtss2sd %xmm2, %xmm2 /* DP t */
+- andl $0x3f, %eax /* bits of j */
+- mulsd L(DP_NLN2K)(%rip), %xmm2/* DP -t*log(2)/K */
+- andl $0xffffffc0, %edx /* bits of n */
+-#ifdef __AVX__
+- vaddsd %xmm1, %xmm2, %xmm0 /* DP y=x-t*log(2)/K */
+- vmulsd %xmm0, %xmm0, %xmm2 /* DP z=y*y */
+-#else
+- addsd %xmm1, %xmm2 /* DP y=x-t*log(2)/K */
+- movaps %xmm2, %xmm0 /* DP y */
+- mulsd %xmm2, %xmm2 /* DP z=y*y */
+-#endif
+- mulsd %xmm2, %xmm4 /* DP P3*z */
+- addl $0x1fc0, %edx /* bits of n + SP exponent bias */
+- mulsd %xmm2, %xmm3 /* DP P2*z */
+- shll $17, %edx /* SP 2^n */
+- addsd L(DP_P1)(%rip), %xmm4 /* DP P3*z+P1 */
+- addsd L(DP_P0)(%rip), %xmm3 /* DP P2*z+P0 */
+- movd %edx, %xmm1 /* SP 2^n */
+- mulsd %xmm2, %xmm4 /* DP (P3*z+P1)*z */
+- mulsd %xmm3, %xmm0 /* DP (P2*z+P0)*y */
+- addsd %xmm4, %xmm0 /* DP P(y) */
+- mulsd (%rsi,%rax,8), %xmm0 /* DP P(y)*T[j] */
+- addsd (%rsi,%rax,8), %xmm0 /* DP T[j]*(P(y)+1) */
+- cvtsd2ss %xmm0, %xmm0 /* SP T[j]*(P(y)+1) */
+- mulss %xmm1, %xmm0 /* SP result=2^n*(T[j]*(P(y)+1)) */
+- ret
+-
+- .p2align 4
+-L(small_arg):
+- /* Here if 0<=|x|<2^(-28) */
+- addss L(SP_ONE)(%rip), %xmm0 /* 1.0 + x */
+- /* Return 1.0 with inexact raised, except for x==0 */
+- ret
+-
+- .p2align 4
+-L(special_paths):
+- /* Here if 125*log(2)<=|x| */
+- shrl $31, %eax /* Get sign bit of x, and depending on it: */
+- lea L(SP_RANGE)(%rip), %rdx /* load over/underflow bound */
+- cmpl (%rdx,%rax,4), %ecx /* |x|<under/overflow bound ? */
+- jbe L(near_under_or_overflow)
+-
+- /* Here if |x|>under/overflow bound */
+- cmpl $0x7f800000, %ecx /* |x| is finite ? */
+- jae L(arg_inf_or_nan)
+-
+- /* Here if |x|>under/overflow bound, and x is finite */
+- testq %rax, %rax /* sign of x nonzero ? */
+- je L(res_overflow)
+-
+- /* Here if -inf<x<underflow bound (x<0) */
+- movss L(SP_SMALL)(%rip), %xmm0/* load small value 2^(-100) */
+- mulss %xmm0, %xmm0 /* Return underflowed result (zero or subnormal) */
+- ret
+-
+- .p2align 4
+-L(res_overflow):
+- /* Here if overflow bound<x<inf (x>0) */
+- movss L(SP_LARGE)(%rip), %xmm0/* load large value 2^100 */
+- mulss %xmm0, %xmm0 /* Return overflowed result (Inf or max normal) */
+- ret
+-
+- .p2align 4
+-L(arg_inf_or_nan):
+- /* Here if |x| is Inf or NAN */
+- jne L(arg_nan) /* |x| is Inf ? */
+-
+- /* Here if |x| is Inf */
+- lea L(SP_INF_0)(%rip), %rdx /* depending on sign of x: */
+- movss (%rdx,%rax,4), %xmm0 /* return zero or Inf */
+- ret
+-
+- .p2align 4
+-L(arg_nan):
+- /* Here if |x| is NaN */
+- addss %xmm0, %xmm0 /* Return x+x (raise invalid) */
+- ret
+-
+- .p2align 4
+-L(near_under_or_overflow):
+- /* Here if 125*log(2)<=|x|<under/overflow bound */
+- cvtsd2ss %xmm2, %xmm2 /* SP x*K/log(2)+RS */
+- movd %xmm2, %eax /* bits of n*K+j with trash */
+- subss L(SP_RS)(%rip), %xmm2 /* SP t=round(x*K/log(2)) */
+- movl %eax, %edx /* n*K+j with trash */
+- cvtss2sd %xmm2, %xmm2 /* DP t */
+- andl $0x3f, %eax /* bits of j */
+- mulsd L(DP_NLN2K)(%rip), %xmm2/* DP -t*log(2)/K */
+- andl $0xffffffc0, %edx /* bits of n */
+-#ifdef __AVX__
+- vaddsd %xmm1, %xmm2, %xmm0 /* DP y=x-t*log(2)/K */
+- vmulsd %xmm0, %xmm0, %xmm2 /* DP z=y*y */
+-#else
+- addsd %xmm1, %xmm2 /* DP y=x-t*log(2)/K */
+- movaps %xmm2, %xmm0 /* DP y */
+- mulsd %xmm2, %xmm2 /* DP z=y*y */
+-#endif
+- mulsd %xmm2, %xmm4 /* DP P3*z */
+- addl $0xffc0, %edx /* bits of n + DP exponent bias */
+- mulsd %xmm2, %xmm3 /* DP P2*z */
+- shlq $46, %rdx /* DP 2^n */
+- addsd L(DP_P1)(%rip), %xmm4 /* DP P3*z+P1 */
+- addsd L(DP_P0)(%rip), %xmm3 /* DP P2*z+P0 */
+- movd %rdx, %xmm1 /* DP 2^n */
+- mulsd %xmm2, %xmm4 /* DP (P3*z+P1)*z */
+- mulsd %xmm3, %xmm0 /* DP (P2*z+P0)*y */
+- addsd %xmm4, %xmm0 /* DP P(y) */
+- mulsd (%rsi,%rax,8), %xmm0 /* DP P(y)*T[j] */
+- addsd (%rsi,%rax,8), %xmm0 /* DP T[j]*(P(y)+1) */
+- mulsd %xmm1, %xmm0 /* DP result=2^n*(T[j]*(P(y)+1)) */
+- cvtsd2ss %xmm0, %xmm0 /* convert result to single precision */
+- ret
+-END(__ieee754_expf)
+-
+- .section .rodata, "a"
+- .p2align 3
+-L(DP_T): /* table of double precision values 2^(j/K) for j=[0..K-1] */
+- .long 0x00000000, 0x3ff00000
+- .long 0x3e778061, 0x3ff02c9a
+- .long 0xd3158574, 0x3ff059b0
+- .long 0x18759bc8, 0x3ff08745
+- .long 0x6cf9890f, 0x3ff0b558
+- .long 0x32d3d1a2, 0x3ff0e3ec
+- .long 0xd0125b51, 0x3ff11301
+- .long 0xaea92de0, 0x3ff1429a
+- .long 0x3c7d517b, 0x3ff172b8
+- .long 0xeb6fcb75, 0x3ff1a35b
+- .long 0x3168b9aa, 0x3ff1d487
+- .long 0x88628cd6, 0x3ff2063b
+- .long 0x6e756238, 0x3ff2387a
+- .long 0x65e27cdd, 0x3ff26b45
+- .long 0xf51fdee1, 0x3ff29e9d
+- .long 0xa6e4030b, 0x3ff2d285
+- .long 0x0a31b715, 0x3ff306fe
+- .long 0xb26416ff, 0x3ff33c08
+- .long 0x373aa9cb, 0x3ff371a7
+- .long 0x34e59ff7, 0x3ff3a7db
+- .long 0x4c123422, 0x3ff3dea6
+- .long 0x21f72e2a, 0x3ff4160a
+- .long 0x6061892d, 0x3ff44e08
+- .long 0xb5c13cd0, 0x3ff486a2
+- .long 0xd5362a27, 0x3ff4bfda
+- .long 0x769d2ca7, 0x3ff4f9b2
+- .long 0x569d4f82, 0x3ff5342b
+- .long 0x36b527da, 0x3ff56f47
+- .long 0xdd485429, 0x3ff5ab07
+- .long 0x15ad2148, 0x3ff5e76f
+- .long 0xb03a5585, 0x3ff6247e
+- .long 0x82552225, 0x3ff66238
+- .long 0x667f3bcd, 0x3ff6a09e
+- .long 0x3c651a2f, 0x3ff6dfb2
+- .long 0xe8ec5f74, 0x3ff71f75
+- .long 0x564267c9, 0x3ff75feb
+- .long 0x73eb0187, 0x3ff7a114
+- .long 0x36cf4e62, 0x3ff7e2f3
+- .long 0x994cce13, 0x3ff82589
+- .long 0x9b4492ed, 0x3ff868d9
+- .long 0x422aa0db, 0x3ff8ace5
+- .long 0x99157736, 0x3ff8f1ae
+- .long 0xb0cdc5e5, 0x3ff93737
+- .long 0x9fde4e50, 0x3ff97d82
+- .long 0x82a3f090, 0x3ff9c491
+- .long 0x7b5de565, 0x3ffa0c66
+- .long 0xb23e255d, 0x3ffa5503
+- .long 0x5579fdbf, 0x3ffa9e6b
+- .long 0x995ad3ad, 0x3ffae89f
+- .long 0xb84f15fb, 0x3ffb33a2
+- .long 0xf2fb5e47, 0x3ffb7f76
+- .long 0x904bc1d2, 0x3ffbcc1e
+- .long 0xdd85529c, 0x3ffc199b
+- .long 0x2e57d14b, 0x3ffc67f1
+- .long 0xdcef9069, 0x3ffcb720
+- .long 0x4a07897c, 0x3ffd072d
+- .long 0xdcfba487, 0x3ffd5818
+- .long 0x03db3285, 0x3ffda9e6
+- .long 0x337b9b5f, 0x3ffdfc97
+- .long 0xe78b3ff6, 0x3ffe502e
+- .long 0xa2a490da, 0x3ffea4af
+- .long 0xee615a27, 0x3ffefa1b
+- .long 0x5b6e4540, 0x3fff5076
+- .long 0x819e90d8, 0x3fffa7c1
+- .type L(DP_T), @object
+- ASM_SIZE_DIRECTIVE(L(DP_T))
+-
+- .section .rodata.cst8,"aM",@progbits,8
+- .p2align 3
+-L(DP_KLN2): /* double precision K/log(2) */
+- .long 0x652b82fe, 0x40571547
+- .type L(DP_KLN2), @object
+- ASM_SIZE_DIRECTIVE(L(DP_KLN2))
+-
+- .p2align 3
+-L(DP_NLN2K): /* double precision -log(2)/K */
+- .long 0xfefa39ef, 0xbf862e42
+- .type L(DP_NLN2K), @object
+- ASM_SIZE_DIRECTIVE(L(DP_NLN2K))
+-
+- .p2align 3
+-L(DP_RS): /* double precision 2^23+2^22 */
+- .long 0x00000000, 0x41680000
+- .type L(DP_RS), @object
+- ASM_SIZE_DIRECTIVE(L(DP_RS))
+-
+- .p2align 3
+-L(DP_P3): /* double precision polynomial coefficient P3 */
+- .long 0xeb78fa85, 0x3fa56420
+- .type L(DP_P3), @object
+- ASM_SIZE_DIRECTIVE(L(DP_P3))
+-
+- .p2align 3
+-L(DP_P1): /* double precision polynomial coefficient P1 */
+- .long 0x008d6118, 0x3fe00000
+- .type L(DP_P1), @object
+- ASM_SIZE_DIRECTIVE(L(DP_P1))
+-
+- .p2align 3
+-L(DP_P2): /* double precision polynomial coefficient P2 */
+- .long 0xda752d4f, 0x3fc55550
+- .type L(DP_P2), @object
+- ASM_SIZE_DIRECTIVE(L(DP_P2))
+-
+- .p2align 3
+-L(DP_P0): /* double precision polynomial coefficient P0 */
+- .long 0xffffe7c6, 0x3fefffff
+- .type L(DP_P0), @object
+- ASM_SIZE_DIRECTIVE(L(DP_P0))
+-
+- .p2align 2
+-L(SP_RANGE): /* single precision overflow/underflow bounds */
+- .long 0x42b17217 /* if x>this bound, then result overflows */
+- .long 0x42cff1b4 /* if x<this bound, then result underflows */
+- .type L(SP_RANGE), @object
+- ASM_SIZE_DIRECTIVE(L(SP_RANGE))
+-
+- .p2align 2
+-L(SP_INF_0):
+- .long 0x7f800000 /* single precision Inf */
+- .long 0 /* single precision zero */
+- .type L(SP_INF_0), @object
+- ASM_SIZE_DIRECTIVE(L(SP_INF_0))
+-
+- .section .rodata.cst4,"aM",@progbits,4
+- .p2align 2
+-L(SP_RS): /* single precision 2^23+2^22 */
+- .long 0x4b400000
+- .type L(SP_RS), @object
+- ASM_SIZE_DIRECTIVE(L(SP_RS))
+-
+- .p2align 2
+-L(SP_SMALL): /* single precision small value 2^(-100) */
+- .long 0x0d800000
+- .type L(SP_SMALL), @object
+- ASM_SIZE_DIRECTIVE(L(SP_SMALL))
+-
+- .p2align 2
+-L(SP_LARGE): /* single precision large value 2^100 */
+- .long 0x71800000
+- .type L(SP_LARGE), @object
+- ASM_SIZE_DIRECTIVE(L(SP_LARGE))
+-
+- .p2align 2
+-L(SP_ONE): /* single precision 1.0 */
+- .long 0x3f800000
+- .type L(SP_ONE), @object
+- ASM_SIZE_DIRECTIVE(L(SP_ONE))
+-
+-strong_alias (__ieee754_expf, __expf_finite)
+diff -purN glibc-org/sysdeps/x86_64/fpu/libm-test-ulps glibc-2.26/sysdeps/x86_64/fpu/libm-test-ulps
+--- glibc-org/sysdeps/x86_64/fpu/libm-test-ulps 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/libm-test-ulps 2017-10-22 17:02:23.627967252 +0000
+@@ -1143,10 +1143,10 @@ ldouble: 2
+
+ Function: Real part of "clog10_downward":
+ double: 5
+-float: 4
++float: 5
+ float128: 3
+ idouble: 5
+-ifloat: 4
++ifloat: 5
+ ifloat128: 3
+ ildouble: 8
+ ldouble: 8
+@@ -1305,7 +1305,7 @@ Function: "cos_vlen4_avx2":
+ double: 2
+
+ Function: "cos_vlen8":
+-double: 1
++double: 2
+ float: 1
+
+ Function: "cos_vlen8_avx2":
+@@ -1733,10 +1733,10 @@ ldouble: 3
+
+ Function: Imaginary part of "ctan_upward":
+ double: 2
+-float: 1
++float: 2
+ float128: 5
+ idouble: 2
+-ifloat: 1
++ifloat: 2
+ ifloat128: 5
+ ildouble: 3
+ ldouble: 3
+@@ -1987,13 +1987,17 @@ ldouble: 1
+
+ Function: "exp_downward":
+ double: 1
++float: 1
+ idouble: 1
++ifloat: 1
+ ildouble: 1
+ ldouble: 1
+
+ Function: "exp_towardzero":
+ double: 1
++float: 1
+ idouble: 1
++ifloat: 1
+ ildouble: 2
+ ldouble: 2
+
+@@ -2471,36 +2475,6 @@ ifloat128: 2
+ ildouble: 1
+ ldouble: 1
+
+-Function: "pow10":
+-double: 2
+-idouble: 2
+-ildouble: 1
+-ldouble: 1
+-
+-Function: "pow10_downward":
+-double: 2
+-float: 1
+-idouble: 2
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+-Function: "pow10_towardzero":
+-double: 2
+-float: 1
+-idouble: 2
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+-Function: "pow10_upward":
+-double: 2
+-float: 1
+-idouble: 2
+-ifloat: 1
+-ildouble: 2
+-ldouble: 2
+-
+ Function: "pow_downward":
+ double: 1
+ float: 1
+@@ -2645,7 +2619,7 @@ Function: "sincos_vlen4_avx2":
+ double: 2
+
+ Function: "sincos_vlen8":
+-double: 1
++double: 2
+ float: 1
+
+ Function: "sincos_vlen8_avx2":
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/doasin-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/doasin-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/doasin-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/doasin-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,4 @@
++#define __doasin __doasin_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/doasin.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/dosincos-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/dosincos-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/dosincos-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/dosincos-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,6 @@
++#define __docos __docos_fma
++#define __dubcos __dubcos_fma
++#define __dubsin __dubsin_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/dosincos.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_asin.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_asin.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_asin.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_asin.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,26 +1,40 @@
+-#include <init-arch.h>
+-#include <math.h>
+-#include <math_private.h>
+-
+-extern double __ieee754_acos_sse2 (double);
+-extern double __ieee754_asin_sse2 (double);
+-extern double __ieee754_acos_fma4 (double);
+-extern double __ieee754_asin_fma4 (double);
+-
+-libm_ifunc (__ieee754_acos,
+- HAS_ARCH_FEATURE (FMA4_Usable)
+- ? __ieee754_acos_fma4
+- : __ieee754_acos_sse2);
+-strong_alias (__ieee754_acos, __acos_finite)
++/* Multiple versions of IEEE 754 asin and acos.
++ Copyright (C) 2017 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/>. */
++
++extern double __redirect_ieee754_asin (double);
++extern double __redirect_ieee754_acos (double);
++
++#define SYMBOL_NAME ieee754_asin
++#include "ifunc-fma4.h"
+
+-libm_ifunc (__ieee754_asin,
+- HAS_ARCH_FEATURE (FMA4_Usable)
+- ? __ieee754_asin_fma4
+- : __ieee754_asin_sse2);
++libc_ifunc_redirected (__redirect_ieee754_asin, __ieee754_asin,
++ IFUNC_SELECTOR ());
+ strong_alias (__ieee754_asin, __asin_finite)
+
+-#define __ieee754_acos __ieee754_acos_sse2
+-#define __ieee754_asin __ieee754_asin_sse2
++#undef SYMBOL_NAME
++#define SYMBOL_NAME ieee754_acos
++#include "ifunc-fma4.h"
++
++libc_ifunc_redirected (__redirect_ieee754_acos, __ieee754_acos,
++ IFUNC_SELECTOR ());
++strong_alias (__ieee754_acos, __acos_finite)
+
+
++#define __ieee754_acos __ieee754_acos_sse2
++#define __ieee754_asin __ieee754_asin_sse2
+ #include <sysdeps/ieee754/dbl-64/e_asin.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_asin-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_asin-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_asin-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_asin-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,11 @@
++#define __ieee754_acos __ieee754_acos_fma
++#define __ieee754_asin __ieee754_asin_fma
++#define __cos32 __cos32_fma
++#define __doasin __doasin_fma
++#define __docos __docos_fma
++#define __dubcos __dubcos_fma
++#define __dubsin __dubsin_fma
++#define __sin32 __sin32_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/e_asin.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_atan2.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_atan2.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_atan2.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_atan2.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,18 +1,29 @@
+-#include <init-arch.h>
+-#include <math.h>
+-#include <math_private.h>
+-
+-extern double __ieee754_atan2_sse2 (double, double);
+-extern double __ieee754_atan2_avx (double, double);
+-extern double __ieee754_atan2_fma4 (double, double);
+-
+-libm_ifunc (__ieee754_atan2,
+- HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_atan2_fma4
+- : (HAS_ARCH_FEATURE (AVX_Usable)
+- ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
+-strong_alias (__ieee754_atan2, __atan2_finite)
++/* Multiple versions of IEEE 754 atan.
++ Copyright (C) 2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
+
+-#define __ieee754_atan2 __ieee754_atan2_sse2
++ 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/>. */
+
++extern double __redirect_ieee754_atan2 (double, double);
+
++#define SYMBOL_NAME ieee754_atan2
++#include "ifunc-avx-fma4.h"
++
++libc_ifunc_redirected (__redirect_ieee754_atan2,
++ __ieee754_atan2, IFUNC_SELECTOR ());
++strong_alias (__ieee754_atan2, __atan2_finite)
++
++#define __ieee754_atan2 __ieee754_atan2_sse2
+ #include <sysdeps/ieee754/dbl-64/e_atan2.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,10 @@
++#define __ieee754_atan2 __ieee754_atan2_fma
++#define __add __add_fma
++#define __dbl_mp __dbl_mp_fma
++#define __dvd __dvd_fma
++#define __mpatan2 __mpatan2_fma
++#define __mul __mul_fma
++#define __sub __sub_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/e_atan2.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_exp2f.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_exp2f.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_exp2f.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_exp2f.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,37 @@
++/* Multiple versions of exp2f.
++ Copyright (C) 2017 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/>. */
++
++extern float __redirect_exp2f (float);
++
++#define SYMBOL_NAME exp2f
++#include "ifunc-fma.h"
++
++libc_ifunc_redirected (__redirect_exp2f, __exp2f, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++# include <shlib-compat.h>
++versioned_symbol (libm, __exp2f, exp2f, GLIBC_2_27);
++#else
++weak_alias (__exp2f, exp2f)
++#endif
++
++strong_alias (__exp2f, __ieee754_exp2f)
++strong_alias (__exp2f, __exp2f_finite)
++
++#define __exp2f __exp2f_sse2
++#include <sysdeps/ieee754/flt-32/e_exp2f.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_exp2f-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,3 @@
++#define __exp2f __exp2f_fma
++
++#include <sysdeps/ieee754/flt-32/e_exp2f.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_exp.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_exp.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_exp.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_exp.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,18 +1,29 @@
+-#include <init-arch.h>
+-#include <math.h>
+-#include <math_private.h>
+-
+-extern double __ieee754_exp_sse2 (double);
+-extern double __ieee754_exp_avx (double);
+-extern double __ieee754_exp_fma4 (double);
+-
+-libm_ifunc (__ieee754_exp,
+- HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_exp_fma4
+- : (HAS_ARCH_FEATURE (AVX_Usable)
+- ? __ieee754_exp_avx : __ieee754_exp_sse2));
+-strong_alias (__ieee754_exp, __exp_finite)
++/* Multiple versions of IEEE 754 exp.
++ Copyright (C) 2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
+
+-#define __ieee754_exp __ieee754_exp_sse2
++ 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/>. */
+
++extern double __redirect_ieee754_exp (double);
+
++#define SYMBOL_NAME ieee754_exp
++#include "ifunc-avx-fma4.h"
++
++libc_ifunc_redirected (__redirect_ieee754_exp, __ieee754_exp,
++ IFUNC_SELECTOR ());
++strong_alias (__ieee754_exp, __exp_finite)
++
++#define __ieee754_exp __ieee754_exp_sse2
+ #include <sysdeps/ieee754/dbl-64/e_exp.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_expf.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_expf.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_expf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_expf.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,40 @@
++/* Multiple versions of expf.
++ Copyright (C) 2017 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/>. */
++
++extern float __redirect_expf (float);
++
++#define SYMBOL_NAME expf
++#include "ifunc-fma.h"
++
++libc_ifunc_redirected (__redirect_expf, __expf, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (__expf, __GI___expf, __redirect_expf)
++ __attribute__ ((visibility ("hidden")));
++
++# include <shlib-compat.h>
++versioned_symbol (libm, __expf, expf, GLIBC_2_27);
++#else
++weak_alias (__expf, expf)
++#endif
++
++strong_alias (__expf, __ieee754_expf)
++strong_alias (__expf, __expf_finite)
++
++#define __expf __expf_sse2
++#include <sysdeps/ieee754/flt-32/e_expf.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_expf-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_expf-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_expf-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_expf-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,3 @@
++#define __expf __expf_fma
++
++#include <sysdeps/ieee754/flt-32/e_expf.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_exp-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,6 @@
++#define __ieee754_exp __ieee754_exp_fma
++#define __exp1 __exp1_fma
++#define __slowexp __slowexp_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/e_exp.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_log2f.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_log2f.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_log2f.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_log2f.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,40 @@
++/* Multiple versions of log2f.
++ Copyright (C) 2017 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/>. */
++
++extern float __redirect_log2f (float);
++
++#define SYMBOL_NAME log2f
++#include "ifunc-fma.h"
++
++libc_ifunc_redirected (__redirect_log2f, __log2f, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (__log2f, __GI___log2f, __redirect_log2f)
++ __attribute__ ((visibility ("hidden")));
++
++# include <shlib-compat.h>
++versioned_symbol (libm, __log2f, log2f, GLIBC_2_27);
++#else
++weak_alias (__log2f, log2f)
++#endif
++
++strong_alias (__log2f, __ieee754_log2f)
++strong_alias (__log2f, __log2f_finite)
++
++#define __log2f __log2f_sse2
++#include <sysdeps/ieee754/flt-32/e_log2f.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_log2f-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_log2f-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_log2f-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_log2f-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,3 @@
++#define __log2f __log2f_fma
++
++#include <sysdeps/ieee754/flt-32/e_log2f.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_log.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_log.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_log.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_log.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,18 +1,29 @@
+-#include <init-arch.h>
+-#include <math.h>
+-#include <math_private.h>
+-
+-extern double __ieee754_log_sse2 (double);
+-extern double __ieee754_log_avx (double);
+-extern double __ieee754_log_fma4 (double);
+-
+-libm_ifunc (__ieee754_log,
+- HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_log_fma4
+- : (HAS_ARCH_FEATURE (AVX_Usable)
+- ? __ieee754_log_avx : __ieee754_log_sse2));
+-strong_alias (__ieee754_log, __log_finite)
++/* Multiple versions of IEEE 754 log.
++ Copyright (C) 2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
+
+-#define __ieee754_log __ieee754_log_sse2
++ 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/>. */
+
++extern double __redirect_ieee754_log (double);
+
++#define SYMBOL_NAME ieee754_log
++#include "ifunc-avx-fma4.h"
++
++libc_ifunc_redirected (__redirect_ieee754_log, __ieee754_log,
++ IFUNC_SELECTOR ());
++strong_alias (__ieee754_log, __log_finite)
++
++#define __ieee754_log __ieee754_log_sse2
+ #include <sysdeps/ieee754/dbl-64/e_log.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_logf.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_logf.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_logf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_logf.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,40 @@
++/* Multiple versions of logf.
++ Copyright (C) 2017 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/>. */
++
++extern float __redirect_logf (float);
++
++#define SYMBOL_NAME logf
++#include "ifunc-fma.h"
++
++libc_ifunc_redirected (__redirect_logf, __logf, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (__logf, __GI___logf, __redirect_logf)
++ __attribute__ ((visibility ("hidden")));
++
++# include <shlib-compat.h>
++versioned_symbol (libm, __logf, logf, GLIBC_2_27);
++#else
++weak_alias (__logf, logf)
++#endif
++
++strong_alias (__logf, __ieee754_logf)
++strong_alias (__logf, __logf_finite)
++
++#define __logf __logf_sse2
++#include <sysdeps/ieee754/flt-32/e_logf.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_logf-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_logf-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_logf-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_logf-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,3 @@
++#define __logf __logf_fma
++
++#include <sysdeps/ieee754/flt-32/e_logf.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_log-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_log-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_log-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_log-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,8 @@
++#define __ieee754_log __ieee754_log_fma
++#define __mplog __mplog_fma
++#define __add __add_fma
++#define __dbl_mp __dbl_mp_fma
++#define __sub __sub_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/e_log.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_pow.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_pow.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_pow.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_pow.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,17 +1,29 @@
+-#include <init-arch.h>
+-#include <math.h>
+-#include <math_private.h>
+-
+-extern double __ieee754_pow_sse2 (double, double);
+-extern double __ieee754_pow_fma4 (double, double);
+-
+-libm_ifunc (__ieee754_pow,
+- HAS_ARCH_FEATURE (FMA4_Usable)
+- ? __ieee754_pow_fma4
+- : __ieee754_pow_sse2);
+-strong_alias (__ieee754_pow, __pow_finite)
++/* Multiple versions of IEEE 754 pow.
++ Copyright (C) 2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
+
+-#define __ieee754_pow __ieee754_pow_sse2
++ 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/>. */
+
++extern double __redirect_ieee754_pow (double, double);
+
++#define SYMBOL_NAME ieee754_pow
++#include "ifunc-fma4.h"
++
++libc_ifunc_redirected (__redirect_ieee754_pow,
++ __ieee754_pow, IFUNC_SELECTOR ());
++strong_alias (__ieee754_pow, __pow_finite)
++
++#define __ieee754_pow __ieee754_pow_sse2
+ #include <sysdeps/ieee754/dbl-64/e_pow.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_powf.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_powf.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_powf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_powf.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,43 @@
++/* Multiple versions of powf.
++ Copyright (C) 2017 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/>. */
++
++#define powf __redirect_powf
++#define __DECL_SIMD___redirect_powf
++#include <math.h>
++#undef powf
++
++#define SYMBOL_NAME powf
++#include "ifunc-fma.h"
++
++libc_ifunc_redirected (__redirect_powf, __powf, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (__powf, __GI___powf, __redirect_powf)
++ __attribute__ ((visibility ("hidden")));
++
++# include <shlib-compat.h>
++versioned_symbol (libm, __powf, powf, GLIBC_2_27);
++#else
++weak_alias (__powf, powf)
++#endif
++
++strong_alias (__powf, __ieee754_powf)
++strong_alias (__powf, __powf_finite)
++
++#define __powf __powf_sse2
++#include <sysdeps/ieee754/flt-32/e_powf.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_powf-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_powf-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_powf-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_powf-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,3 @@
++#define __powf __powf_fma
++
++#include <sysdeps/ieee754/flt-32/e_powf.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/e_pow-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_pow-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/e_pow-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/e_pow-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,6 @@
++#define __ieee754_pow __ieee754_pow_fma
++#define __exp1 __exp1_fma
++#define __slowpow __slowpow_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/e_pow.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/halfulp-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/halfulp-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/halfulp-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/halfulp-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,4 @@
++#define __halfulp __halfulp_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/halfulp.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,43 @@
++/* Common definition for ifunc selections optimized with AVX, AVX2/FMA
++ and FMA4.
++ Copyright (C) 2017 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 <init-arch.h>
++
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (fma) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (fma4) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
++ && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
++ return OPTIMIZE (fma);
++
++ if (CPU_FEATURES_ARCH_P (cpu_features, FMA4_Usable))
++ return OPTIMIZE (fma4);
++
++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX_Usable))
++ return OPTIMIZE (avx);
++
++ return OPTIMIZE (sse2);
++}
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,39 @@
++/* Common definition for ifunc selections optimized with AVX2/FMA and
++ FMA4.
++ Copyright (C) 2017 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 <init-arch.h>
++
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (fma) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (fma4) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
++ && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
++ return OPTIMIZE (fma);
++
++ if (CPU_FEATURES_ARCH_P (cpu_features, FMA4_Usable))
++ return OPTIMIZE (fma4);
++
++ return OPTIMIZE (sse2);
++}
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-fma.h glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-fma.h
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-fma.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-fma.h 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,34 @@
++/* Common definition for ifunc selections optimized with AVX2/FMA.
++ Copyright (C) 2017 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 <init-arch.h>
++
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (fma) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
++ && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
++ return OPTIMIZE (fma);
++
++ return OPTIMIZE (sse2);
++}
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx2.h glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx2.h
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx2.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx2.h 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,39 @@
++/* Common definition for libmathvec ifunc selections optimized with
++ AVX2.
++ Copyright (C) 2017 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 <init-arch.h>
++
++#undef PASTER2
++#define PASTER2(x,y) x##_##y
++
++extern void REDIRECT_NAME (void);
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse_wrapper) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
++ && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
++ return OPTIMIZE (avx2);
++
++ return OPTIMIZE (sse_wrapper);
++}
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx512.h glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx512.h
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx512.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx512.h 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,45 @@
++/* Common definition for libmathvec ifunc selections optimized with
++ AVX512.
++ Copyright (C) 2017 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 <init-arch.h>
++
++#undef PASTER2
++#define PASTER2(x,y) x##_##y
++
++extern void REDIRECT_NAME (void);
++extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_wrapper) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (knl) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (skx) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (!CPU_FEATURES_ARCH_P (cpu_features, MathVec_Prefer_No_AVX512))
++ {
++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512DQ_Usable))
++ return OPTIMIZE (skx);
++
++ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable))
++ return OPTIMIZE (knl);
++ }
++
++ return OPTIMIZE (avx2_wrapper);
++}
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-sse4_1.h glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-sse4_1.h
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-sse4_1.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-sse4_1.h 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,38 @@
++/* Common definition for libmathvec ifunc selections optimized with
++ SSE4.1.
++ Copyright (C) 2017 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 <init-arch.h>
++
++#undef PASTER2
++#define PASTER2(x,y) x##_##y
++
++extern void REDIRECT_NAME (void);
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse4) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_CPU_P (cpu_features, SSE4_1))
++ return OPTIMIZE (sse4);
++
++ return OPTIMIZE (sse2);
++}
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-sse4_1.h glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-sse4_1.h
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/ifunc-sse4_1.h 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/ifunc-sse4_1.h 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,33 @@
++/* Common definition for ifunc selections optimized with SSE4.1.
++ Copyright (C) 2017 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 <init-arch.h>
++
++extern __typeof (REDIRECT_NAME) OPTIMIZE (c) attribute_hidden;
++extern __typeof (REDIRECT_NAME) OPTIMIZE (sse41) attribute_hidden;
++
++static inline void *
++IFUNC_SELECTOR (void)
++{
++ const struct cpu_features* cpu_features = __get_cpu_features ();
++
++ if (CPU_FEATURES_CPU_P (cpu_features, SSE4_1))
++ return OPTIMIZE (sse41);
++
++ return OPTIMIZE (c);
++}
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/Makefile glibc-2.26/sysdeps/x86_64/fpu/multiarch/Makefile
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/Makefile 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/Makefile 2017-10-22 17:02:23.627967252 +0000
+@@ -1,6 +1,50 @@
+ ifeq ($(subdir),math)
+ libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
+- s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c
++ s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c \
++ s_trunc-c s_truncf-c
++
++libm-sysdep_routines += s_ceil-sse4_1 s_ceilf-sse4_1 s_floor-sse4_1 \
++ s_floorf-sse4_1 s_nearbyint-sse4_1 \
++ s_nearbyintf-sse4_1 s_rint-sse4_1 s_rintf-sse4_1 \
++ s_trunc-sse4_1 s_truncf-sse4_1
++
++libm-sysdep_routines += e_exp-fma e_log-fma e_pow-fma s_atan-fma \
++ e_asin-fma e_atan2-fma s_sin-fma s_tan-fma \
++ mplog-fma mpa-fma slowexp-fma slowpow-fma \
++ sincos32-fma doasin-fma dosincos-fma \
++ halfulp-fma mpexp-fma \
++ mpatan2-fma mpatan-fma mpsqrt-fma mptan-fma
++
++CFLAGS-doasin-fma.c = -mfma -mavx2
++CFLAGS-dosincos-fma.c = -mfma -mavx2
++CFLAGS-e_asin-fma.c = -mfma -mavx2
++CFLAGS-e_atan2-fma.c = -mfma -mavx2
++CFLAGS-e_exp-fma.c = -mfma -mavx2
++CFLAGS-e_log-fma.c = -mfma -mavx2
++CFLAGS-e_pow-fma.c = -mfma -mavx2 $(config-cflags-nofma)
++CFLAGS-halfulp-fma.c = -mfma -mavx2
++CFLAGS-mpa-fma.c = -mfma -mavx2
++CFLAGS-mpatan-fma.c = -mfma -mavx2
++CFLAGS-mpatan2-fma.c = -mfma -mavx2
++CFLAGS-mpexp-fma.c = -mfma -mavx2
++CFLAGS-mplog-fma.c = -mfma -mavx2
++CFLAGS-mpsqrt-fma.c = -mfma -mavx2
++CFLAGS-mptan-fma.c = -mfma -mavx2
++CFLAGS-s_atan-fma.c = -mfma -mavx2
++CFLAGS-sincos32-fma.c = -mfma -mavx2
++CFLAGS-slowexp-fma.c = -mfma -mavx2
++CFLAGS-slowpow-fma.c = -mfma -mavx2
++CFLAGS-s_sin-fma.c = -mfma -mavx2
++CFLAGS-s_tan-fma.c = -mfma -mavx2
++
++libm-sysdep_routines += e_exp2f-fma e_expf-fma e_log2f-fma e_logf-fma \
++ e_powf-fma
++
++CFLAGS-e_exp2f-fma.c = -mfma -mavx2
++CFLAGS-e_expf-fma.c = -mfma -mavx2
++CFLAGS-e_log2f-fma.c = -mfma -mavx2
++CFLAGS-e_logf-fma.c = -mfma -mavx2
++CFLAGS-e_powf-fma.c = -mfma -mavx2
+
+ libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
+ e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
+@@ -66,5 +110,35 @@ libmvec-sysdep_routines += svml_d_cos2_c
+ svml_d_pow4_core_avx2 svml_d_pow8_core_avx512 \
+ svml_s_powf4_core_sse4 svml_s_powf8_core_avx2 \
+ svml_s_powf16_core_avx512 svml_s_sincosf4_core_sse4 \
+- svml_s_sincosf8_core_avx2 svml_s_sincosf16_core_avx512
++ svml_s_sincosf8_core_avx2 \
++ svml_s_sincosf16_core_avx512 \
++ svml_d_cos2_core-sse2 svml_d_cos4_core-sse \
++ svml_d_cos8_core-avx2 svml_d_exp2_core-sse2 \
++ svml_d_exp4_core-sse svml_d_exp8_core-avx2 \
++ svml_d_log2_core-sse2 svml_d_log4_core-sse \
++ svml_d_log8_core-avx2 svml_d_pow2_core-sse2 \
++ svml_d_pow4_core-sse svml_d_pow8_core-avx2 \
++ svml_d_sin2_core-sse2 svml_d_sin4_core-sse \
++ svml_d_sin8_core-avx2 \
++ svml_d_sincos2_core-sse2 \
++ svml_d_sincos4_core-sse \
++ svml_d_sincos8_core-avx2 \
++ svml_s_cosf16_core-avx2 \
++ svml_s_cosf4_core-sse2 \
++ svml_s_cosf8_core-sse \
++ svml_s_expf16_core-avx2 \
++ svml_s_expf4_core-sse2 \
++ svml_s_expf8_core-sse \
++ svml_s_logf16_core-avx2 \
++ svml_s_logf4_core-sse2 \
++ svml_s_logf8_core-sse \
++ svml_s_powf16_core-avx2 \
++ svml_s_powf4_core-sse2 \
++ svml_s_powf8_core-sse \
++ svml_s_sincosf16_core-avx2 \
++ svml_s_sincosf4_core-sse2 \
++ svml_s_sincosf8_core-sse \
++ svml_s_sinf16_core-avx2 \
++ svml_s_sinf4_core-sse2 \
++ svml_s_sinf8_core-sse
+ endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/mpa-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpa-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/mpa-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpa-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,14 @@
++#define __add __add_fma
++#define __mul __mul_fma
++#define __sqr __sqr_fma
++#define __sub __sub_fma
++#define __dbl_mp __dbl_mp_fma
++#define __dvd __dvd_fma
++
++#define NO___CPY 1
++#define NO___MP_DBL 1
++#define NO___ACR 1
++#define NO__CONST 1
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/mpa.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,9 @@
++#define __mpatan2 __mpatan2_fma
++#define __add __add_fma
++#define __dvd __dvd_fma
++#define __mpatan __mpatan_fma
++#define __mpsqrt __mpsqrt_fma
++#define __mul __mul_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/mpatan2.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/mpatan-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpatan-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/mpatan-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpatan-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,10 @@
++#define __mpatan __mpatan_fma
++#define __add __add_fma
++#define __dvd __dvd_fma
++#define __mpsqrt __mpsqrt_fma
++#define __mul __mul_fma
++#define __sub __sub_fma
++#define AVOID_MPATAN_H 1
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/mpatan.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/mpexp-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpexp-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/mpexp-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpexp-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,9 @@
++#define __mpexp __mpexp_fma
++#define __add __add_fma
++#define __dbl_mp __dbl_mp_fma
++#define __dvd __dvd_fma
++#define __mul __mul_fma
++#define AVOID_MPEXP_H 1
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/mpexp.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/mplog-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/mplog-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/mplog-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/mplog-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,8 @@
++#define __mplog __mplog_fma
++#define __add __add_fma
++#define __mpexp __mpexp_fma
++#define __mul __mul_fma
++#define __sub __sub_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/mplog.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,8 @@
++#define __mpsqrt __mpsqrt_fma
++#define __dbl_mp __dbl_mp_fma
++#define __mul __mul_fma
++#define __sub __sub_fma
++#define AVOID_MPSQRT_H 1
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/mpsqrt.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/mptan-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/mptan-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/mptan-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/mptan-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,7 @@
++#define __mptan __mptan_fma
++#define __c32 __c32_fma
++#define __dvd __dvd_fma
++#define __mpranred __mpranred_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/mptan.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,4 +1,4 @@
+-#define atan __atan_avx
++#define __atan __atan_avx
+ #define __add __add_avx
+ #define __dbl_mp __dbl_mp_avx
+ #define __mul __mul_avx
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_atan.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_atan.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_atan.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_atan.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,15 +1,28 @@
+-#include <init-arch.h>
+-#include <math.h>
++/* Multiple versions of atan.
++ Copyright (C) 2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
+
+-extern double __atan_sse2 (double);
+-extern double __atan_avx (double);
+-extern double __atan_fma4 (double);
+-
+-libm_ifunc (atan, (HAS_ARCH_FEATURE (FMA4_Usable) ? __atan_fma4 :
+- HAS_ARCH_FEATURE (AVX_Usable)
+- ? __atan_avx : __atan_sse2));
++ 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.
+
+-#define atan __atan_sse2
++ 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/>. */
+
++extern double __redirect_atan (double);
++
++#define SYMBOL_NAME atan
++#include "ifunc-avx-fma4.h"
++
++libc_ifunc_redirected (__redirect_atan, __atan, IFUNC_SELECTOR ());
++weak_alias (__atan, atan)
++
++#define __atan __atan_sse2
+ #include <sysdeps/ieee754/dbl-64/s_atan.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,4 +1,4 @@
+-#define atan __atan_fma4
++#define __atan __atan_fma4
+ #define __add __add_fma4
+ #define __dbl_mp __dbl_mp_fma4
+ #define __mpatan __mpatan_fma4
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,9 @@
++#define __atan __atan_fma
++#define __add __add_fma
++#define __dbl_mp __dbl_mp_fma
++#define __mpatan __mpatan_fma
++#define __mul __mul_fma
++#define __sub __sub_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/s_atan.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceil.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceil.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceil.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceil.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,29 @@
++/* Multiple versions of __ceil.
++ Copyright (C) 2017 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/>. */
++
++#define ceil __redirect_ceil
++#define __ceil __redirect___ceil
++#include <math.h>
++#undef ceil
++#undef __ceil
++
++#define SYMBOL_NAME ceil
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_ceil, __ceil, IFUNC_SELECTOR ());
++weak_alias (__ceil, ceil)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceilf.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceilf.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceilf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceilf.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,29 @@
++/* Multiple versions of __ceilf.
++ Copyright (C) 2017 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/>. */
++
++#define ceilf __redirect_ceilf
++#define __ceilf __redirect___ceilf
++#include <math.h>
++#undef ceilf
++#undef __ceilf
++
++#define SYMBOL_NAME ceilf
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_ceilf, __ceilf, IFUNC_SELECTOR ());
++weak_alias (__ceilf, ceilf)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceilf.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceilf.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceilf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceilf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- 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 <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__ceilf)
+- .type __ceilf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq __ceilf_sse41(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jnz 2f
+- leaq __ceilf_c(%rip), %rax
+-2: ret
+-END(__ceilf)
+-weak_alias (__ceilf, ceilf)
+-
+-
+-ENTRY(__ceilf_sse41)
+- roundss $10, %xmm0, %xmm0
+- ret
+-END(__ceilf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
++
++ 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__ceilf_sse41)
++ roundss $10, %xmm0, %xmm0
++ ret
++END(__ceilf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceil.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceil.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceil.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceil.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- 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 <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__ceil)
+- .type __ceil, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq __ceil_sse41(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jnz 2f
+- leaq __ceil_c(%rip), %rax
+-2: ret
+-END(__ceil)
+-weak_alias (__ceil, ceil)
+-
+-
+-ENTRY(__ceil_sse41)
+- roundsd $10, %xmm0, %xmm0
+- ret
+-END(__ceil_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
++
++ 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__ceil_sse41)
++ roundsd $10, %xmm0, %xmm0
++ ret
++END(__ceil_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_floor.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floor.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_floor.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floor.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,29 @@
++/* Multiple versions of __floor.
++ Copyright (C) 2017 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/>. */
++
++#define floor __redirect_floor
++#define __floor __redirect___floor
++#include <math.h>
++#undef floor
++#undef __floor
++
++#define SYMBOL_NAME floor
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_floor, __floor, IFUNC_SELECTOR ());
++weak_alias (__floor, floor)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_floorf.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floorf.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_floorf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floorf.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,29 @@
++/* Multiple versions of __floorf.
++ Copyright (C) 2017 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/>. */
++
++#define floorf __redirect_floorf
++#define __floorf __redirect___floorf
++#include <math.h>
++#undef floorf
++#undef __floorf
++
++#define SYMBOL_NAME floorf
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_floorf, __floorf, IFUNC_SELECTOR ());
++weak_alias (__floorf, floorf)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_floorf.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floorf.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_floorf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floorf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- 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 <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__floorf)
+- .type __floorf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq __floorf_sse41(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jnz 2f
+- leaq __floorf_c(%rip), %rax
+-2: ret
+-END(__floorf)
+-weak_alias (__floorf, floorf)
+-
+-
+-ENTRY(__floorf_sse41)
+- roundss $9, %xmm0, %xmm0
+- ret
+-END(__floorf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
++
++ 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__floorf_sse41)
++ roundss $9, %xmm0, %xmm0
++ ret
++END(__floorf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_floor.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floor.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_floor.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floor.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- 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 <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__floor)
+- .type __floor, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq __floor_sse41(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jnz 2f
+- leaq __floor_c(%rip), %rax
+-2: ret
+-END(__floor)
+-weak_alias (__floor, floor)
+-
+-
+-ENTRY(__floor_sse41)
+- roundsd $9, %xmm0, %xmm0
+- ret
+-END(__floor_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
++
++ 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__floor_sse41)
++ roundsd $9, %xmm0, %xmm0
++ ret
++END(__floor_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/sincos32-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/sincos32-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/sincos32-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/sincos32-fma.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,15 @@
++#define __cos32 __cos32_fma
++#define __sin32 __sin32_fma
++#define __c32 __c32_fma
++#define __mpsin __mpsin_fma
++#define __mpsin1 __mpsin1_fma
++#define __mpcos __mpcos_fma
++#define __mpcos1 __mpcos1_fma
++#define __mpranred __mpranred_fma
++#define __add __add_fma
++#define __dbl_mp __dbl_mp_fma
++#define __mul __mul_fma
++#define __sub __sub_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/sincos32.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/slowexp-fma.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,9 @@
++#define __slowexp __slowexp_fma
++#define __add __add_fma
++#define __dbl_mp __dbl_mp_fma
++#define __mpexp __mpexp_fma
++#define __mul __mul_fma
++#define __sub __sub_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/slowexp.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/slowpow-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/slowpow-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/slowpow-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/slowpow-fma.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,11 @@
++#define __slowpow __slowpow_fma
++#define __add __add_fma
++#define __dbl_mp __dbl_mp_fma
++#define __mpexp __mpexp_fma
++#define __mplog __mplog_fma
++#define __mul __mul_fma
++#define __sub __sub_fma
++#define __halfulp __halfulp_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/slowpow.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,30 @@
++/* Multiple versions of __nearbyint.
++ Copyright (C) 2017 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/>. */
++
++#define nearbyint __redirect_nearbyint
++#define __nearbyint __redirect___nearbyint
++#include <math.h>
++#undef nearbyint
++#undef __nearbyint
++
++#define SYMBOL_NAME nearbyint
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_nearbyint, __nearbyint,
++ IFUNC_SELECTOR ());
++weak_alias (__nearbyint, nearbyint)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,30 @@
++/* Multiple versions of __nearbyintf.
++ Copyright (C) 2017 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/>. */
++
++#define nearbyintf __redirect_nearbyintf
++#define __nearbyintf __redirect___nearbyintf
++#include <math.h>
++#undef nearbyintf
++#undef __nearbyintf
++
++#define SYMBOL_NAME nearbyintf
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_nearbyintf, __nearbyintf,
++ IFUNC_SELECTOR ());
++weak_alias (__nearbyintf, nearbyintf)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- 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 <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__nearbyintf)
+- .type __nearbyintf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq __nearbyintf_sse41(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jnz 2f
+- leaq __nearbyintf_c(%rip), %rax
+-2: ret
+-END(__nearbyintf)
+-weak_alias (__nearbyintf, nearbyintf)
+-
+-
+-ENTRY(__nearbyintf_sse41)
+- roundss $0xc, %xmm0, %xmm0
+- ret
+-END(__nearbyintf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
++
++ 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__nearbyintf_sse41)
++ roundss $0xc, %xmm0, %xmm0
++ ret
++END(__nearbyintf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyint.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyint.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyint.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyint.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- 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 <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__nearbyint)
+- .type __nearbyint, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq __nearbyint_sse41(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jnz 2f
+- leaq __nearbyint_c(%rip), %rax
+-2: ret
+-END(__nearbyint)
+-weak_alias (__nearbyint, nearbyint)
+-
+-
+-ENTRY(__nearbyint_sse41)
+- roundsd $0xc, %xmm0, %xmm0
+- ret
+-END(__nearbyint_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
++
++ 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__nearbyint_sse41)
++ roundsd $0xc, %xmm0, %xmm0
++ ret
++END(__nearbyint_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_rint.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rint.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_rint.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rint.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,29 @@
++/* Multiple versions of __rint.
++ Copyright (C) 2017 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/>. */
++
++#define rint __redirect_rint
++#define __rint __redirect___rint
++#include <math.h>
++#undef rint
++#undef __rint
++
++#define SYMBOL_NAME rint
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_rint, __rint, IFUNC_SELECTOR ());
++weak_alias (__rint, rint)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_rintf.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rintf.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_rintf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rintf.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,29 @@
++/* Multiple versions of __rintf.
++ Copyright (C) 2017 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/>. */
++
++#define rintf __redirect_rintf
++#define __rintf __redirect___rintf
++#include <math.h>
++#undef rintf
++#undef __rintf
++
++#define SYMBOL_NAME rintf
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_rintf, __rintf, IFUNC_SELECTOR ());
++weak_alias (__rintf, rintf)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_rintf.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rintf.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_rintf.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rintf.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- 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 <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__rintf)
+- .type __rintf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq __rintf_sse41(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jnz 2f
+- leaq __rintf_c(%rip), %rax
+-2: ret
+-END(__rintf)
+-weak_alias (__rintf, rintf)
+-
+-
+-ENTRY(__rintf_sse41)
+- roundss $4, %xmm0, %xmm0
+- ret
+-END(__rintf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
++
++ 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__rintf_sse41)
++ roundss $4, %xmm0, %xmm0
++ ret
++END(__rintf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_rint.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rint.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_rint.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rint.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- 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 <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__rint)
+- .type __rint, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq __rint_sse41(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jnz 2f
+- leaq __rint_c(%rip), %rax
+-2: ret
+-END(__rint)
+-weak_alias (__rint, rint)
+-
+-
+-ENTRY(__rint_sse41)
+- roundsd $4, %xmm0, %xmm0
+- ret
+-END(__rint_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
++
++ 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__rint_sse41)
++ roundsd $4, %xmm0, %xmm0
++ ret
++END(__rint_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_sin.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_sin.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_sin.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_sin.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,26 +1,37 @@
+-#include <init-arch.h>
+-#include <math.h>
+-#undef NAN
+-
+-extern double __cos_sse2 (double);
+-extern double __sin_sse2 (double);
+-extern double __cos_avx (double);
+-extern double __sin_avx (double);
+-extern double __cos_fma4 (double);
+-extern double __sin_fma4 (double);
+-
+-libm_ifunc (__cos, (HAS_ARCH_FEATURE (FMA4_Usable) ? __cos_fma4 :
+- HAS_ARCH_FEATURE (AVX_Usable)
+- ? __cos_avx : __cos_sse2));
+-weak_alias (__cos, cos)
++/* Multiple versions of sin and cos.
++ Copyright (C) 2017 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/>. */
++
++extern double __redirect_sin (double);
++extern double __redirect_cos (double);
+
+-libm_ifunc (__sin, (HAS_ARCH_FEATURE (FMA4_Usable) ? __sin_fma4 :
+- HAS_ARCH_FEATURE (AVX_Usable)
+- ? __sin_avx : __sin_sse2));
++#define SYMBOL_NAME sin
++#include "ifunc-avx-fma4.h"
++
++libc_ifunc_redirected (__redirect_sin, __sin, IFUNC_SELECTOR ());
+ weak_alias (__sin, sin)
+
+-#define __cos __cos_sse2
+-#define __sin __sin_sse2
++#undef SYMBOL_NAME
++#define SYMBOL_NAME cos
++#include "ifunc-avx-fma4.h"
+
++libc_ifunc_redirected (__redirect_cos, __cos, IFUNC_SELECTOR ());
++weak_alias (__cos, cos)
+
++#define __cos __cos_sse2
++#define __sin __sin_sse2
+ #include <sysdeps/ieee754/dbl-64/s_sin.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,11 @@
++#define __cos __cos_fma
++#define __sin __sin_fma
++#define __docos __docos_fma
++#define __dubsin __dubsin_fma
++#define __mpcos __mpcos_fma
++#define __mpcos1 __mpcos1_fma
++#define __mpsin __mpsin_fma
++#define __mpsin1 __mpsin1_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/s_sin.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_tan-avx.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_tan-avx.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_tan-avx.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_tan-avx.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,4 +1,4 @@
+-#define tan __tan_avx
++#define __tan __tan_avx
+ #define __dbl_mp __dbl_mp_avx
+ #define __sub __sub_avx
+ #define SECTION __attribute__ ((section (".text.avx")))
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_tan.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_tan.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_tan.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_tan.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,15 +1,28 @@
+-#include <init-arch.h>
+-#include <math.h>
++/* Multiple versions of tan.
++ Copyright (C) 2017 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
+
+-extern double __tan_sse2 (double);
+-extern double __tan_avx (double);
+-extern double __tan_fma4 (double);
+-
+-libm_ifunc (tan, (HAS_ARCH_FEATURE (FMA4_Usable) ? __tan_fma4 :
+- HAS_ARCH_FEATURE (AVX_Usable)
+- ? __tan_avx : __tan_sse2));
++ 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.
+
+-#define tan __tan_sse2
++ 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/>. */
+
++extern double __redirect_tan (double);
++
++#define SYMBOL_NAME tan
++#include "ifunc-avx-fma4.h"
++
++libc_ifunc_redirected (__redirect_tan, __tan, IFUNC_SELECTOR ());
++weak_alias (__tan, tan)
++
++#define __tan __tan_sse2
+ #include <sysdeps/ieee754/dbl-64/s_tan.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c 2017-10-22 17:02:23.627967252 +0000
+@@ -1,4 +1,4 @@
+-#define tan __tan_fma4
++#define __tan __tan_fma4
+ #define __dbl_mp __dbl_mp_fma4
+ #define __mpranred __mpranred_fma4
+ #define __mptan __mptan_fma4
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_tan-fma.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_tan-fma.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_tan-fma.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_tan-fma.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,8 @@
++#define __tan __tan_fma
++#define __dbl_mp __dbl_mp_fma
++#define __mpranred __mpranred_fma
++#define __mptan __mptan_fma
++#define __sub __sub_fma
++#define SECTION __attribute__ ((section (".text.fma")))
++
++#include <sysdeps/ieee754/dbl-64/s_tan.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_trunc.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_trunc.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_trunc.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_trunc.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,29 @@
++/* Multiple versions of __trunc.
++ Copyright (C) 2017 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/>. */
++
++#define trunc __redirect_trunc
++#define __trunc __redirect___trunc
++#include <math.h>
++#undef trunc
++#undef __trunc
++
++#define SYMBOL_NAME trunc
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_trunc, __trunc, IFUNC_SELECTOR ());
++weak_alias (__trunc, trunc)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c 2017-10-22 17:02:23.627967252 +0000
+@@ -0,0 +1,2 @@
++#define __trunc __trunc_c
++#include <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_truncf.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_truncf.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_truncf.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_truncf.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,29 @@
++/* Multiple versions of __truncf.
++ Copyright (C) 2017 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/>. */
++
++#define truncf __redirect_truncf
++#define __truncf __redirect___truncf
++#include <math.h>
++#undef truncf
++#undef __truncf
++
++#define SYMBOL_NAME truncf
++#include "ifunc-sse4_1.h"
++
++libc_ifunc_redirected (__redirect_truncf, __truncf, IFUNC_SELECTOR ());
++weak_alias (__truncf, truncf)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_truncf-c.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_truncf-c.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_truncf-c.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_truncf-c.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,2 @@
++#define __truncf __truncf_c
++#include <sysdeps/ieee754/flt-32/s_truncf.c>
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,25 @@
++/* truncf for SSE4.1.
++ Copyright (C) 2017 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__truncf_sse41)
++ roundss $11, %xmm0, %xmm0
++ ret
++END(__truncf_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,25 @@
++/* trunc for SSE4.1.
++ Copyright (C) 2017 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 <sysdep.h>
++
++ .section .text.sse4.1,"ax",@progbits
++ENTRY(__trunc_sse41)
++ roundsd $11, %xmm0, %xmm0
++ ret
++END(__trunc_sse41)
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized cos, vector length is 2.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN2v_cos
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN2v_cos, __GI__ZGVbN2v_cos, __redirect__ZGVbN2v_cos)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized cos, vector length is 2.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN2v_cos)
+- .type _ZGVbN2v_cos, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN2v_cos_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN2v_cos_sse2(%rip), %rax
+- ret
+-END (_ZGVbN2v_cos)
+-libmvec_hidden_def (_ZGVbN2v_cos)
+-
+-#define _ZGVbN2v_cos _ZGVbN2v_cos_sse2
+-#include "../svml_d_cos2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized cos, vector length is 2.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN2v_cos _ZGVbN2v_cos_sse2
++#include "../svml_d_cos2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized cos, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN4v_cos
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN4v_cos, __GI__ZGVdN4v_cos, __redirect__ZGVdN4v_cos)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized cos, vector length is 4.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN4v_cos)
+- .type _ZGVdN4v_cos, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN4v_cos_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN4v_cos_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN4v_cos)
+-libmvec_hidden_def (_ZGVdN4v_cos)
+-
+-#define _ZGVdN4v_cos _ZGVdN4v_cos_sse_wrapper
+-#include "../svml_d_cos4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized cos, vector length is 4.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN4v_cos _ZGVdN4v_cos_sse_wrapper
++#include "../svml_d_cos4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized cos, vector length is 8.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN8v_cos _ZGVeN8v_cos_avx2_wrapper
++#include "../svml_d_cos8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized cos, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN8v_cos
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN8v_cos, __GI__ZGVeN8v_cos, __redirect__ZGVeN8v_cos)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized cos, vector length is 8.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN8v_cos)
+- .type _ZGVeN8v_cos, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+-1: leaq _ZGVeN8v_cos_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN8v_cos_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN8v_cos_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN8v_cos)
+-
+-#define _ZGVeN8v_cos _ZGVeN8v_cos_avx2_wrapper
+-#include "../svml_d_cos8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized exp, vector length is 2.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN2v_exp
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN2v_exp, __GI__ZGVbN2v_exp, __redirect__ZGVbN2v_exp)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized exp.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN2v_exp)
+- .type _ZGVbN2v_exp, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN2v_exp_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN2v_exp_sse2(%rip), %rax
+- ret
+-END (_ZGVbN2v_exp)
+-libmvec_hidden_def (_ZGVbN2v_exp)
+-
+-#define _ZGVbN2v_exp _ZGVbN2v_exp_sse2
+-#include "../svml_d_exp2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized exp.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN2v_exp _ZGVbN2v_exp_sse2
++#include "../svml_d_exp2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized exp, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN4v_exp
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN4v_exp, __GI__ZGVdN4v_exp, __redirect__ZGVdN4v_exp)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized exp.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN4v_exp)
+- .type _ZGVdN4v_exp, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN4v_exp_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN4v_exp_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN4v_exp)
+-libmvec_hidden_def (_ZGVdN4v_exp)
+-
+-#define _ZGVdN4v_exp _ZGVdN4v_exp_sse_wrapper
+-#include "../svml_d_exp4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized exp.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN4v_exp _ZGVdN4v_exp_sse_wrapper
++#include "../svml_d_exp4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized exp.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN8v_exp _ZGVeN8v_exp_avx2_wrapper
++#include "../svml_d_exp8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized exp, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN8v_exp
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN8v_exp, __GI__ZGVeN8v_exp, __redirect__ZGVeN8v_exp)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized exp.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN8v_exp)
+- .type _ZGVeN8v_exp, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN8v_exp_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN8v_exp_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN8v_exp_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN8v_exp)
+-
+-#define _ZGVeN8v_exp _ZGVeN8v_exp_avx2_wrapper
+-#include "../svml_d_exp8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized log, vector length is 2.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN2v_log
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN2v_log, __GI__ZGVbN2v_log, __redirect__ZGVbN2v_log)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized log.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN2v_log)
+- .type _ZGVbN2v_log, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN2v_log_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN2v_log_sse2(%rip), %rax
+- ret
+-END (_ZGVbN2v_log)
+-libmvec_hidden_def (_ZGVbN2v_log)
+-
+-#define _ZGVbN2v_log _ZGVbN2v_log_sse2
+-#include "../svml_d_log2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log2_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized log.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN2v_log _ZGVbN2v_log_sse2
++#include "../svml_d_log2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized log, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN4v_log
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN4v_log, __GI__ZGVdN4v_log, __redirect__ZGVdN4v_log)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized log.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN4v_log)
+- .type _ZGVdN4v_log, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN4v_log_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN4v_log_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN4v_log)
+-libmvec_hidden_def (_ZGVdN4v_log)
+-
+-#define _ZGVdN4v_log _ZGVdN4v_log_sse_wrapper
+-#include "../svml_d_log4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log4_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized log.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN4v_log _ZGVdN4v_log_sse_wrapper
++#include "../svml_d_log4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized log.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN8v_log _ZGVeN8v_log_avx2_wrapper
++#include "../svml_d_log8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized log, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN8v_log
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN8v_log, __GI__ZGVeN8v_log, __redirect__ZGVeN8v_log)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized log.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN8v_log)
+- .type _ZGVeN8v_log, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN8v_log_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN8v_log_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN8v_log_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN8v_log)
+-
+-#define _ZGVeN8v_log _ZGVeN8v_log_avx2_wrapper
+-#include "../svml_d_log8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized pow, vector length is 2.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN2vv_pow
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN2vv_pow, __GI__ZGVbN2vv_pow,
++ __redirect__ZGVbN2vv_pow)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized pow.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN2vv_pow)
+- .type _ZGVbN2vv_pow, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN2vv_pow_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN2vv_pow_sse2(%rip), %rax
+- ret
+-END (_ZGVbN2vv_pow)
+-libmvec_hidden_def (_ZGVbN2vv_pow)
+-
+-#define _ZGVbN2vv_pow _ZGVbN2vv_pow_sse2
+-#include "../svml_d_pow2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized pow.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN2vv_pow _ZGVbN2vv_pow_sse2
++#include "../svml_d_pow2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized pow, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN4vv_pow
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN4vv_pow, __GI__ZGVdN4vv_pow,
++ __redirect__ZGVdN4vv_pow)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized pow.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN4vv_pow)
+- .type _ZGVdN4vv_pow, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN4vv_pow_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN4vv_pow_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN4vv_pow)
+-libmvec_hidden_def (_ZGVdN4vv_pow)
+-
+-#define _ZGVdN4vv_pow _ZGVdN4vv_pow_sse_wrapper
+-#include "../svml_d_pow4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized pow.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN4vv_pow _ZGVdN4vv_pow_sse_wrapper
++#include "../svml_d_pow4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized pow.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN8vv_pow _ZGVeN8vv_pow_avx2_wrapper
++#include "../svml_d_pow8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized pow, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN8vv_pow
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN8vv_pow, __GI__ZGVeN8vv_pow,
++ __redirect__ZGVeN8vv_pow)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized pow.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN8vv_pow)
+- .type _ZGVeN8vv_pow, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN8vv_pow_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN8vv_pow_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN8vv_pow_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN8vv_pow)
+-
+-#define _ZGVeN8vv_pow _ZGVeN8vv_pow_avx2_wrapper
+-#include "../svml_d_pow8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized sin, vector length is 2.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN2v_sin
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN2v_sin, __GI__ZGVbN2v_sin, __redirect__ZGVbN2v_sin)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized sin.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN2v_sin)
+- .type _ZGVbN2v_sin, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN2v_sin_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN2v_sin_sse2(%rip), %rax
+- ret
+-END (_ZGVbN2v_sin)
+-libmvec_hidden_def (_ZGVbN2v_sin)
+-
+-#define _ZGVbN2v_sin _ZGVbN2v_sin_sse2
+-#include "../svml_d_sin2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized sin.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN2v_sin _ZGVbN2v_sin_sse2
++#include "../svml_d_sin2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized sin, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN4v_sin
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN4v_sin, __GI__ZGVdN4v_sin, __redirect__ZGVdN4v_sin)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized sin, vector length is 4.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN4v_sin)
+- .type _ZGVdN4v_sin, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN4v_sin_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN4v_sin_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN4v_sin)
+-libmvec_hidden_def (_ZGVdN4v_sin)
+-
+-#define _ZGVdN4v_sin _ZGVdN4v_sin_sse_wrapper
+-#include "../svml_d_sin4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized sin, vector length is 4.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN4v_sin _ZGVdN4v_sin_sse_wrapper
++#include "../svml_d_sin4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,23 @@
++/* AVX2 version of vectorized sin.
++ Copyright (C) 2014-2017 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 <sysdep.h>
++#include <init-arch.h>
++
++#define _ZGVeN8v_sin _ZGVeN8v_sin_avx2_wrapper
++#include "../svml_d_sin8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,27 @@
++/* Multiple versions of vectorized sin, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN8v_sin
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN8v_sin, __GI__ZGVeN8v_sin, __redirect__ZGVeN8v_sin)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized sin.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN8v_sin)
+- .type _ZGVeN8v_sin, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN8v_sin_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN8v_sin_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN8v_sin_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN8v_sin)
+-
+-#define _ZGVeN8v_sin _ZGVeN8v_sin_avx2_wrapper
+-#include "../svml_d_sin8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sincos, vector length is 2.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN2vvv_sincos
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN2vvv_sincos, __GI__ZGVbN2vvv_sincos,
++ __redirect__ZGVbN2vvv_sincos)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized sincos.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN2vvv_sincos)
+- .type _ZGVbN2vvv_sincos, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN2vvv_sincos_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN2vvv_sincos_sse2(%rip), %rax
+- ret
+-END (_ZGVbN2vvv_sincos)
+-libmvec_hidden_def (_ZGVbN2vvv_sincos)
+-
+-#define _ZGVbN2vvv_sincos _ZGVbN2vvv_sincos_sse2
+-#include "../svml_d_sincos2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized sincos.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN2vvv_sincos _ZGVbN2vvv_sincos_sse2
++#include "../svml_d_sincos2_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sincos, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN4vvv_sincos
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN4vvv_sincos, __GI__ZGVdN4vvv_sincos,
++ __redirect__ZGVdN4vvv_sincos)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized sincos.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN4vvv_sincos)
+- .type _ZGVdN4vvv_sincos, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN4vvv_sincos_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN4vvv_sincos_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN4vvv_sincos)
+-libmvec_hidden_def (_ZGVdN4vvv_sincos)
+-
+-#define _ZGVdN4vvv_sincos _ZGVdN4vvv_sincos_sse_wrapper
+-#include "../svml_d_sincos4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized sincos.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN4vvv_sincos _ZGVdN4vvv_sincos_sse_wrapper
++#include "../svml_d_sincos4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized sincos.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN8vvv_sincos _ZGVeN8vvv_sincos_avx2_wrapper
++#include "../svml_d_sincos8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S 2017-10-22 17:02:23.628967252 +0000
+@@ -599,24 +599,9 @@ libmvec_hidden_def(_ZGVeN8vl8l8_sincos_s
+ cfi_def_cfa_register (%rbp)
+ andq $-64, %rsp
+ subq $256, %rsp
+- /* Encoding for vmovups %zmm1, 128(%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x4c
+- .byte 0x24
+- .byte 0x02
++ vmovups %zmm1, 128(%rsp)
+ lea (%rsp), %rdi
+- /* Encoding for vmovups %zmm2, 192(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x57
+- .byte 0x03
++ vmovups %zmm2, 192(%rdi)
+ lea 64(%rsp), %rsi
+ call HIDDEN_JUMPTARGET(\callee)
+ movq 128(%rsp), %rdx
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sincos, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN8vvv_sincos
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN8vvv_sincos, __GI__ZGVeN8vvv_sincos,
++ __redirect__ZGVeN8vvv_sincos)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized sincos.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN8vvv_sincos)
+- .type _ZGVeN8vvv_sincos, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN8vvv_sincos_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN8vvv_sincos_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN8vvv_sincos_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN8vvv_sincos)
+-
+-#define _ZGVeN8vvv_sincos _ZGVeN8vvv_sincos_avx2_wrapper
+-#include "../svml_d_sincos8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized cosf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN16v_cosf _ZGVeN16v_cosf_avx2_wrapper
++#include "../svml_s_cosf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized cosf, vector length is 16.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN16v_cosf
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN16v_cosf, __GI__ZGVeN16v_cosf,
++ __redirect__ZGVeN16v_cosf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized cosf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN16v_cosf)
+- .type _ZGVeN16v_cosf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN16v_cosf_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN16v_cosf_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN16v_cosf_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN16v_cosf)
+-
+-#define _ZGVeN16v_cosf _ZGVeN16v_cosf_avx2_wrapper
+-#include "../svml_s_cosf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized cosf, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN4v_cosf
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN4v_cosf, __GI__ZGVbN4v_cosf,
++ __redirect__ZGVbN4v_cosf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized cosf, vector length is 4.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN4v_cosf)
+- .type _ZGVbN4v_cosf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN4v_cosf_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN4v_cosf_sse2(%rip), %rax
+- ret
+-END (_ZGVbN4v_cosf)
+-libmvec_hidden_def (_ZGVbN4v_cosf)
+-
+-#define _ZGVbN4v_cosf _ZGVbN4v_cosf_sse2
+-#include "../svml_s_cosf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized cosf, vector length is 4.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN4v_cosf _ZGVbN4v_cosf_sse2
++#include "../svml_s_cosf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized cosf, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN8v_cosf
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN8v_cosf, __GI__ZGVdN8v_cosf,
++ __redirect__ZGVdN8v_cosf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized cosf, vector length is 8.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN8v_cosf)
+- .type _ZGVdN8v_cosf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN8v_cosf_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN8v_cosf_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN8v_cosf)
+-libmvec_hidden_def (_ZGVdN8v_cosf)
+-
+-#define _ZGVdN8v_cosf _ZGVdN8v_cosf_sse_wrapper
+-#include "../svml_s_cosf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized cosf, vector length is 8.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN8v_cosf _ZGVdN8v_cosf_sse_wrapper
++#include "../svml_s_cosf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,23 @@
++/* AVX2 version of vectorized expf.
++ Copyright (C) 2014-2017 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 <sysdep.h>
++#include <init-arch.h>
++
++#define _ZGVeN16v_expf _ZGVeN16v_expf_avx2_wrapper
++#include "../svml_s_expf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized expf, vector length is 16.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN16v_expf
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN16v_expf, __GI__ZGVeN16v_expf,
++ __redirect__ZGVeN16v_expf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized expf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN16v_expf)
+- .type _ZGVeN16v_expf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN16v_expf_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN16v_expf_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN16v_expf_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN16v_expf)
+-
+-#define _ZGVeN16v_expf _ZGVeN16v_expf_avx2_wrapper
+-#include "../svml_s_expf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized expf, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN4v_expf
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN4v_expf, __GI__ZGVbN4v_expf,
++ __redirect__ZGVbN4v_expf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized expf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN4v_expf)
+- .type _ZGVbN4v_expf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN4v_expf_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN4v_expf_sse2(%rip), %rax
+- ret
+-END (_ZGVbN4v_expf)
+-libmvec_hidden_def (_ZGVbN4v_expf)
+-
+-#define _ZGVbN4v_expf _ZGVbN4v_expf_sse2
+-#include "../svml_s_expf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized expf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN4v_expf _ZGVbN4v_expf_sse2
++#include "../svml_s_expf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized expf, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN8v_expf
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN8v_expf, __GI__ZGVdN8v_expf,
++ __redirect__ZGVdN8v_expf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized expf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN8v_expf)
+- .type _ZGVdN8v_expf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN8v_expf_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN8v_expf_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN8v_expf)
+-libmvec_hidden_def (_ZGVdN8v_expf)
+-
+-#define _ZGVdN8v_expf _ZGVdN8v_expf_sse_wrapper
+-#include "../svml_s_expf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized expf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN8v_expf _ZGVdN8v_expf_sse_wrapper
++#include "../svml_s_expf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized logf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN16v_logf _ZGVeN16v_logf_avx2_wrapper
++#include "../svml_s_logf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized logf, vector length is 16.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN16v_logf
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN16v_logf, __GI__ZGVeN16v_logf,
++ __redirect__ZGVeN16v_logf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized logf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN16v_logf)
+- .type _ZGVeN16v_logf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN16v_logf_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN16v_logf_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN16v_logf_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN16v_logf)
+-
+-#define _ZGVeN16v_logf _ZGVeN16v_logf_avx2_wrapper
+-#include "../svml_s_logf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized logf, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN4v_logf
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN4v_logf, __GI__ZGVbN4v_logf,
++ __redirect__ZGVbN4v_logf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized logf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN4v_logf)
+- .type _ZGVbN4v_logf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN4v_logf_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN4v_logf_sse2(%rip), %rax
+- ret
+-END (_ZGVbN4v_logf)
+-libmvec_hidden_def (_ZGVbN4v_logf)
+-
+-#define _ZGVbN4v_logf _ZGVbN4v_logf_sse2
+-#include "../svml_s_logf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized logf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN4v_logf _ZGVbN4v_logf_sse2
++#include "../svml_s_logf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized logf, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN8v_logf
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN8v_logf, __GI__ZGVdN8v_logf,
++ __redirect__ZGVdN8v_logf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized logf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN8v_logf)
+- .type _ZGVdN8v_logf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN8v_logf_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN8v_logf_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN8v_logf)
+-libmvec_hidden_def (_ZGVdN8v_logf)
+-
+-#define _ZGVdN8v_logf _ZGVdN8v_logf_sse_wrapper
+-#include "../svml_s_logf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized logf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN8v_logf _ZGVdN8v_logf_sse_wrapper
++#include "../svml_s_logf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized powf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN16vv_powf _ZGVeN16vv_powf_avx2_wrapper
++#include "../svml_s_powf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized powf, vector length is 16.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN16vv_powf
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN16vv_powf, __GI__ZGVeN16vv_powf,
++ __redirect__ZGVeN16vv_powf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized powf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN16vv_powf)
+- .type _ZGVeN16vv_powf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN16vv_powf_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN16vv_powf_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN16vv_powf_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN16vv_powf)
+-
+-#define _ZGVeN16vv_powf _ZGVeN16vv_powf_avx2_wrapper
+-#include "../svml_s_powf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized powf, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN4vv_powf
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN4vv_powf, __GI__ZGVbN4vv_powf,
++ __redirect__ZGVbN4vv_powf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized powf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN4vv_powf)
+- .type _ZGVbN4vv_powf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN4vv_powf_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN4vv_powf_sse2(%rip), %rax
+- ret
+-END (_ZGVbN4vv_powf)
+-libmvec_hidden_def (_ZGVbN4vv_powf)
+-
+-#define _ZGVbN4vv_powf _ZGVbN4vv_powf_sse2
+-#include "../svml_s_powf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized powf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN4vv_powf _ZGVbN4vv_powf_sse2
++#include "../svml_s_powf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sinf, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN8vv_powf
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN8vv_powf, __GI__ZGVdN8vv_powf,
++ __redirect__ZGVdN8vv_powf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized powf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN8vv_powf)
+- .type _ZGVdN8vv_powf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN8vv_powf_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN8vv_powf_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN8vv_powf)
+-libmvec_hidden_def (_ZGVdN8vv_powf)
+-
+-#define _ZGVdN8vv_powf _ZGVdN8vv_powf_sse_wrapper
+-#include "../svml_s_powf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized powf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN8vv_powf _ZGVdN8vv_powf_sse_wrapper
++#include "../svml_s_powf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized sincosf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN16vvv_sincosf _ZGVeN16vvv_sincosf_avx2_wrapper
++#include "../svml_s_sincosf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S 2017-10-22 17:02:23.628967252 +0000
+@@ -510,40 +510,11 @@ libmvec_hidden_def(_ZGVeN16vl4l4_sincosf
+ cfi_def_cfa_register (%rbp)
+ andq $-64, %rsp
+ subq $384, %rsp
+- /* Encoding for vmovups %zmm1, 128(%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x4c
+- .byte 0x24
+- .byte 0x02
++ vmovups %zmm1, 128(%rsp)
+ lea (%rsp), %rdi
+- /* Encoding for vmovups %zmm2, 192(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x57
+- .byte 0x03
+- /* Encoding for vmovups %zmm3, 256(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x5f
+- .byte 0x04
+- /* Encoding for vmovups %zmm4, 320(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x67
+- .byte 0x05
++ vmovups %zmm2, 192(%rdi)
++ vmovups %zmm3, 256(%rdi)
++ vmovups %zmm4, 320(%rdi)
+ lea 64(%rsp), %rsi
+ call HIDDEN_JUMPTARGET(\callee)
+ movq 128(%rsp), %rdx
+@@ -661,30 +632,8 @@ libmvec_hidden_def(_ZGVeN16vl4l4_sincosf
+ leal -112(%rbp), %esi
+ leal -176(%rbp), %edi
+ subl $296, %esp
+- /* Encoding for vmovdqa64 %zmm1, -240(%ebp). */
+- .byte 0x67
+- .byte 0x62
+- .byte 0xf1
+- .byte 0xfd
+- .byte 0x48
+- .byte 0x7f
+- .byte 0x8d
+- .byte 0x10
+- .byte 0xff
+- .byte 0xff
+- .byte 0xff
+- /* Encoding for vmovdqa64 %zmm2, -304(%ebp). */
+- .byte 0x67
+- .byte 0x62
+- .byte 0xf1
+- .byte 0xfd
+- .byte 0x48
+- .byte 0x7f
+- .byte 0x95
+- .byte 0xd0
+- .byte 0xfe
+- .byte 0xff
+- .byte 0xff
++ vmovdqa64 %zmm1, -240(%ebp)
++ vmovdqa64 %zmm2, -304(%ebp)
+ call HIDDEN_JUMPTARGET(\callee)
+ movl -240(%ebp), %eax
+ vmovss -176(%ebp), %xmm0
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sincosf, vector length is 16.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN16vvv_sincosf
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN16vvv_sincosf, __GI__ZGVeN16vvv_sincosf,
++ __redirect__ZGVeN16vvv_sincosf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized sincosf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN16vvv_sincosf)
+- .type _ZGVeN16vvv_sincosf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN16vvv_sincosf_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN16vvv_sincosf_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN16vvv_sincosf_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN16vvv_sincosf)
+-
+-#define _ZGVeN16vvv_sincosf _ZGVeN16vvv_sincosf_avx2_wrapper
+-#include "../svml_s_sincosf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sincosf, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN4vvv_sincosf
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN4vvv_sincosf, __GI__ZGVbN4vvv_sincosf,
++ __redirect__ZGVbN4vvv_sincosf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized sincosf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN4vvv_sincosf)
+- .type _ZGVbN4vvv_sincosf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN4vvv_sincosf_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN4vvv_sincosf_sse2(%rip), %rax
+- ret
+-END (_ZGVbN4vvv_sincosf)
+-libmvec_hidden_def (_ZGVbN4vvv_sincosf)
+-
+-#define _ZGVbN4vvv_sincosf _ZGVbN4vvv_sincosf_sse2
+-#include "../svml_s_sincosf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized sincosf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN4vvv_sincosf _ZGVbN4vvv_sincosf_sse2
++#include "../svml_s_sincosf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sincosf, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN8vvv_sincosf
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN8vvv_sincosf, __GI__ZGVdN8vvv_sincosf,
++ __redirect__ZGVdN8vvv_sincosf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized sincosf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN8vvv_sincosf)
+- .type _ZGVdN8vvv_sincosf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVdN8vvv_sincosf_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN8vvv_sincosf_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN8vvv_sincosf)
+-libmvec_hidden_def (_ZGVdN8vvv_sincosf)
+-
+-#define _ZGVdN8vvv_sincosf _ZGVdN8vvv_sincosf_sse_wrapper
+-#include "../svml_s_sincosf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized sincosf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN8vvv_sincosf _ZGVdN8vvv_sincosf_sse_wrapper
++#include "../svml_s_sincosf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core-avx2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core-avx2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core-avx2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core-avx2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* AVX2 version of vectorized sinf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVeN16v_sinf _ZGVeN16v_sinf_avx2_wrapper
++#include "../svml_s_sinf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sinf, vector length is 16.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVeN16v_sinf
++#include "ifunc-mathvec-avx512.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVeN16v_sinf, __GI__ZGVeN16v_sinf,
++ __redirect__ZGVeN16v_sinf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,37 +0,0 @@
+-/* Multiple versions of vectorized sinf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVeN16v_sinf)
+- .type _ZGVeN16v_sinf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVeN16v_sinf_skx(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512DQ_Usable)
+- jnz 2f
+- leaq _ZGVeN16v_sinf_knl(%rip), %rax
+- HAS_ARCH_FEATURE (AVX512F_Usable)
+- jnz 2f
+- leaq _ZGVeN16v_sinf_avx2_wrapper(%rip), %rax
+-2: ret
+-END (_ZGVeN16v_sinf)
+-
+-#define _ZGVeN16v_sinf _ZGVeN16v_sinf_avx2_wrapper
+-#include "../svml_s_sinf16_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sinf, vector length is 4.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVbN4v_sinf
++#include "ifunc-mathvec-sse4_1.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVbN4v_sinf, __GI__ZGVbN4v_sinf,
++ __redirect__ZGVbN4v_sinf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized sinf.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVbN4v_sinf)
+- .type _ZGVbN4v_sinf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+- leaq _ZGVbN4v_sinf_sse4(%rip), %rax
+- HAS_CPU_FEATURE (SSE4_1)
+- jz 2f
+- ret
+-2: leaq _ZGVbN4v_sinf_sse2(%rip), %rax
+- ret
+-END (_ZGVbN4v_sinf)
+-libmvec_hidden_def (_ZGVbN4v_sinf)
+-
+-#define _ZGVbN4v_sinf _ZGVbN4v_sinf_sse2
+-#include "../svml_s_sinf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core-sse2.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core-sse2.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core-sse2.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core-sse2.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE2 version of vectorized sinf.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVbN4v_sinf _ZGVbN4v_sinf_sse2
++#include "../svml_s_sinf4_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core.c glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core.c
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core.c 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core.c 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,28 @@
++/* Multiple versions of vectorized sinf, vector length is 8.
++ Copyright (C) 2017 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/>. */
++
++#define SYMBOL_NAME _ZGVdN8v_sinf
++#include "ifunc-mathvec-avx2.h"
++
++libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
++
++#ifdef SHARED
++__hidden_ver1 (_ZGVdN8v_sinf, __GI__ZGVdN8v_sinf,
++ __redirect__ZGVdN8v_sinf)
++ __attribute__ ((visibility ("hidden")));
++#endif
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core.S 1970-01-01 00:00:00.000000000 +0000
+@@ -1,36 +0,0 @@
+-/* Multiple versions of vectorized sinf, vector length is 8.
+- Copyright (C) 2014-2017 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 <sysdep.h>
+-#include <init-arch.h>
+-
+- .text
+-ENTRY (_ZGVdN8v_sinf)
+- .type _ZGVdN8v_sinf, @gnu_indirect_function
+- LOAD_RTLD_GLOBAL_RO_RDX
+-1: leaq _ZGVdN8v_sinf_avx2(%rip), %rax
+- HAS_ARCH_FEATURE (AVX2_Usable)
+- jz 2f
+- ret
+-2: leaq _ZGVdN8v_sinf_sse_wrapper(%rip), %rax
+- ret
+-END (_ZGVdN8v_sinf)
+-libmvec_hidden_def (_ZGVdN8v_sinf)
+-
+-#define _ZGVdN8v_sinf _ZGVdN8v_sinf_sse_wrapper
+-#include "../svml_s_sinf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core-sse.S glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core-sse.S
+--- glibc-org/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core-sse.S 1970-01-01 00:00:00.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core-sse.S 2017-10-22 17:02:23.628967252 +0000
+@@ -0,0 +1,20 @@
++/* SSE version of vectorized sinf, vector length is 8.
++ Copyright (C) 2014-2017 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/>. */
++
++#define _ZGVdN8v_sinf _ZGVdN8v_sinf_sse_wrapper
++#include "../svml_s_sinf8_core.S"
+diff -purN glibc-org/sysdeps/x86_64/fpu/svml_d_sincos8_core.S glibc-2.26/sysdeps/x86_64/fpu/svml_d_sincos8_core.S
+--- glibc-org/sysdeps/x86_64/fpu/svml_d_sincos8_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/svml_d_sincos8_core.S 2017-10-22 17:02:23.628967252 +0000
+@@ -35,32 +35,10 @@ END (_ZGVeN8vl8l8_sincos)
+ cfi_def_cfa_register (%rbp)
+ andq $-64, %rsp
+ subq $320, %rsp
+- /* Encoding for vmovups %zmm0, 256(%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x44
+- .byte 0x24
+- .byte 0x04
++ vmovups %zmm0, 256(%rsp)
+ lea (%rsp), %rdi
+- /* Encoding for vmovups %zmm1, 128(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x4f
+- .byte 0x02
+- /* Encoding for vmovups %zmm2, 192(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x57
+- .byte 0x03
++ vmovups %zmm1, 128(%rdi)
++ vmovups %zmm2, 192(%rdi)
+ lea 64(%rsp), %rsi
+ call HIDDEN_JUMPTARGET(\callee)
+ vmovdqu 288(%rsp), %ymm0
+@@ -142,18 +120,7 @@ END (_ZGVeN8vl8l8_sincos)
+ subl $280, %esp
+ vmovdqa %ymm1, -208(%ebp)
+ vmovdqa %ymm2, -240(%ebp)
+- /* Encoding for vmovapd %zmm0, -304(%ebp). */
+- .byte 0x67
+- .byte 0x62
+- .byte 0xf1
+- .byte 0xfd
+- .byte 0x48
+- .byte 0x29
+- .byte 0x85
+- .byte 0xd0
+- .byte 0xfe
+- .byte 0xff
+- .byte 0xff
++ vmovapd %zmm0, -304(%ebp)
+ call HIDDEN_JUMPTARGET(\callee)
+ leal 32(%r12), %esi
+ vmovupd -272(%ebp), %ymm0
+diff -purN glibc-org/sysdeps/x86_64/fpu/svml_d_wrapper_impl.h glibc-2.26/sysdeps/x86_64/fpu/svml_d_wrapper_impl.h
+--- glibc-org/sysdeps/x86_64/fpu/svml_d_wrapper_impl.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/svml_d_wrapper_impl.h 2017-10-22 17:02:23.628967252 +0000
+@@ -201,29 +201,14 @@
+ cfi_def_cfa_register (%rbp)
+ andq $-64, %rsp
+ subq $128, %rsp
+-/* Below is encoding for vmovups %zmm0, (%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x04
+- .byte 0x24
++ vmovups %zmm0, (%rsp)
+ vmovupd (%rsp), %ymm0
+ call HIDDEN_JUMPTARGET(\callee)
+ vmovupd %ymm0, 64(%rsp)
+ vmovupd 32(%rsp), %ymm0
+ call HIDDEN_JUMPTARGET(\callee)
+ vmovupd %ymm0, 96(%rsp)
+-/* Below is encoding for vmovups 64(%rsp), %zmm0. */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x10
+- .byte 0x44
+- .byte 0x24
+- .byte 0x01
++ vmovups 64(%rsp), %zmm0
+ movq %rbp, %rsp
+ cfi_def_cfa_register (%rsp)
+ popq %rbp
+@@ -241,23 +226,8 @@
+ cfi_def_cfa_register (%rbp)
+ andq $-64, %rsp
+ subq $192, %rsp
+-/* Below is encoding for vmovups %zmm0, (%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x04
+- .byte 0x24
+-/* Below is encoding for vmovups %zmm1, 64(%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x4c
+- .byte 0x24
+- .byte 0x01
++ vmovups %zmm0, (%rsp)
++ vmovups %zmm1, 64(%rsp)
+ vmovupd (%rsp), %ymm0
+ vmovupd 64(%rsp), %ymm1
+ call HIDDEN_JUMPTARGET(\callee)
+@@ -266,15 +236,7 @@
+ vmovupd 96(%rsp), %ymm1
+ call HIDDEN_JUMPTARGET(\callee)
+ vmovupd %ymm0, 160(%rsp)
+-/* Below is encoding for vmovups 128(%rsp), %zmm0. */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x10
+- .byte 0x44
+- .byte 0x24
+- .byte 0x02
++ vmovups 128(%rsp), %zmm0
+ movq %rbp, %rsp
+ cfi_def_cfa_register (%rsp)
+ popq %rbp
+@@ -299,14 +261,7 @@
+ cfi_rel_offset (%r13, 0)
+ subq $176, %rsp
+ movq %rsi, %r13
+-/* Below is encoding for vmovups %zmm0, (%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x04
+- .byte 0x24
++ vmovups %zmm0, (%rsp)
+ movq %rdi, %r12
+ vmovupd (%rsp), %ymm0
+ call HIDDEN_JUMPTARGET(\callee)
+diff -purN glibc-org/sysdeps/x86_64/fpu/svml_s_sincosf16_core.S glibc-2.26/sysdeps/x86_64/fpu/svml_s_sincosf16_core.S
+--- glibc-org/sysdeps/x86_64/fpu/svml_s_sincosf16_core.S 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/svml_s_sincosf16_core.S 2017-10-22 17:02:23.628967252 +0000
+@@ -35,48 +35,12 @@ END (_ZGVeN16vl4l4_sincosf)
+ cfi_def_cfa_register (%rbp)
+ andq $-64, %rsp
+ subq $448, %rsp
+- /* Encoding for vmovups %zmm0, 384(%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x44
+- .byte 0x24
+- .byte 0x06
++ vmovups %zmm0, 384(%rsp)
+ lea (%rsp), %rdi
+- /* Encoding for vmovups %zmm1, 128(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x4f
+- .byte 0x02
+- /* Encoding for vmovups %zmm2, 192(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x57
+- .byte 0x03
+- /* Encoding for vmovups %zmm3, 256(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x5f
+- .byte 0x04
+- /* Encoding for vmovups %zmm4, 320(%rdi). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x67
+- .byte 0x05
++ vmovups %zmm1, 128(%rdi)
++ vmovups %zmm2, 192(%rdi)
++ vmovups %zmm3, 256(%rdi)
++ vmovups %zmm4, 320(%rdi)
+ lea 64(%rsp), %rsi
+ call HIDDEN_JUMPTARGET(\callee)
+ vmovdqu 416(%rsp), %ymm0
+@@ -204,42 +168,9 @@ END (_ZGVeN16vl4l4_sincosf)
+ .cfi_escape 0x10,0x3,0x2,0x76,0x68
+ movq %rdi, %rbx
+ subl $344, %esp
+- /* Encoding for vmovdqa64 %zmm1, -240(%ebp). */
+- .byte 0x67
+- .byte 0x62
+- .byte 0xf1
+- .byte 0xfd
+- .byte 0x48
+- .byte 0x7f
+- .byte 0x8d
+- .byte 0x10
+- .byte 0xff
+- .byte 0xff
+- .byte 0xff
+- /* Encoding for vmovdqa64 %zmm2, -304(%ebp). */
+- .byte 0x67
+- .byte 0x62
+- .byte 0xf1
+- .byte 0xfd
+- .byte 0x48
+- .byte 0x7f
+- .byte 0x95
+- .byte 0xd0
+- .byte 0xfe
+- .byte 0xff
+- .byte 0xff
+- /* Encoding for vmovaps %zmm0, -368(%ebp). */
+- .byte 0x67
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x29
+- .byte 0x85
+- .byte 0x90
+- .byte 0xfe
+- .byte 0xff
+- .byte 0xff
++ vmovdqa64 %zmm1, -240(%ebp)
++ vmovdqa64 %zmm2, -304(%ebp)
++ vmovaps %zmm0, -368(%ebp)
+ call HIDDEN_JUMPTARGET(\callee)
+ leal 32(%r12), %esi
+ vmovups -336(%ebp), %ymm0
+diff -purN glibc-org/sysdeps/x86_64/fpu/svml_s_wrapper_impl.h glibc-2.26/sysdeps/x86_64/fpu/svml_s_wrapper_impl.h
+--- glibc-org/sysdeps/x86_64/fpu/svml_s_wrapper_impl.h 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26/sysdeps/x86_64/fpu/svml_s_wrapper_impl.h 2017-10-22 17:02:23.628967252 +0000
+@@ -246,29 +246,14 @@
+ cfi_def_cfa_register (%rbp)
+ andq $-64, %rsp
+ subq $128, %rsp
+-/* Below is encoding for vmovups %zmm0, (%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x04
+- .byte 0x24
++ vmovups %zmm0, (%rsp)
+ vmovupd (%rsp), %ymm0
+ call HIDDEN_JUMPTARGET(\callee)
+ vmovupd %ymm0, 64(%rsp)
+ vmovupd 32(%rsp), %ymm0
+ call HIDDEN_JUMPTARGET(\callee)
+ vmovupd %ymm0, 96(%rsp)
+-/* Below is encoding for vmovups 64(%rsp), %zmm0. */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x10
+- .byte 0x44
+- .byte 0x24
+- .byte 0x01
++ vmovups 64(%rsp), %zmm0
+ movq %rbp, %rsp
+ cfi_def_cfa_register (%rsp)
+ popq %rbp
+@@ -286,23 +271,8 @@
+ cfi_def_cfa_register (%rbp)
+ andq $-64, %rsp
+ subq $192, %rsp
+-/* Below is encoding for vmovups %zmm0, (%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x04
+- .byte 0x24
+-/* Below is encoding for vmovups %zmm1, 64(%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x11
+- .byte 0x4c
+- .byte 0x24
+- .byte 0x01
++ vmovups %zmm0, (%rsp)
++ vmovups %zmm1, 64(%rsp)
+ vmovups (%rsp), %ymm0
+ vmovups 64(%rsp), %ymm1
+ call HIDDEN_JUMPTARGET(\callee)
+@@ -311,15 +281,7 @@
+ vmovups 96(%rsp), %ymm1
+ call HIDDEN_JUMPTARGET(\callee)
+ vmovups %ymm0, 160(%rsp)
+-/* Below is encoding for vmovups 128(%rsp), %zmm0. */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x10
+- .byte 0x44
+- .byte 0x24
+- .byte 0x02
++ vmovups 128(%rsp), %zmm0
+ movq %rbp, %rsp
+ cfi_def_cfa_register (%rsp)
+ popq %rbp
+@@ -340,14 +302,7 @@
+ pushq %r13
+ subq $176, %rsp
+ movq %rsi, %r13
+-/* Below is encoding for vmovaps %zmm0, (%rsp). */
+- .byte 0x62
+- .byte 0xf1
+- .byte 0x7c
+- .byte 0x48
+- .byte 0x29
+- .byte 0x04
+- .byte 0x24
++ vmovaps %zmm0, (%rsp)
+ movq %rdi, %r12
+ vmovaps (%rsp), %ymm0
+ call HIDDEN_JUMPTARGET(\callee)
diff --git a/mathlto.patch b/mathlto.patch
index f1bca24..bae18f0 100644
--- a/mathlto.patch
+++ b/mathlto.patch
@@ -1,22 +1,24 @@
---- glibc-2.25/math/Makefile~ 2017-02-05 15:28:43.000000000 +0000
-+++ glibc-2.25/math/Makefile 2017-07-29 13:52:56.181213874 +0000
-@@ -21,6 +21,8 @@
-
- include ../Makeconfig
-
-+CFLAGS-.o += -flto -ffat-lto-objects
-+
- # Installed header files.
- headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
- bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \
---- glibc-2.25/crypt/Makefile~ 2017-02-05 15:28:43.000000000 +0000
-+++ glibc-2.25/crypt/Makefile 2017-07-30 18:45:58.396204712 +0000
+diff -Naur glibc-2.26/crypt/Makefile glibc-2.26.tpg/crypt/Makefile
+--- glibc-2.26/crypt/Makefile 2017-08-02 12:57:16.000000000 +0000
++++ glibc-2.26.tpg/crypt/Makefile 2018-01-03 22:26:46.071151667 +0000
@@ -22,6 +22,8 @@
include ../Makeconfig
-+CFLAGS-.o += -flto -ffat-lto-objects
++CFLAGS-.o += -flto -ffat-lto-objects -fno-stack-protector
+
headers := crypt.h
extra-libs := libcrypt
+diff -Naur glibc-2.26/math/Makefile glibc-2.26.tpg/math/Makefile
+--- glibc-2.26/math/Makefile 2018-01-03 22:25:33.065056000 +0000
++++ glibc-2.26.tpg/math/Makefile 2018-01-03 22:27:03.487174438 +0000
+@@ -21,6 +21,8 @@
+
+ include ../Makeconfig
+
++CFLAGS-.o += -fno-stack-protector
++
+ # Installed header files.
+ headers := math.h bits/mathcalls.h bits/mathinline.h \
+ fpu_control.h complex.h bits/cmathcalls.h fenv.h \