Home | History | Annotate | Download | only in libm
      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 
     29 int __fpclassifyl(long double a1) { return __fpclassifyd(a1); }
     30 int __isfinitel(long double a1) { return __isfinite(a1); }
     31 int __isinfl(long double a1) { return __isinf(a1); }
     32 int __isnanl(long double a1) { return isnan(a1); }
     33 int __isnormall(long double a1) { return __isnormal(a1); }
     34 int __signbitl(long double a1) { return __signbit(a1); }
     35 
     36 long double acoshl(long double a1) { return acosh(a1); }
     37 long double asinhl(long double a1) { return asinh(a1); }
     38 long double atanhl(long double a1) { return atanh(a1); }
     39 long double cbrtl(long double a1) { return cbrt(a1); }
     40 long double copysignl(long double a1, long double a2) { return copysign(a1, a2); }
     41 long double coshl(long double a1) { return cosh(a1); }
     42 long double cosl(long double a1) { return cos(a1); }
     43 long double erfcl(long double a1) { return erfc(a1); }
     44 long double erfl(long double a1) { return erf(a1); }
     45 long double expm1l(long double a1) { return expm1(a1); }
     46 long double fabsl(long double a1) { return fabs(a1); }
     47 long double fmaxl(long double a1, long double a2) { return fmax(a1, a2); }
     48 long double fmodl(long double a1, long double a2) { return fmod(a1, a2); }
     49 long double fminl(long double a1, long double a2) { return fmin(a1, a2); }
     50 int ilogbl(long double a1) { return ilogb(a1); }
     51 long double lgammal(long double a1) { return lgamma(a1); }
     52 long long llrintl(long double a1) { return llrint(a1); }
     53 long double log10l(long double a1) { return log10(a1); }
     54 long double log1pl(long double a1) { return log1p(a1); }
     55 long double log2l(long double a1) { return log2(a1); }
     56 long double logbl(long double a1) { return logb(a1); }
     57 long double logl(long double a1) { return log(a1); }
     58 long lrintl(long double a1) { return lrint(a1); }
     59 long long llroundl(long double a1) { return llround(a1); }
     60 long lroundl(long double a1) { return lround(a1); }
     61 long double modfl(long double a1, long double* a2) { return modf(a1, (double*) a2); }
     62 long double powl(long double a1, long double a2) { return pow(a1, a2); }
     63 long double rintl(long double a1) { return rint(a1); }
     64 long double roundl(long double a1) { return round(a1); }
     65 long double scalbnl(long double a1, int a2) { return scalbn(a1, a2); }
     66 long double significandl(long double a1) { return significand(a1); }
     67 long double sinhl(long double a1) { return sinh(a1); }
     68 long double sinl(long double a1) { return sin(a1); }
     69 long double sqrtl(long double a1) { return sqrt(a1); }
     70 long double tanhl(long double a1) { return tanh(a1); }
     71 long double tanl(long double a1) { return tan(a1); }
     72 long double tgammal(long double a1) { return tgamma(a1); }
     73