1 /*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <float.h>
18 #include <math.h>
19
20 extern int __isinf(double); /* isinf.c */
21 int (isinf)(double a1) { return __isinf(a1); }
22
23 /*
24 * The BSD "long double" functions are broken when sizeof(long double) == sizeof(double).
25 * Android works around those cases by replacing the broken functions with our own trivial stubs
26 * that call the regular "double" function.
27 */
28
__fpclassifyl(long double a1)29 int __fpclassifyl(long double a1) { return __fpclassifyd(a1); }
__isfinitel(long double a1)30 int __isfinitel(long double a1) { return __isfinite(a1); }
__isinfl(long double a1)31 int __isinfl(long double a1) { return __isinf(a1); }
__isnanl(long double a1)32 int __isnanl(long double a1) { return isnan(a1); }
__isnormall(long double a1)33 int __isnormall(long double a1) { return __isnormal(a1); }
__signbitl(long double a1)34 int __signbitl(long double a1) { return __signbit(a1); }
35
acoshl(long double a1)36 long double acoshl(long double a1) { return acosh(a1); }
asinhl(long double a1)37 long double asinhl(long double a1) { return asinh(a1); }
atanhl(long double a1)38 long double atanhl(long double a1) { return atanh(a1); }
cbrtl(long double a1)39 long double cbrtl(long double a1) { return cbrt(a1); }
copysignl(long double a1,long double a2)40 long double copysignl(long double a1, long double a2) { return copysign(a1, a2); }
coshl(long double a1)41 long double coshl(long double a1) { return cosh(a1); }
cosl(long double a1)42 long double cosl(long double a1) { return cos(a1); }
erfcl(long double a1)43 long double erfcl(long double a1) { return erfc(a1); }
erfl(long double a1)44 long double erfl(long double a1) { return erf(a1); }
expm1l(long double a1)45 long double expm1l(long double a1) { return expm1(a1); }
fabsl(long double a1)46 long double fabsl(long double a1) { return fabs(a1); }
fmaxl(long double a1,long double a2)47 long double fmaxl(long double a1, long double a2) { return fmax(a1, a2); }
fmodl(long double a1,long double a2)48 long double fmodl(long double a1, long double a2) { return fmod(a1, a2); }
fminl(long double a1,long double a2)49 long double fminl(long double a1, long double a2) { return fmin(a1, a2); }
ilogbl(long double a1)50 int ilogbl(long double a1) { return ilogb(a1); }
lgammal(long double a1)51 long double lgammal(long double a1) { return lgamma(a1); }
llrintl(long double a1)52 long long llrintl(long double a1) { return llrint(a1); }
log10l(long double a1)53 long double log10l(long double a1) { return log10(a1); }
log1pl(long double a1)54 long double log1pl(long double a1) { return log1p(a1); }
log2l(long double a1)55 long double log2l(long double a1) { return log2(a1); }
logbl(long double a1)56 long double logbl(long double a1) { return logb(a1); }
logl(long double a1)57 long double logl(long double a1) { return log(a1); }
lrintl(long double a1)58 long lrintl(long double a1) { return lrint(a1); }
llroundl(long double a1)59 long long llroundl(long double a1) { return llround(a1); }
lroundl(long double a1)60 long lroundl(long double a1) { return lround(a1); }
modfl(long double a1,long double * a2)61 long double modfl(long double a1, long double* a2) { return modf(a1, (double*) a2); }
powl(long double a1,long double a2)62 long double powl(long double a1, long double a2) { return pow(a1, a2); }
rintl(long double a1)63 long double rintl(long double a1) { return rint(a1); }
roundl(long double a1)64 long double roundl(long double a1) { return round(a1); }
scalbnl(long double a1,int a2)65 long double scalbnl(long double a1, int a2) { return scalbn(a1, a2); }
significandl(long double a1)66 long double significandl(long double a1) { return significand(a1); }
sinhl(long double a1)67 long double sinhl(long double a1) { return sinh(a1); }
sinl(long double a1)68 long double sinl(long double a1) { return sin(a1); }
sqrtl(long double a1)69 long double sqrtl(long double a1) { return sqrt(a1); }
tanhl(long double a1)70 long double tanhl(long double a1) { return tanh(a1); }
tanl(long double a1)71 long double tanl(long double a1) { return tan(a1); }
tgammal(long double a1)72 long double tgammal(long double a1) { return tgamma(a1); }
73