blob: fab32fe4713474492c36dab040804fc8b2c5391d [file] [log] [blame]
Elliott Hughesa0ee0782013-01-30 19:06:37 -08001/*
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
20extern int __isinf(double); /* isinf.c */
21int (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
29int __fpclassifyl(long double a1) { return __fpclassifyd(a1); }
30int __isfinitel(long double a1) { return __isfinite(a1); }
31int __isinfl(long double a1) { return __isinf(a1); }
32int __isnanl(long double a1) { return isnan(a1); }
33int __isnormall(long double a1) { return __isnormal(a1); }
34int __signbitl(long double a1) { return __signbit(a1); }
35
36long double acoshl(long double a1) { return acosh(a1); }
37long double asinhl(long double a1) { return asinh(a1); }
38long double atanhl(long double a1) { return atanh(a1); }
39long double cbrtl(long double a1) { return cbrt(a1); }
40long double copysignl(long double a1, long double a2) { return copysign(a1, a2); }
41long double coshl(long double a1) { return cosh(a1); }
Elliott Hughes170dbe22013-02-07 17:45:11 -080042long double cosl(long double a1) { return cos(a1); }
Elliott Hughesa0ee0782013-01-30 19:06:37 -080043long double erfcl(long double a1) { return erfc(a1); }
44long double erfl(long double a1) { return erf(a1); }
45long double expm1l(long double a1) { return expm1(a1); }
46long double fabsl(long double a1) { return fabs(a1); }
47long double fmaxl(long double a1, long double a2) { return fmax(a1, a2); }
48long double fmodl(long double a1, long double a2) { return fmod(a1, a2); }
49long double fminl(long double a1, long double a2) { return fmin(a1, a2); }
50int ilogbl(long double a1) { return ilogb(a1); }
51long double lgammal(long double a1) { return lgamma(a1); }
52long long llrintl(long double a1) { return llrint(a1); }
53long double log10l(long double a1) { return log10(a1); }
54long double log1pl(long double a1) { return log1p(a1); }
55long double log2l(long double a1) { return log2(a1); }
Elliott Hughes926a3072013-02-06 16:07:54 -080056long double logbl(long double a1) { return logb(a1); }
Elliott Hughesa0ee0782013-01-30 19:06:37 -080057long double logl(long double a1) { return log(a1); }
58long lrintl(long double a1) { return lrint(a1); }
59long long llroundl(long double a1) { return llround(a1); }
60long lroundl(long double a1) { return lround(a1); }
61long double modfl(long double a1, long double* a2) { return modf(a1, (double*) a2); }
62long double powl(long double a1, long double a2) { return pow(a1, a2); }
63long double rintl(long double a1) { return rint(a1); }
64long double roundl(long double a1) { return round(a1); }
65long double scalbnl(long double a1, int a2) { return scalbn(a1, a2); }
66long double significandl(long double a1) { return significand(a1); }
67long double sinhl(long double a1) { return sinh(a1); }
Elliott Hughes170dbe22013-02-07 17:45:11 -080068long double sinl(long double a1) { return sin(a1); }
Elliott Hughesa0ee0782013-01-30 19:06:37 -080069long double sqrtl(long double a1) { return sqrt(a1); }
70long double tanhl(long double a1) { return tanh(a1); }
Elliott Hughes170dbe22013-02-07 17:45:11 -080071long double tanl(long double a1) { return tan(a1); }
Elliott Hughesa0ee0782013-01-30 19:06:37 -080072long double tgammal(long double a1) { return tgamma(a1); }