111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// -*- C++ -*-
211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert//===---------------------------- math.h ----------------------------------===//
311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert//
411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert//                     The LLVM Compiler Infrastructure
511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert//
611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// This file is dual licensed under the MIT and the University of Illinois Open
711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// Source Licenses. See LICENSE.TXT for details.
811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert//
911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert//===----------------------------------------------------------------------===//
1011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
1111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _LIBCPP_MATH_H
1211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define _LIBCPP_MATH_H
1311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
1411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/*
1511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    math.h synopsis
1611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
1711cd02dfb91661c65134cac258cf5924270e9d2Dan AlbertMacros:
1811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
1911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    HUGE_VAL
2011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    HUGE_VALF               // C99
2111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    HUGE_VALL               // C99
2211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    INFINITY                // C99
2311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    NAN                     // C99
2411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_INFINITE             // C99
2511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_NAN                  // C99
2611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_NORMAL               // C99
2711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_SUBNORMAL            // C99
2811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_ZERO                 // C99
2911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_FAST_FMA             // C99
3011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_FAST_FMAF            // C99
3111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_FAST_FMAL            // C99
3211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_ILOGB0               // C99
3311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    FP_ILOGBNAN             // C99
3411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    MATH_ERRNO              // C99
3511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    MATH_ERREXCEPT          // C99
3611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    math_errhandling        // C99
3711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
3811cd02dfb91661c65134cac258cf5924270e9d2Dan AlbertTypes:
3911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
4011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    float_t                 // C99
4111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    double_t                // C99
4211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
4311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// C90
4411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
4511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point abs(floating_point x);
4611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
4711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point acos (arithmetic x);
4811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          acosf(float x);
4911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    acosl(long double x);
5011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
5111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point asin (arithmetic x);
5211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          asinf(float x);
5311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    asinl(long double x);
5411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
5511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point atan (arithmetic x);
5611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          atanf(float x);
5711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    atanl(long double x);
5811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
5911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point atan2 (arithmetic y, arithmetic x);
6011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          atan2f(float y, float x);
6111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    atan2l(long double y, long double x);
6211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
6311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point ceil (arithmetic x);
6411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          ceilf(float x);
6511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    ceill(long double x);
6611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
6711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point cos (arithmetic x);
6811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          cosf(float x);
6911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    cosl(long double x);
7011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
7111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point cosh (arithmetic x);
7211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          coshf(float x);
7311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    coshl(long double x);
7411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
7511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point exp (arithmetic x);
7611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          expf(float x);
7711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    expl(long double x);
7811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
7911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point fabs (arithmetic x);
8011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          fabsf(float x);
8111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    fabsl(long double x);
8211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
8311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point floor (arithmetic x);
8411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          floorf(float x);
8511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    floorl(long double x);
8611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
8711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point fmod (arithmetic x, arithmetic y);
8811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          fmodf(float x, float y);
8911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    fmodl(long double x, long double y);
9011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
9111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point frexp (arithmetic value, int* exp);
9211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          frexpf(float value, int* exp);
9311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    frexpl(long double value, int* exp);
9411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
9511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point ldexp (arithmetic value, int exp);
9611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          ldexpf(float value, int exp);
9711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    ldexpl(long double value, int exp);
9811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
9911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point log (arithmetic x);
10011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          logf(float x);
10111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    logl(long double x);
10211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
10311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point log10 (arithmetic x);
10411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          log10f(float x);
10511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    log10l(long double x);
10611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
10711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point modf (floating_point value, floating_point* iptr);
10811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          modff(float value, float* iptr);
10911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    modfl(long double value, long double* iptr);
11011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
11111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point pow (arithmetic x, arithmetic y);
11211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          powf(float x, float y);
11311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    powl(long double x, long double y);
11411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
11511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point sin (arithmetic x);
11611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          sinf(float x);
11711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    sinl(long double x);
11811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
11911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point sinh (arithmetic x);
12011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          sinhf(float x);
12111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    sinhl(long double x);
12211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
12311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point sqrt (arithmetic x);
12411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          sqrtf(float x);
12511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    sqrtl(long double x);
12611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
12711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point tan (arithmetic x);
12811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          tanf(float x);
12911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    tanl(long double x);
13011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
13111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point tanh (arithmetic x);
13211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          tanhf(float x);
13311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    tanhl(long double x);
13411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
13511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert//  C99
13611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
13711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool signbit(arithmetic x);
13811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
13911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertint fpclassify(arithmetic x);
14011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
14111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool isfinite(arithmetic x);
14211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool isinf(arithmetic x);
14311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool isnan(arithmetic x);
14411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool isnormal(arithmetic x);
14511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
14611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool isgreater(arithmetic x, arithmetic y);
14711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool isgreaterequal(arithmetic x, arithmetic y);
14811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool isless(arithmetic x, arithmetic y);
14911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool islessequal(arithmetic x, arithmetic y);
15011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool islessgreater(arithmetic x, arithmetic y);
15111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool isunordered(arithmetic x, arithmetic y);
15211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
15311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point acosh (arithmetic x);
15411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          acoshf(float x);
15511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    acoshl(long double x);
15611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
15711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point asinh (arithmetic x);
15811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          asinhf(float x);
15911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    asinhl(long double x);
16011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
16111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point atanh (arithmetic x);
16211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          atanhf(float x);
16311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    atanhl(long double x);
16411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
16511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point cbrt (arithmetic x);
16611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          cbrtf(float x);
16711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    cbrtl(long double x);
16811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
16911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point copysign (arithmetic x, arithmetic y);
17011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          copysignf(float x, float y);
17111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    copysignl(long double x, long double y);
17211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
17311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point erf (arithmetic x);
17411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          erff(float x);
17511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    erfl(long double x);
17611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
17711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point erfc (arithmetic x);
17811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          erfcf(float x);
17911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    erfcl(long double x);
18011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
18111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point exp2 (arithmetic x);
18211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          exp2f(float x);
18311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    exp2l(long double x);
18411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
18511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point expm1 (arithmetic x);
18611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          expm1f(float x);
18711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    expm1l(long double x);
18811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
18911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point fdim (arithmetic x, arithmetic y);
19011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          fdimf(float x, float y);
19111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    fdiml(long double x, long double y);
19211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
19311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point fma (arithmetic x, arithmetic y, arithmetic z);
19411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          fmaf(float x, float y, float z);
19511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    fmal(long double x, long double y, long double z);
19611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
19711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point fmax (arithmetic x, arithmetic y);
19811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          fmaxf(float x, float y);
19911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    fmaxl(long double x, long double y);
20011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
20111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point fmin (arithmetic x, arithmetic y);
20211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          fminf(float x, float y);
20311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    fminl(long double x, long double y);
20411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
20511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point hypot (arithmetic x, arithmetic y);
20611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          hypotf(float x, float y);
20711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    hypotl(long double x, long double y);
20811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
20911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertint ilogb (arithmetic x);
21011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertint ilogbf(float x);
21111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertint ilogbl(long double x);
21211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
21311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point lgamma (arithmetic x);
21411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          lgammaf(float x);
21511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    lgammal(long double x);
21611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
21711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong long llrint (arithmetic x);
21811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong long llrintf(float x);
21911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong long llrintl(long double x);
22011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
22111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong long llround (arithmetic x);
22211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong long llroundf(float x);
22311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong long llroundl(long double x);
22411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
22511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point log1p (arithmetic x);
22611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          log1pf(float x);
22711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    log1pl(long double x);
22811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
22911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point log2 (arithmetic x);
23011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          log2f(float x);
23111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    log2l(long double x);
23211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
23311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point logb (arithmetic x);
23411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          logbf(float x);
23511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    logbl(long double x);
23611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
23711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong lrint (arithmetic x);
23811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong lrintf(float x);
23911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong lrintl(long double x);
24011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
24111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong lround (arithmetic x);
24211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong lroundf(float x);
24311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong lroundl(long double x);
24411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
24511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertdouble      nan (const char* str);
24611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat       nanf(const char* str);
24711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double nanl(const char* str);
24811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
24911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point nearbyint (arithmetic x);
25011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          nearbyintf(float x);
25111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    nearbyintl(long double x);
25211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
25311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point nextafter (arithmetic x, arithmetic y);
25411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          nextafterf(float x, float y);
25511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    nextafterl(long double x, long double y);
25611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
25711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point nexttoward (arithmetic x, long double y);
25811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          nexttowardf(float x, long double y);
25911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    nexttowardl(long double x, long double y);
26011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
26111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point remainder (arithmetic x, arithmetic y);
26211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          remainderf(float x, float y);
26311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    remainderl(long double x, long double y);
26411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
26511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point remquo (arithmetic x, arithmetic y, int* pquo);
26611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          remquof(float x, float y, int* pquo);
26711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    remquol(long double x, long double y, int* pquo);
26811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
26911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point rint (arithmetic x);
27011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          rintf(float x);
27111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    rintl(long double x);
27211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
27311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point round (arithmetic x);
27411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          roundf(float x);
27511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    roundl(long double x);
27611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
27711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point scalbln (arithmetic x, long ex);
27811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          scalblnf(float x, long ex);
27911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    scalblnl(long double x, long ex);
28011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
28111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point scalbn (arithmetic x, int ex);
28211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          scalbnf(float x, int ex);
28311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    scalbnl(long double x, int ex);
28411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
28511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point tgamma (arithmetic x);
28611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          tgammaf(float x);
28711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    tgammal(long double x);
28811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
28911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloating_point trunc (arithmetic x);
29011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat          truncf(float x);
29111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double    truncl(long double x);
29211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
29311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert*/
29411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
29511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#include <__config>
29611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
29711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
29811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#pragma GCC system_header
29911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
30011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
30111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#include_next <math.h>
30211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
30311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef __cplusplus
30411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
30511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// We support including .h headers inside 'extern "C"' contexts, so switch
30611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// back to C++ linkage before including these C++ headers.
30711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertextern "C++" {
30811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
30911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#include <type_traits>
31011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
31111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef _LIBCPP_MSVCRT
31211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#include "support/win32/math_win32.h"
31311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
31411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
31511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// signbit
31611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
31711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef signbit
31811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
31911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
32011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
32111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
32211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_signbit(_A1 __lcpp_x) _NOEXCEPT
32311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
32411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return signbit(__lcpp_x);
32511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
32611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
32711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef signbit
32811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
32911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
33011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
33111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
33211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertsignbit(_A1 __lcpp_x) _NOEXCEPT
33311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
33411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_signbit((typename std::__promote<_A1>::type)__lcpp_x);
33511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
33611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
33711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // signbit
33811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
33911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// fpclassify
34011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
34111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef fpclassify
34211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
34311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
34411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
34511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertint
34611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_fpclassify(_A1 __lcpp_x) _NOEXCEPT
34711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
34811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return fpclassify(__lcpp_x);
34911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
35011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
35111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef fpclassify
35211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
35311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
35411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
35511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_arithmetic<_A1>::value, int>::type
35611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfpclassify(_A1 __lcpp_x) _NOEXCEPT
35711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
35811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_fpclassify((typename std::__promote<_A1>::type)__lcpp_x);
35911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
36011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
36111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // fpclassify
36211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
36311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// isfinite
36411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
36511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef isfinite
36611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
36711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
36811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
36911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
37011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
37111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
37211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return isfinite(__lcpp_x);
37311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
37411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
37511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef isfinite
37611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
37711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
37811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
37911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
38011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertisfinite(_A1 __lcpp_x) _NOEXCEPT
38111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
38211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_isfinite((typename std::__promote<_A1>::type)__lcpp_x);
38311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
38411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
38511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // isfinite
38611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
38711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// isinf
38811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
38911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef isinf
39011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
39111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
39211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
39311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
39411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
39511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
39611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return isinf(__lcpp_x);
39711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
39811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
39911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef isinf
40011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
40111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
40211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
40311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
40411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertisinf(_A1 __lcpp_x) _NOEXCEPT
40511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
40611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_isinf((typename std::__promote<_A1>::type)__lcpp_x);
40711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
40811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
40911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // isinf
41011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
41111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// isnan
41211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
41311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef isnan
41411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
41511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
41611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
41711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
41811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
41911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
42011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return isnan(__lcpp_x);
42111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
42211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
42311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef isnan
42411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
42511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
42611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
42711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
42811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertisnan(_A1 __lcpp_x) _NOEXCEPT
42911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
43011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_isnan((typename std::__promote<_A1>::type)__lcpp_x);
43111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
43211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
43311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // isnan
43411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
43511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// isnormal
43611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
43711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef isnormal
43811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
43911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
44011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
44111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
44211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_isnormal(_A1 __lcpp_x) _NOEXCEPT
44311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
44411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return isnormal(__lcpp_x);
44511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
44611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
44711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef isnormal
44811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
44911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
45011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
45111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
45211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertisnormal(_A1 __lcpp_x) _NOEXCEPT
45311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
45411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_isnormal((typename std::__promote<_A1>::type)__lcpp_x);
45511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
45611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
45711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // isnormal
45811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
45911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// isgreater
46011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
46111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef isgreater
46211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
46311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
46411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
46511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
46611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
46711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
46811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return isgreater(__lcpp_x, __lcpp_y);
46911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
47011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
47111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef isgreater
47211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
47311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
47411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
47511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if
47611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
47711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
47811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
47911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    bool
48011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
48111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertisgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
48211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
48311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type type;
48411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_isgreater((type)__lcpp_x, (type)__lcpp_y);
48511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
48611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
48711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // isgreater
48811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
48911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// isgreaterequal
49011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
49111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef isgreaterequal
49211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
49311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
49411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
49511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
49611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
49711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
49811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return isgreaterequal(__lcpp_x, __lcpp_y);
49911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
50011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
50111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef isgreaterequal
50211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
50311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
50411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
50511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if
50611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
50711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
50811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
50911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    bool
51011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
51111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertisgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
51211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
51311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type type;
51411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_isgreaterequal((type)__lcpp_x, (type)__lcpp_y);
51511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
51611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
51711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // isgreaterequal
51811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
51911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// isless
52011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
52111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef isless
52211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
52311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
52411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
52511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
52611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
52711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
52811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return isless(__lcpp_x, __lcpp_y);
52911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
53011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
53111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef isless
53211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
53311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
53411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
53511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if
53611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
53711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
53811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
53911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    bool
54011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
54111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertisless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
54211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
54311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type type;
54411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_isless((type)__lcpp_x, (type)__lcpp_y);
54511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
54611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
54711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // isless
54811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
54911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// islessequal
55011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
55111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef islessequal
55211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
55311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
55411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
55511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
55611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
55711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
55811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return islessequal(__lcpp_x, __lcpp_y);
55911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
56011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
56111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef islessequal
56211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
56311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
56411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
56511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if
56611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
56711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
56811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
56911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    bool
57011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
57111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertislessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
57211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
57311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type type;
57411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_islessequal((type)__lcpp_x, (type)__lcpp_y);
57511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
57611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
57711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // islessequal
57811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
57911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// islessgreater
58011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
58111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef islessgreater
58211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
58311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
58411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
58511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
58611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
58711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
58811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return islessgreater(__lcpp_x, __lcpp_y);
58911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
59011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
59111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef islessgreater
59211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
59311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
59411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
59511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if
59611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
59711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
59811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
59911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    bool
60011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
60111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertislessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
60211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
60311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type type;
60411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_islessgreater((type)__lcpp_x, (type)__lcpp_y);
60511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
60611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
60711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // islessgreater
60811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
60911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// isunordered
61011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
61111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifdef isunordered
61211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
61311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
61411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_LIBCPP_ALWAYS_INLINE
61511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertbool
61611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert__libcpp_isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
61711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
61811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return isunordered(__lcpp_x, __lcpp_y);
61911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
62011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
62111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#undef isunordered
62211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
62311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
62411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
62511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if
62611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
62711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
62811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
62911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    bool
63011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
63111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertisunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
63211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
63311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type type;
63411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return __libcpp_isunordered((type)__lcpp_x, (type)__lcpp_y);
63511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
63611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
63711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // isunordered
63811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
63911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef __sun__
64011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
64111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// abs
64211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
64311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !defined(_AIX)
64411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
64511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloat
64611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertabs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
64711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
64811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
64911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertdouble
65011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertabs(double __lcpp_x) _NOEXCEPT {return fabs(__lcpp_x);}
65111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
65211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
65311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlong double
65411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertabs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
65511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif // !defined(_AIX)
65611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
65711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// acos
65811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
65911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
66011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       acos(float __lcpp_x) _NOEXCEPT       {return acosf(__lcpp_x);}
66111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return acosl(__lcpp_x);}
66211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
66311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
66411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
66511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
66611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
66711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertacos(_A1 __lcpp_x) _NOEXCEPT {return acos((double)__lcpp_x);}
66811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
66911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// asin
67011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
67111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
67211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       asin(float __lcpp_x) _NOEXCEPT       {return asinf(__lcpp_x);}
67311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return asinl(__lcpp_x);}
67411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
67511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
67611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
67711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
67811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
67911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertasin(_A1 __lcpp_x) _NOEXCEPT {return asin((double)__lcpp_x);}
68011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
68111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// atan
68211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
68311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
68411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       atan(float __lcpp_x) _NOEXCEPT       {return atanf(__lcpp_x);}
68511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return atanl(__lcpp_x);}
68611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
68711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
68811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
68911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
69011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
69111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertatan(_A1 __lcpp_x) _NOEXCEPT {return atan((double)__lcpp_x);}
69211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
69311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// atan2
69411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
69511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
69611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT             {return atan2f(__lcpp_y, __lcpp_x);}
69711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return atan2l(__lcpp_y, __lcpp_x);}
69811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
69911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
70011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
70111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
70211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
70311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
70411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
70511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
70611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
70711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
70811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertatan2(_A1 __lcpp_y, _A2 __lcpp_x) _NOEXCEPT
70911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
71011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
71111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
71211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
71311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return atan2((__result_type)__lcpp_y, (__result_type)__lcpp_x);
71411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
71511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
71611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// ceil
71711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
71811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
71911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       ceil(float __lcpp_x) _NOEXCEPT       {return ceilf(__lcpp_x);}
72011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ceill(__lcpp_x);}
72111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
72211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
72311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
72411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
72511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
72611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertceil(_A1 __lcpp_x) _NOEXCEPT {return ceil((double)__lcpp_x);}
72711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
72811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// cos
72911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
73011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
73111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       cos(float __lcpp_x) _NOEXCEPT       {return cosf(__lcpp_x);}
73211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return cosl(__lcpp_x);}
73311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
73411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
73511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
73611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
73711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
73811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertcos(_A1 __lcpp_x) _NOEXCEPT {return cos((double)__lcpp_x);}
73911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
74011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// cosh
74111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
74211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
74311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       cosh(float __lcpp_x) _NOEXCEPT       {return coshf(__lcpp_x);}
74411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return coshl(__lcpp_x);}
74511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
74611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
74711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
74811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
74911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
75011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertcosh(_A1 __lcpp_x) _NOEXCEPT {return cosh((double)__lcpp_x);}
75111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
75211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// exp
75311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
75411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
75511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       exp(float __lcpp_x) _NOEXCEPT       {return expf(__lcpp_x);}
75611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return expl(__lcpp_x);}
75711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
75811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
75911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
76011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
76111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
76211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertexp(_A1 __lcpp_x) _NOEXCEPT {return exp((double)__lcpp_x);}
76311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
76411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// fabs
76511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
76611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
76711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       fabs(float __lcpp_x) _NOEXCEPT       {return fabsf(__lcpp_x);}
76811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
76911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
77011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
77111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
77211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
77311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
77411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfabs(_A1 __lcpp_x) _NOEXCEPT {return fabs((double)__lcpp_x);}
77511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
77611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// floor
77711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
77811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
77911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       floor(float __lcpp_x) _NOEXCEPT       {return floorf(__lcpp_x);}
78011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return floorl(__lcpp_x);}
78111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
78211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
78311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
78411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
78511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
78611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfloor(_A1 __lcpp_x) _NOEXCEPT {return floor((double)__lcpp_x);}
78711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
78811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// fmod
78911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
79011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
79111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return fmodf(__lcpp_x, __lcpp_y);}
79211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmodl(__lcpp_x, __lcpp_y);}
79311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
79411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
79511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
79611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
79711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
79811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
79911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
80011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
80111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
80211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
80311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfmod(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
80411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
80511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
80611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
80711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
80811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return fmod((__result_type)__lcpp_x, (__result_type)__lcpp_y);
80911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
81011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
81111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// frexp
81211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
81311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
81411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT       {return frexpf(__lcpp_x, __lcpp_e);}
81511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexpl(__lcpp_x, __lcpp_e);}
81611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
81711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
81811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
81911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
82011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
82111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfrexp(_A1 __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexp((double)__lcpp_x, __lcpp_e);}
82211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
82311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// ldexp
82411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
82511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
82611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT       {return ldexpf(__lcpp_x, __lcpp_e);}
82711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexpl(__lcpp_x, __lcpp_e);}
82811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
82911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
83011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
83111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
83211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
83311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertldexp(_A1 __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexp((double)__lcpp_x, __lcpp_e);}
83411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
83511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// log
83611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
83711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
83811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       log(float __lcpp_x) _NOEXCEPT       {return logf(__lcpp_x);}
83911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return logl(__lcpp_x);}
84011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
84111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
84211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
84311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
84411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
84511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlog(_A1 __lcpp_x) _NOEXCEPT {return log((double)__lcpp_x);}
84611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
84711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// log10
84811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
84911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
85011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       log10(float __lcpp_x) _NOEXCEPT       {return log10f(__lcpp_x);}
85111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return log10l(__lcpp_x);}
85211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
85311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
85411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
85511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
85611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
85711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlog10(_A1 __lcpp_x) _NOEXCEPT {return log10((double)__lcpp_x);}
85811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
85911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// modf
86011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
86111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
86211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT             {return modff(__lcpp_x, __lcpp_y);}
86311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return modfl(__lcpp_x, __lcpp_y);}
86411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
86511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
86611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// pow
86711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
86811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
86911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return powf(__lcpp_x, __lcpp_y);}
87011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return powl(__lcpp_x, __lcpp_y);}
87111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
87211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
87311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
87411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
87511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
87611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
87711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
87811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
87911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
88011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
88111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertpow(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
88211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
88311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
88411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
88511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
88611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return pow((__result_type)__lcpp_x, (__result_type)__lcpp_y);
88711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
88811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
88911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// sin
89011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
89111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
89211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       sin(float __lcpp_x) _NOEXCEPT       {return sinf(__lcpp_x);}
89311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return sinl(__lcpp_x);}
89411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
89511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
89611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
89711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
89811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
89911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertsin(_A1 __lcpp_x) _NOEXCEPT {return sin((double)__lcpp_x);}
90011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
90111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// sinh
90211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
90311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
90411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       sinh(float __lcpp_x) _NOEXCEPT       {return sinhf(__lcpp_x);}
90511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return sinhl(__lcpp_x);}
90611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
90711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
90811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
90911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
91011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
91111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertsinh(_A1 __lcpp_x) _NOEXCEPT {return sinh((double)__lcpp_x);}
91211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
91311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// sqrt
91411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
91511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
91611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       sqrt(float __lcpp_x) _NOEXCEPT       {return sqrtf(__lcpp_x);}
91711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return sqrtl(__lcpp_x);}
91811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
91911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
92011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif // __sun__
92111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
92211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
92311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
92411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertsqrt(_A1 __lcpp_x) _NOEXCEPT {return sqrt((double)__lcpp_x);}
92511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef __sun__
92611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
92711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// tan
92811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
92911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
93011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       tan(float __lcpp_x) _NOEXCEPT       {return tanf(__lcpp_x);}
93111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return tanl(__lcpp_x);}
93211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
93311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
93411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
93511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
93611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
93711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttan(_A1 __lcpp_x) _NOEXCEPT {return tan((double)__lcpp_x);}
93811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
93911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// tanh
94011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
94111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
94211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       tanh(float __lcpp_x) _NOEXCEPT       {return tanhf(__lcpp_x);}
94311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return tanhl(__lcpp_x);}
94411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
94511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
94611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
94711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
94811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
94911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttanh(_A1 __lcpp_x) _NOEXCEPT {return tanh((double)__lcpp_x);}
95011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
95111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// acosh
95211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
95311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _LIBCPP_MSVCRT
95411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       acosh(float __lcpp_x) _NOEXCEPT       {return acoshf(__lcpp_x);}
95511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double acosh(long double __lcpp_x) _NOEXCEPT {return acoshl(__lcpp_x);}
95611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
95711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
95811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
95911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
96011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertacosh(_A1 __lcpp_x) _NOEXCEPT {return acosh((double)__lcpp_x);}
96111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
96211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
96311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// asinh
96411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
96511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _LIBCPP_MSVCRT
96611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       asinh(float __lcpp_x) _NOEXCEPT       {return asinhf(__lcpp_x);}
96711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double asinh(long double __lcpp_x) _NOEXCEPT {return asinhl(__lcpp_x);}
96811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
96911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
97011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
97111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
97211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertasinh(_A1 __lcpp_x) _NOEXCEPT {return asinh((double)__lcpp_x);}
97311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
97411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
97511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// atanh
97611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
97711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _LIBCPP_MSVCRT
97811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       atanh(float __lcpp_x) _NOEXCEPT       {return atanhf(__lcpp_x);}
97911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double atanh(long double __lcpp_x) _NOEXCEPT {return atanhl(__lcpp_x);}
98011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
98111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
98211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
98311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
98411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertatanh(_A1 __lcpp_x) _NOEXCEPT {return atanh((double)__lcpp_x);}
98511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
98611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
98711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// cbrt
98811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
98911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _LIBCPP_MSVCRT
99011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       cbrt(float __lcpp_x) _NOEXCEPT       {return cbrtf(__lcpp_x);}
99111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return cbrtl(__lcpp_x);}
99211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
99311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
99411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
99511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
99611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertcbrt(_A1 __lcpp_x) _NOEXCEPT {return cbrt((double)__lcpp_x);}
99711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
99811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
99911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// copysign
100011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
100111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if !defined(_VC_CRT_MAJOR_VERSION) || (_VC_CRT_MAJOR_VERSION < 12)
100211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float copysign(float __lcpp_x,
100311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                                                float __lcpp_y) _NOEXCEPT {
100411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert  return copysignf(__lcpp_x, __lcpp_y);
100511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
100611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double
100711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertcopysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
100811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert  return copysignl(__lcpp_x, __lcpp_y);
100911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
101011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
101111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
101211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
101311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
101411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
101511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
101611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
101711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
101811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
101911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
102011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertcopysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
102111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
102211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
102311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
102411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
102511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return copysign((__result_type)__lcpp_x, (__result_type)__lcpp_y);
102611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
102711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
102811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _LIBCPP_MSVCRT
102911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
103011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// erf
103111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
103211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       erf(float __lcpp_x) _NOEXCEPT       {return erff(__lcpp_x);}
103311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double erf(long double __lcpp_x) _NOEXCEPT {return erfl(__lcpp_x);}
103411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
103511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
103611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
103711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
103811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberterf(_A1 __lcpp_x) _NOEXCEPT {return erf((double)__lcpp_x);}
103911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
104011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// erfc
104111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
104211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       erfc(float __lcpp_x) _NOEXCEPT       {return erfcf(__lcpp_x);}
104311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double erfc(long double __lcpp_x) _NOEXCEPT {return erfcl(__lcpp_x);}
104411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
104511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
104611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
104711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
104811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberterfc(_A1 __lcpp_x) _NOEXCEPT {return erfc((double)__lcpp_x);}
104911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
105011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// exp2
105111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
105211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       exp2(float __lcpp_x) _NOEXCEPT       {return exp2f(__lcpp_x);}
105311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double exp2(long double __lcpp_x) _NOEXCEPT {return exp2l(__lcpp_x);}
105411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
105511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
105611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
105711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
105811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertexp2(_A1 __lcpp_x) _NOEXCEPT {return exp2((double)__lcpp_x);}
105911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
106011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// expm1
106111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
106211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       expm1(float __lcpp_x) _NOEXCEPT       {return expm1f(__lcpp_x);}
106311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double expm1(long double __lcpp_x) _NOEXCEPT {return expm1l(__lcpp_x);}
106411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
106511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
106611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
106711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
106811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertexpm1(_A1 __lcpp_x) _NOEXCEPT {return expm1((double)__lcpp_x);}
106911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
107011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// fdim
107111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
107211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       fdim(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return fdimf(__lcpp_x, __lcpp_y);}
107311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fdiml(__lcpp_x, __lcpp_y);}
107411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
107511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
107611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
107711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
107811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
107911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
108011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
108111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
108211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
108311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfdim(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
108411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
108511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
108611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
108711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
108811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return fdim((__result_type)__lcpp_x, (__result_type)__lcpp_y);
108911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
109011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
109111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// fma
109211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
109311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       fma(float __lcpp_x, float __lcpp_y, float __lcpp_z) _NOEXCEPT                   {return fmaf(__lcpp_x, __lcpp_y, __lcpp_z);}
109411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double fma(long double __lcpp_x, long double __lcpp_y, long double __lcpp_z) _NOEXCEPT {return fmal(__lcpp_x, __lcpp_y, __lcpp_z);}
109511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
109611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2, class _A3>
109711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
109811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
109911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
110011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
110111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value &&
110211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A3>::value,
110311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2, _A3>
110411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
110511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfma(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT
110611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
110711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2, _A3>::type __result_type;
110811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
110911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value &&
111011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A3, __result_type>::value)), "");
111111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return fma((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
111211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
111311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
111411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// fmax
111511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
111611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return fmaxf(__lcpp_x, __lcpp_y);}
111711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmaxl(__lcpp_x, __lcpp_y);}
111811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
111911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
112011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
112111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
112211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
112311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
112411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
112511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
112611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
112711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
112811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
112911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
113011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
113111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
113211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return fmax((__result_type)__lcpp_x, (__result_type)__lcpp_y);
113311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
113411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
113511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// fmin
113611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
113711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       fmin(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return fminf(__lcpp_x, __lcpp_y);}
113811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fminl(__lcpp_x, __lcpp_y);}
113911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
114011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
114111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
114211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
114311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
114411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
114511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
114611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
114711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
114811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertfmin(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
114911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
115011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
115111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
115211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
115311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return fmin((__result_type)__lcpp_x, (__result_type)__lcpp_y);
115411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
115511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
115611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// hypot
115711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
115811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       hypot(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return hypotf(__lcpp_x, __lcpp_y);}
115911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double hypot(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return hypotl(__lcpp_x, __lcpp_y);}
116011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
116111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
116211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
116311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
116411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
116511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
116611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
116711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
116811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
116911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberthypot(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
117011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
117111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
117211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
117311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
117411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y);
117511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
117611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
117711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// ilogb
117811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
117911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY int ilogb(float __lcpp_x) _NOEXCEPT       {return ilogbf(__lcpp_x);}
118011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY int ilogb(long double __lcpp_x) _NOEXCEPT {return ilogbl(__lcpp_x);}
118111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
118211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
118311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
118411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, int>::type
118511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertilogb(_A1 __lcpp_x) _NOEXCEPT {return ilogb((double)__lcpp_x);}
118611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
118711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// lgamma
118811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
118911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       lgamma(float __lcpp_x) _NOEXCEPT       {return lgammaf(__lcpp_x);}
119011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __lcpp_x) _NOEXCEPT {return lgammal(__lcpp_x);}
119111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
119211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
119311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
119411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
119511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlgamma(_A1 __lcpp_x) _NOEXCEPT {return lgamma((double)__lcpp_x);}
119611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
119711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// llrint
119811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
119911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT       {return llrintf(__lcpp_x);}
120011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEPT {return llrintl(__lcpp_x);}
120111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
120211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
120311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
120411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, long long>::type
120511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertllrint(_A1 __lcpp_x) _NOEXCEPT {return llrint((double)__lcpp_x);}
120611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
120711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// llround
120811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
120911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long long llround(float __lcpp_x) _NOEXCEPT       {return llroundf(__lcpp_x);}
121011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCEPT {return llroundl(__lcpp_x);}
121111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
121211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
121311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
121411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, long long>::type
121511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertllround(_A1 __lcpp_x) _NOEXCEPT {return llround((double)__lcpp_x);}
121611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
121711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// log1p
121811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
121911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       log1p(float __lcpp_x) _NOEXCEPT       {return log1pf(__lcpp_x);}
122011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double log1p(long double __lcpp_x) _NOEXCEPT {return log1pl(__lcpp_x);}
122111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
122211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
122311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
122411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
122511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlog1p(_A1 __lcpp_x) _NOEXCEPT {return log1p((double)__lcpp_x);}
122611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
122711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// log2
122811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
122911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       log2(float __lcpp_x) _NOEXCEPT       {return log2f(__lcpp_x);}
123011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return log2l(__lcpp_x);}
123111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
123211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
123311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
123411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
123511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlog2(_A1 __lcpp_x) _NOEXCEPT {return log2((double)__lcpp_x);}
123611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
123711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// logb
123811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
123911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       logb(float __lcpp_x) _NOEXCEPT       {return logbf(__lcpp_x);}
124011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return logbl(__lcpp_x);}
124111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
124211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
124311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
124411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
124511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlogb(_A1 __lcpp_x) _NOEXCEPT {return logb((double)__lcpp_x);}
124611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
124711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// lrint
124811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
124911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long lrint(float __lcpp_x) _NOEXCEPT       {return lrintf(__lcpp_x);}
125011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT {return lrintl(__lcpp_x);}
125111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
125211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
125311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
125411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, long>::type
125511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlrint(_A1 __lcpp_x) _NOEXCEPT {return lrint((double)__lcpp_x);}
125611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
125711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// lround
125811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
125911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long lround(float __lcpp_x) _NOEXCEPT       {return lroundf(__lcpp_x);}
126011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT {return lroundl(__lcpp_x);}
126111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
126211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
126311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
126411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, long>::type
126511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertlround(_A1 __lcpp_x) _NOEXCEPT {return lround((double)__lcpp_x);}
126611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
126711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// nan
126811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
126911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// nearbyint
127011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
127111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       nearbyint(float __lcpp_x) _NOEXCEPT       {return nearbyintf(__lcpp_x);}
127211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double nearbyint(long double __lcpp_x) _NOEXCEPT {return nearbyintl(__lcpp_x);}
127311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
127411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
127511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
127611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
127711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertnearbyint(_A1 __lcpp_x) _NOEXCEPT {return nearbyint((double)__lcpp_x);}
127811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
127911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// nextafter
128011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
128111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       nextafter(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return nextafterf(__lcpp_x, __lcpp_y);}
128211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nextafterl(__lcpp_x, __lcpp_y);}
128311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
128411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
128511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
128611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
128711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
128811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
128911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
129011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
129111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
129211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertnextafter(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
129311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
129411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
129511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
129611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
129711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return nextafter((__result_type)__lcpp_x, (__result_type)__lcpp_y);
129811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
129911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
130011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// nexttoward
130111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
130211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT       {return nexttowardf(__lcpp_x, __lcpp_y);}
130311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttowardl(__lcpp_x, __lcpp_y);}
130411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
130511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
130611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
130711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
130811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertnexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttoward((double)__lcpp_x, __lcpp_y);}
130911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
131011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// remainder
131111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
131211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       remainder(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return remainderf(__lcpp_x, __lcpp_y);}
131311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return remainderl(__lcpp_x, __lcpp_y);}
131411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
131511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
131611cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
131711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
131811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
131911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
132011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
132111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
132211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
132311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertremainder(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
132411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
132511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
132611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
132711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
132811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return remainder((__result_type)__lcpp_x, (__result_type)__lcpp_y);
132911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
133011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
133111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// remquo
133211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
133311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       remquo(float __lcpp_x, float __lcpp_y, int* __lcpp_z) _NOEXCEPT             {return remquof(__lcpp_x, __lcpp_y, __lcpp_z);}
133411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) _NOEXCEPT {return remquol(__lcpp_x, __lcpp_y, __lcpp_z);}
133511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
133611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1, class _A2>
133711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
133811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::__lazy_enable_if
133911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert<
134011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A1>::value &&
134111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::is_arithmetic<_A2>::value,
134211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    std::__promote<_A1, _A2>
134311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert>::type
134411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertremquo(_A1 __lcpp_x, _A2 __lcpp_y, int* __lcpp_z) _NOEXCEPT
134511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert{
134611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    typedef typename std::__promote<_A1, _A2>::type __result_type;
134711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    static_assert((!(std::is_same<_A1, __result_type>::value &&
134811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert                     std::is_same<_A2, __result_type>::value)), "");
134911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert    return remquo((__result_type)__lcpp_x, (__result_type)__lcpp_y, __lcpp_z);
135011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}
135111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
135211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// rint
135311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
135411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       rint(float __lcpp_x) _NOEXCEPT       {return rintf(__lcpp_x);}
135511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEPT {return rintl(__lcpp_x);}
135611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
135711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
135811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
135911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
136011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertrint(_A1 __lcpp_x) _NOEXCEPT {return rint((double)__lcpp_x);}
136111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
136211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// round
136311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
136411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       round(float __lcpp_x) _NOEXCEPT       {return roundf(__lcpp_x);}
136511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCEPT {return roundl(__lcpp_x);}
136611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
136711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
136811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
136911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
137011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertround(_A1 __lcpp_x) _NOEXCEPT {return round((double)__lcpp_x);}
137111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
137211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// scalbln
137311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
137411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       scalbln(float __lcpp_x, long __lcpp_y) _NOEXCEPT       {return scalblnf(__lcpp_x, __lcpp_y);}
137511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __lcpp_x, long __lcpp_y) _NOEXCEPT {return scalblnl(__lcpp_x, __lcpp_y);}
137611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
137711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
137811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
137911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
138011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertscalbln(_A1 __lcpp_x, long __lcpp_y) _NOEXCEPT {return scalbln((double)__lcpp_x, __lcpp_y);}
138111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
138211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// scalbn
138311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
138411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return scalbnf(__lcpp_x, __lcpp_y);}
138511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
138611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
138711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
138811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
138911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
139011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertscalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbn((double)__lcpp_x, __lcpp_y);}
139111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
139211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// tgamma
139311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
139411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       tgamma(float __lcpp_x) _NOEXCEPT       {return tgammaf(__lcpp_x);}
139511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double tgamma(long double __lcpp_x) _NOEXCEPT {return tgammal(__lcpp_x);}
139611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
139711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
139811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
139911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
140011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttgamma(_A1 __lcpp_x) _NOEXCEPT {return tgamma((double)__lcpp_x);}
140111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
140211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// trunc
140311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
140411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY float       trunc(float __lcpp_x) _NOEXCEPT       {return truncf(__lcpp_x);}
140511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCEPT {return truncl(__lcpp_x);}
140611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
140711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class _A1>
140811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertinline _LIBCPP_INLINE_VISIBILITY
140911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypename std::enable_if<std::is_integral<_A1>::value, double>::type
141011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttrunc(_A1 __lcpp_x) _NOEXCEPT {return trunc((double)__lcpp_x);}
141111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
141211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif // !_LIBCPP_MSVCRT
141311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif // __sun__
141411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
141511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert} // extern "C++"
141611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
141711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif // __cplusplus
141811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
141911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif  // _LIBCPP_MATH_H
1420