|
Packit |
6c4009 |
/* _Float128 overrides for building ldbl-128 as _Float128.
|
|
Packit |
6c4009 |
Copyright (C) 2017-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* This must be included before the function renames below. */
|
|
Packit |
6c4009 |
#include <gmp.h>
|
|
Packit |
6c4009 |
#include <math.h>
|
|
Packit |
6c4009 |
#undef HUGE_VALL
|
|
Packit |
6c4009 |
#define HUGE_VALL HUGE_VAL_F128
|
|
Packit |
6c4009 |
#include <math/mul_splitl.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* This must be included before the renames of types and macros from
|
|
Packit |
6c4009 |
it. */
|
|
Packit |
6c4009 |
#include <ieee754.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Renames derived from math_private.h. */
|
|
Packit |
6c4009 |
#include <math_private.h>
|
|
Packit |
6c4009 |
#include <ieee754_float128.h>
|
|
Packit |
6c4009 |
#define ieee854_long_double_shape_type ieee854_float128_shape_type
|
|
Packit |
6c4009 |
#define ieee854_long_double ieee854_float128
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#undef GET_LDOUBLE_LSW64
|
|
Packit |
6c4009 |
#undef GET_LDOUBLE_MSW64
|
|
Packit |
6c4009 |
#undef GET_LDOUBLE_WORDS64
|
|
Packit |
6c4009 |
#undef SET_LDOUBLE_LSW64
|
|
Packit |
6c4009 |
#undef SET_LDOUBLE_MSW64
|
|
Packit |
6c4009 |
#undef SET_LDOUBLE_WORDS64
|
|
Packit |
6c4009 |
#define GET_LDOUBLE_LSW64(x,y) GET_FLOAT128_LSW64 (x, y)
|
|
Packit |
6c4009 |
#define GET_LDOUBLE_MSW64(x,y) GET_FLOAT128_MSW64 (x, y)
|
|
Packit |
6c4009 |
#define GET_LDOUBLE_WORDS64(x,y,z) GET_FLOAT128_WORDS64 (x, y, z)
|
|
Packit |
6c4009 |
#define SET_LDOUBLE_LSW64(x,y) SET_FLOAT128_LSW64 (x, y)
|
|
Packit |
6c4009 |
#define SET_LDOUBLE_MSW64(x,y) SET_FLOAT128_MSW64 (x, y)
|
|
Packit |
6c4009 |
#define SET_LDOUBLE_WORDS64(x,y,z) SET_FLOAT128_WORDS64 (x, y, z)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#undef IEEE854_LONG_DOUBLE_BIAS
|
|
Packit |
6c4009 |
#define IEEE854_LONG_DOUBLE_BIAS IEEE854_FLOAT128_BIAS
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifdef SET_RESTORE_ROUNDF128
|
|
Packit |
6c4009 |
# undef SET_RESTORE_ROUNDL
|
|
Packit |
6c4009 |
# define SET_RESTORE_ROUNDL(RM) SET_RESTORE_ROUNDF128 (RM)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifdef libc_feholdexcept_setroundf128
|
|
Packit |
6c4009 |
# undef libc_feholdexcept_setroundl
|
|
Packit |
6c4009 |
# define libc_feholdexcept_setroundl(ENV, RM) \
|
|
Packit |
6c4009 |
libc_feholdexcept_setroundf128 (ENV, RM)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifdef libc_feupdateenv_testf128
|
|
Packit |
6c4009 |
# undef libc_feupdateenv_testl
|
|
Packit |
6c4009 |
# define libc_feupdateenv_testl(ENV, EX) libc_feupdateenv_testf128 (ENV, EX)
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* misc macros from the header below. */
|
|
Packit |
6c4009 |
#include <fix-fp-int-convert-overflow.h>
|
|
Packit |
6c4009 |
#undef FIX_LDBL_LONG_CONVERT_OVERFLOW
|
|
Packit |
6c4009 |
#undef FIX_LDBL_LLONG_CONVERT_OVERFLOW
|
|
Packit |
6c4009 |
#define FIX_LDBL_LONG_CONVERT_OVERFLOW FIX_FLT128_LONG_CONVERT_OVERFLOW
|
|
Packit |
6c4009 |
#define FIX_LDBL_LLONG_CONVERT_OVERFLOW FIX_FLT128_LLONG_CONVERT_OVERFLOW
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* float.h constants. */
|
|
Packit |
6c4009 |
#include <float.h>
|
|
Packit |
6c4009 |
#undef LDBL_DIG
|
|
Packit |
6c4009 |
#undef LDBL_EPSILON
|
|
Packit |
6c4009 |
#undef LDBL_MANT_DIG
|
|
Packit |
6c4009 |
#undef LDBL_MAX
|
|
Packit |
6c4009 |
#undef LDBL_MAX_10_EXP
|
|
Packit |
6c4009 |
#undef LDBL_MAX_EXP
|
|
Packit |
6c4009 |
#undef LDBL_MIN
|
|
Packit |
6c4009 |
#undef LDBL_MIN_10_EXP
|
|
Packit |
6c4009 |
#undef LDBL_MIN_EXP
|
|
Packit |
6c4009 |
#undef LDBL_TRUE_MIN
|
|
Packit |
6c4009 |
#define LDBL_DIG FLT128_DIG
|
|
Packit |
6c4009 |
#define LDBL_EPSILON FLT128_EPSILON
|
|
Packit |
6c4009 |
#define LDBL_MANT_DIG FLT128_MANT_DIG
|
|
Packit |
6c4009 |
#define LDBL_MAX FLT128_MAX
|
|
Packit |
6c4009 |
#define LDBL_MAX_10_EXP FLT128_MAX_10_EXP
|
|
Packit |
6c4009 |
#define LDBL_MAX_EXP FLT128_MAX_EXP
|
|
Packit |
6c4009 |
#define LDBL_MIN FLT128_MIN
|
|
Packit |
6c4009 |
#define LDBL_MIN_10_EXP FLT128_MIN_10_EXP
|
|
Packit |
6c4009 |
#define LDBL_MIN_EXP FLT128_MIN_EXP
|
|
Packit |
6c4009 |
#define LDBL_TRUE_MIN FLT128_TRUE_MIN
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* math.h GNU constants. */
|
|
Packit |
6c4009 |
#undef M_El
|
|
Packit |
6c4009 |
#undef M_LOG2El
|
|
Packit |
6c4009 |
#undef M_LOG10El
|
|
Packit |
6c4009 |
#undef M_LN2l
|
|
Packit |
6c4009 |
#undef M_LN10l
|
|
Packit |
6c4009 |
#undef M_PIl
|
|
Packit |
6c4009 |
#undef M_PI_2l
|
|
Packit |
6c4009 |
#undef M_PI_4l
|
|
Packit |
6c4009 |
#undef M_1_PIl
|
|
Packit |
6c4009 |
#undef M_2_PIl
|
|
Packit |
6c4009 |
#undef M_2_SQRTPIl
|
|
Packit |
6c4009 |
#undef M_SQRT2l
|
|
Packit |
6c4009 |
#undef M_SQRT1_2l
|
|
Packit |
6c4009 |
#define M_El M_Ef128
|
|
Packit |
6c4009 |
#define M_LOG2El M_LOG2Ef128
|
|
Packit |
6c4009 |
#define M_LOG10El M_LOG10Ef128
|
|
Packit |
6c4009 |
#define M_LN2l M_LN2f128
|
|
Packit |
6c4009 |
#define M_LN10l M_LN10f128
|
|
Packit |
6c4009 |
#define M_PIl M_PIf128
|
|
Packit |
6c4009 |
#define M_PI_2l M_PI_2f128
|
|
Packit |
6c4009 |
#define M_PI_4l M_PI_4f128
|
|
Packit |
6c4009 |
#define M_1_PIl M_1_PIf128
|
|
Packit |
6c4009 |
#define M_2_PIl M_2_PIf128
|
|
Packit |
6c4009 |
#define M_2_SQRTPIl M_2_SQRTPIf128
|
|
Packit |
6c4009 |
#define M_SQRT2l M_SQRT2f128
|
|
Packit |
6c4009 |
#define M_SQRT1_2l M_SQRT1_2f128
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <libm-alias-ldouble.h>
|
|
Packit |
6c4009 |
#include <libm-alias-float128.h>
|
|
Packit |
6c4009 |
#undef libm_alias_ldouble_r
|
|
Packit |
6c4009 |
#define libm_alias_ldouble_r(from, to, r) libm_alias_float128_r (from, to, r)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <math/math-narrow.h>
|
|
Packit |
6c4009 |
#undef libm_alias_float_ldouble
|
|
Packit |
6c4009 |
#define libm_alias_float_ldouble(func) libm_alias_float32_float128 (func)
|
|
Packit |
6c4009 |
#undef libm_alias_double_ldouble
|
|
Packit |
6c4009 |
#define libm_alias_double_ldouble(func) libm_alias_float64_float128 (func)
|
|
Packit |
6c4009 |
|
|
Packit Service |
915b5d |
#include <math-use-builtins.h>
|
|
Packit Service |
915b5d |
#undef USE_NEARBYINTL_BUILTIN
|
|
Packit Service |
915b5d |
#define USE_NEARBYINTL_BUILTIN USE_NEARBYINTF128_BUILTIN
|
|
Packit Service |
abe25a |
#undef USE_RINTL_BUILTIN
|
|
Packit Service |
abe25a |
#define USE_RINTL_BUILTIN USE_RINTF128_BUILTIN
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* IEEE function renames. */
|
|
Packit |
6c4009 |
#define __ieee754_acoshl __ieee754_acoshf128
|
|
Packit |
6c4009 |
#define __ieee754_acosl __ieee754_acosf128
|
|
Packit |
6c4009 |
#define __ieee754_asinhl __ieee754_asinhf128
|
|
Packit |
6c4009 |
#define __ieee754_asinl __ieee754_asinf128
|
|
Packit |
6c4009 |
#define __ieee754_atan2l __ieee754_atan2f128
|
|
Packit |
6c4009 |
#define __ieee754_atanhl __ieee754_atanhf128
|
|
Packit |
6c4009 |
#define __ieee754_coshl __ieee754_coshf128
|
|
Packit |
6c4009 |
#define __ieee754_cosl __ieee754_cosf128
|
|
Packit |
6c4009 |
#define __ieee754_exp10l __ieee754_exp10f128
|
|
Packit |
6c4009 |
#define __ieee754_exp2l __ieee754_exp2f128
|
|
Packit |
6c4009 |
#define __ieee754_expl __ieee754_expf128
|
|
Packit |
6c4009 |
#define __ieee754_fmodl __ieee754_fmodf128
|
|
Packit |
6c4009 |
#define __ieee754_gammal_r __ieee754_gammaf128_r
|
|
Packit |
6c4009 |
#define __ieee754_hypotl __ieee754_hypotf128
|
|
Packit |
6c4009 |
#define __ieee754_ilogbl __ieee754_ilogbf128
|
|
Packit |
6c4009 |
#define __ieee754_j0l __ieee754_j0f128
|
|
Packit |
6c4009 |
#define __ieee754_j1l __ieee754_j1f128
|
|
Packit |
6c4009 |
#define __ieee754_jnl __ieee754_jnf128
|
|
Packit |
6c4009 |
#define __ieee754_lgammal_r __ieee754_lgammaf128_r
|
|
Packit |
6c4009 |
#define __ieee754_log10l __ieee754_log10f128
|
|
Packit |
6c4009 |
#define __ieee754_log2l __ieee754_log2f128
|
|
Packit |
6c4009 |
#define __ieee754_logl __ieee754_logf128
|
|
Packit |
6c4009 |
#define __ieee754_powl __ieee754_powf128
|
|
Packit |
6c4009 |
#define __ieee754_rem_pio2l __ieee754_rem_pio2f128
|
|
Packit |
6c4009 |
#define __ieee754_remainderl __ieee754_remainderf128
|
|
Packit |
6c4009 |
#define __ieee754_sinhl __ieee754_sinhf128
|
|
Packit |
6c4009 |
#define __ieee754_sqrtl __ieee754_sqrtf128
|
|
Packit |
6c4009 |
#define __ieee754_y0l __ieee754_y0f128
|
|
Packit |
6c4009 |
#define __ieee754_y1l __ieee754_y1f128
|
|
Packit |
6c4009 |
#define __ieee754_ynl __ieee754_ynf128
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* finite math entry points. */
|
|
Packit |
6c4009 |
#define __acoshl_finite __acoshf128_finite
|
|
Packit |
6c4009 |
#define __acosl_finite __acosf128_finite
|
|
Packit |
6c4009 |
#define __asinl_finite __asinf128_finite
|
|
Packit |
6c4009 |
#define __atan2l_finite __atan2f128_finite
|
|
Packit |
6c4009 |
#define __atanhl_finite __atanhf128_finite
|
|
Packit |
6c4009 |
#define __coshl_finite __coshf128_finite
|
|
Packit |
6c4009 |
#define __cosl_finite __cosf128_finite
|
|
Packit |
6c4009 |
#define __exp10l_finite __exp10f128_finite
|
|
Packit |
6c4009 |
#define __exp2l_finite __exp2f128_finite
|
|
Packit |
6c4009 |
#define __expl_finite __expf128_finite
|
|
Packit |
6c4009 |
#define __fmodl_finite __fmodf128_finite
|
|
Packit |
6c4009 |
#define __hypotl_finite __hypotf128_finite
|
|
Packit |
6c4009 |
#define __ilogbl_finite __ilogbf128_finite
|
|
Packit |
6c4009 |
#define __j0l_finite __j0f128_finite
|
|
Packit |
6c4009 |
#define __j1l_finite __j1f128_finite
|
|
Packit |
6c4009 |
#define __jnl_finite __jnf128_finite
|
|
Packit |
6c4009 |
#define __lgammal_r_finite __lgammaf128_r_finite
|
|
Packit |
6c4009 |
#define __log10l_finite __log10f128_finite
|
|
Packit |
6c4009 |
#define __log2l_finite __log2f128_finite
|
|
Packit |
6c4009 |
#define __logl_finite __logf128_finite
|
|
Packit |
6c4009 |
#define __powl_finite __powf128_finite
|
|
Packit |
6c4009 |
#define __remainderl_finite __remainderf128_finite
|
|
Packit |
6c4009 |
#define __sinhl_finite __sinhf128_finite
|
|
Packit |
6c4009 |
#define __y0l_finite __y0f128_finite
|
|
Packit |
6c4009 |
#define __y1l_finite __y1f128_finite
|
|
Packit |
6c4009 |
#define __ynl_finite __ynf128_finite
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* internal function names. */
|
|
Packit |
6c4009 |
#define __asinhl __asinhf128
|
|
Packit |
6c4009 |
#define __atanl __atanf128
|
|
Packit |
6c4009 |
#define __cbrtl __cbrtf128
|
|
Packit |
6c4009 |
#define __ceill __ceilf128
|
|
Packit |
6c4009 |
#define __copysignl __copysignf128
|
|
Packit |
6c4009 |
#define __cosl __cosf128
|
|
Packit |
6c4009 |
#define __erfcl __erfcf128
|
|
Packit |
6c4009 |
#define __erfl __erff128
|
|
Packit |
6c4009 |
#define __expl __expf128
|
|
Packit |
6c4009 |
#define __expm1l __expm1f128
|
|
Packit |
6c4009 |
#define __fabsl __fabsf128
|
|
Packit |
6c4009 |
#define __fdiml __fdimf128
|
|
Packit |
6c4009 |
#define __finitel __finitef128
|
|
Packit |
6c4009 |
#define __floorl __floorf128
|
|
Packit |
6c4009 |
#define __fmal __fmaf128
|
|
Packit |
6c4009 |
#define __fmaxl __fmaxf128
|
|
Packit |
6c4009 |
#define __fminl __fminf128
|
|
Packit |
6c4009 |
#define __fpclassifyl __fpclassifyf128
|
|
Packit |
6c4009 |
#define __frexpl __frexpf128
|
|
Packit |
6c4009 |
#define __gammal_r_finite __gammaf128_r_finite
|
|
Packit |
6c4009 |
#define __getpayloadl __getpayloadf128
|
|
Packit |
6c4009 |
#define __isinfl __isinff128
|
|
Packit |
6c4009 |
#define __isnanl __isnanf128
|
|
Packit |
6c4009 |
#define __issignalingl __issignalingf128
|
|
Packit |
6c4009 |
#define __ldexpl __ldexpf128
|
|
Packit |
6c4009 |
#define __llrintl __llrintf128
|
|
Packit |
6c4009 |
#define __llroundl __llroundf128
|
|
Packit |
6c4009 |
#define __log1pl __log1pf128
|
|
Packit |
6c4009 |
#define __logbl __logbf128
|
|
Packit |
6c4009 |
#define __logl __logf128
|
|
Packit |
6c4009 |
#define __lrintl __lrintf128
|
|
Packit |
6c4009 |
#define __lroundl __lroundf128
|
|
Packit |
6c4009 |
#define __modfl __modff128
|
|
Packit |
6c4009 |
#define __nearbyintl __nearbyintf128
|
|
Packit |
6c4009 |
#define __nextafterl __nextafterf128
|
|
Packit |
6c4009 |
#define __nextdownl __nextdownf128
|
|
Packit |
6c4009 |
#define __nextupl __nextupf128
|
|
Packit |
6c4009 |
#define __remquol __remquof128
|
|
Packit |
6c4009 |
#define __rintl __rintf128
|
|
Packit |
6c4009 |
#define __roundevenl __roundevenf128
|
|
Packit |
6c4009 |
#define __roundl __roundf128
|
|
Packit |
6c4009 |
#define __scalblnl __scalblnf128
|
|
Packit |
6c4009 |
#define __scalbnl __scalbnf128
|
|
Packit |
6c4009 |
#define __signbitl __signbitf128
|
|
Packit |
6c4009 |
#define __sincosl __sincosf128
|
|
Packit |
6c4009 |
#define __sinl __sinf128
|
|
Packit |
6c4009 |
#define __sqrtl __sqrtf128
|
|
Packit |
6c4009 |
#define __tanhl __tanhf128
|
|
Packit |
6c4009 |
#define __tanl __tanf128
|
|
Packit |
6c4009 |
#define __totalorderl __totalorderf128
|
|
Packit |
6c4009 |
#define __totalordermagl __totalordermagf128
|
|
Packit |
6c4009 |
#define __truncl __truncf128
|
|
Packit |
6c4009 |
#define __x2y2m1l __x2y2m1f128
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#define __faddl __f32addf128
|
|
Packit |
6c4009 |
#define __daddl __f64addf128
|
|
Packit |
6c4009 |
#define __fdivl __f32divf128
|
|
Packit |
6c4009 |
#define __ddivl __f64divf128
|
|
Packit |
6c4009 |
#define __fmull __f32mulf128
|
|
Packit |
6c4009 |
#define __dmull __f64mulf128
|
|
Packit |
6c4009 |
#define __fsubl __f32subf128
|
|
Packit |
6c4009 |
#define __dsubl __f64subf128
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* __nexttowardf128 is not _Float128 API. */
|
|
Packit |
6c4009 |
#define __nexttowardl __nexttowardf128_do_not_use
|
|
Packit |
6c4009 |
#define nexttowardl nexttowardf128_do_not_use
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* public entry points. */
|
|
Packit |
6c4009 |
#define asinhl asinhf128
|
|
Packit |
6c4009 |
#define atanl atanf128
|
|
Packit |
6c4009 |
#define cbrtl cbrtf128
|
|
Packit |
6c4009 |
#define ceill ceilf128
|
|
Packit |
6c4009 |
#define copysignl copysignf128
|
|
Packit |
6c4009 |
#define cosl cosf128
|
|
Packit |
6c4009 |
#define erfcl erfcf128
|
|
Packit |
6c4009 |
#define erfl erff128
|
|
Packit |
6c4009 |
#define expl expf128
|
|
Packit |
6c4009 |
#define expm1l expm1f128
|
|
Packit |
6c4009 |
#define fabsl fabsf128
|
|
Packit |
6c4009 |
#define fdiml fdimf128
|
|
Packit |
6c4009 |
#define finitel finitef128_do_not_use
|
|
Packit |
6c4009 |
#define floorl floorf128
|
|
Packit |
6c4009 |
#define fmal fmaf128
|
|
Packit |
6c4009 |
#define fmaxl fmaxf128
|
|
Packit |
6c4009 |
#define fminl fminf128
|
|
Packit |
6c4009 |
#define frexpl frexpf128
|
|
Packit |
6c4009 |
#define getpayloadl getpayloadf128
|
|
Packit |
6c4009 |
#define isinfl isinff128_do_not_use
|
|
Packit |
6c4009 |
#define isnanl isnanf128_do_not_use
|
|
Packit |
6c4009 |
#define ldexpl ldexpf128
|
|
Packit |
6c4009 |
#define llrintl llrintf128
|
|
Packit |
6c4009 |
#define llroundl llroundf128
|
|
Packit |
6c4009 |
#define log1pl log1pf128
|
|
Packit |
6c4009 |
#define logbl logbf128
|
|
Packit |
6c4009 |
#define logl logf128
|
|
Packit |
6c4009 |
#define lrintl lrintf128
|
|
Packit |
6c4009 |
#define lroundl lroundf128
|
|
Packit |
6c4009 |
#define modfl modff128
|
|
Packit |
6c4009 |
#define nanl nanf128
|
|
Packit |
6c4009 |
#define nearbyintl nearbyintf128
|
|
Packit |
6c4009 |
#define nextafterl nextafterf128
|
|
Packit |
6c4009 |
#define nextdownl nextdownf128
|
|
Packit |
6c4009 |
#define nextupl nextupf128
|
|
Packit |
6c4009 |
#define remquol remquof128
|
|
Packit |
6c4009 |
#define rintl rintf128
|
|
Packit |
6c4009 |
#define roundevenl roundevenf128
|
|
Packit |
6c4009 |
#define roundl roundf128
|
|
Packit |
6c4009 |
#define scalbnl scalbnf128
|
|
Packit |
6c4009 |
#define sincosl sincosf128
|
|
Packit |
6c4009 |
#define sinl sinf128
|
|
Packit |
6c4009 |
#define sqrtl sqrtf128
|
|
Packit |
6c4009 |
#define tanhl tanhf128
|
|
Packit |
6c4009 |
#define tanl tanf128
|
|
Packit |
6c4009 |
#define totalorderl totalorderf128
|
|
Packit |
6c4009 |
#define totalordermagl totalordermagf128
|
|
Packit |
6c4009 |
#define truncl truncf128
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* misc internal renames. */
|
|
Packit |
6c4009 |
#define __builtin_fmal __builtin_fmaf128
|
|
Packit |
6c4009 |
#define __expl_table __expf128_table
|
|
Packit |
6c4009 |
#define __gamma_productl __gamma_productf128
|
|
Packit |
6c4009 |
#define __kernel_cosl __kernel_cosf128
|
|
Packit |
6c4009 |
#define __kernel_rem_pio2l __kernel_rem_pio2f128
|
|
Packit |
6c4009 |
#define __kernel_sincosl __kernel_sincosf128
|
|
Packit |
6c4009 |
#define __kernel_sinl __kernel_sinf128
|
|
Packit |
6c4009 |
#define __kernel_tanl __kernel_tanf128
|
|
Packit |
6c4009 |
#define __lgamma_negl __lgamma_negf128
|
|
Packit |
6c4009 |
#define __lgamma_productl __lgamma_productf128
|
|
Packit |
6c4009 |
#define __mpn_extract_long_double __mpn_extract_float128
|
|
Packit |
6c4009 |
#define __sincosl_table __sincosf128_table
|
|
Packit |
6c4009 |
#define mul_splitl mul_splitf128
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Builtin renames. */
|
|
Packit |
6c4009 |
#define __builtin_copysignl __builtin_copysignf128
|
|
Packit |
6c4009 |
#define __builtin_signbitl __builtin_signbit
|
|
Packit Service |
915b5d |
#define __builtin_nearbyintl __builtin_nearbyintf128
|
|
Packit Service |
abe25a |
#define __builtin_rintl __builtin_rintf128
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get the constant suffix from bits/floatn-compat.h. */
|
|
Packit |
6c4009 |
#define L(x) __f128 (x)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
static inline void
|
|
Packit |
6c4009 |
mul_splitf128 (_Float128 *hi, _Float128 *lo, _Float128 x, _Float128 y)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
#ifdef __FP_FAST_FMAF128
|
|
Packit |
6c4009 |
/* Fast built-in fused multiply-add. */
|
|
Packit |
6c4009 |
*hi = x * y;
|
|
Packit |
6c4009 |
*lo = __builtin_fmal (x, y, -*hi);
|
|
Packit |
6c4009 |
#else
|
|
Packit |
6c4009 |
/* Apply Dekker's algorithm. */
|
|
Packit |
6c4009 |
*hi = x * y;
|
|
Packit |
6c4009 |
# define C ((1LL << (FLT128_MANT_DIG + 1) / 2) + 1)
|
|
Packit |
6c4009 |
_Float128 x1 = x * C;
|
|
Packit |
6c4009 |
_Float128 y1 = y * C;
|
|
Packit |
6c4009 |
# undef C
|
|
Packit |
6c4009 |
x1 = (x - x1) + x1;
|
|
Packit |
6c4009 |
y1 = (y - y1) + y1;
|
|
Packit |
6c4009 |
_Float128 x2 = x - x1;
|
|
Packit |
6c4009 |
_Float128 y2 = y - y1;
|
|
Packit |
6c4009 |
*lo = (((x1 * y1 - *hi) + x1 * y2) + x2 * y1) + x2 * y2;
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
}
|