mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-29 13:03:42 +01:00
Merge pull request #128 from JuliaLang/kf/clangwarnings
Fix Clang warnings on Windows
This commit is contained in:
commit
960fdbf8bd
209 changed files with 490 additions and 478 deletions
|
@ -76,7 +76,7 @@
|
||||||
#define _START_ENTRY_WIN .code; _START_ENTRY
|
#define _START_ENTRY_WIN .code; _START_ENTRY
|
||||||
#endif
|
#endif
|
||||||
#define _ENTRY(x) _START_ENTRY_WIN; \
|
#define _ENTRY(x) _START_ENTRY_WIN; \
|
||||||
.globl CNAME(x); .section .drectve; .ascii " -export:" #x; \
|
.globl CNAME(x); .section .drectve; .ascii " -export:", #x; \
|
||||||
.section .text; .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):
|
.section .text; .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
24
amd64/fenv.c
24
amd64/fenv.c
|
@ -30,7 +30,7 @@
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define __fenv_static
|
#define __fenv_static OLM_DLLEXPORT
|
||||||
#endif
|
#endif
|
||||||
#include <openlibm_fenv.h>
|
#include <openlibm_fenv.h>
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ const fenv_t __fe_dfl_env = {
|
||||||
__INITIAL_MXCSR__
|
__INITIAL_MXCSR__
|
||||||
};
|
};
|
||||||
|
|
||||||
extern inline DLLEXPORT int feclearexcept(int __excepts);
|
extern inline OLM_DLLEXPORT int feclearexcept(int __excepts);
|
||||||
extern inline DLLEXPORT int fegetexceptflag(fexcept_t *__flagp, int __excepts);
|
extern inline OLM_DLLEXPORT int fegetexceptflag(fexcept_t *__flagp, int __excepts);
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
fesetexceptflag(const fexcept_t *flagp, int excepts)
|
fesetexceptflag(const fexcept_t *flagp, int excepts)
|
||||||
{
|
{
|
||||||
fenv_t env;
|
fenv_t env;
|
||||||
|
@ -69,7 +69,7 @@ fesetexceptflag(const fexcept_t *flagp, int excepts)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
feraiseexcept(int excepts)
|
feraiseexcept(int excepts)
|
||||||
{
|
{
|
||||||
fexcept_t ex = excepts;
|
fexcept_t ex = excepts;
|
||||||
|
@ -79,11 +79,11 @@ feraiseexcept(int excepts)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline DLLEXPORT int fetestexcept(int __excepts);
|
extern inline OLM_DLLEXPORT int fetestexcept(int __excepts);
|
||||||
extern inline DLLEXPORT int fegetround(void);
|
extern inline OLM_DLLEXPORT int fegetround(void);
|
||||||
extern inline DLLEXPORT int fesetround(int __round);
|
extern inline OLM_DLLEXPORT int fesetround(int __round);
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
fegetenv(fenv_t *envp)
|
fegetenv(fenv_t *envp)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ fegetenv(fenv_t *envp)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
feholdexcept(fenv_t *envp)
|
feholdexcept(fenv_t *envp)
|
||||||
{
|
{
|
||||||
uint32_t mxcsr;
|
uint32_t mxcsr;
|
||||||
|
@ -112,9 +112,9 @@ feholdexcept(fenv_t *envp)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline DLLEXPORT int fesetenv(const fenv_t *__envp);
|
extern inline OLM_DLLEXPORT int fesetenv(const fenv_t *__envp);
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
feupdateenv(const fenv_t *envp)
|
feupdateenv(const fenv_t *envp)
|
||||||
{
|
{
|
||||||
uint32_t mxcsr;
|
uint32_t mxcsr;
|
||||||
|
|
|
@ -83,7 +83,7 @@ static const double lntiny = -0x1.77af8ebeae354p9;
|
||||||
static const double invln2 = 0x1.71547652b82fep0;
|
static const double invln2 = 0x1.71547652b82fep0;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
DLLEXPORT double exp(x)
|
OLM_DLLEXPORT double exp(x)
|
||||||
double x;
|
double x;
|
||||||
{
|
{
|
||||||
double z,hi,lo,c;
|
double z,hi,lo,c;
|
||||||
|
|
|
@ -351,7 +351,7 @@ static double logF_tail[N+1] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
#ifdef _ANSI_SOURCE
|
#ifdef _ANSI_SOURCE
|
||||||
log(double x)
|
log(double x)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -122,7 +122,7 @@ static struct Double ratfun_gam(double, double);
|
||||||
|
|
||||||
static const double zero = 0., one = 1.0, tiny = 1e-300;
|
static const double zero = 0., one = 1.0, tiny = 1e-300;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
tgamma(x)
|
tgamma(x)
|
||||||
double x;
|
double x;
|
||||||
{
|
{
|
||||||
|
|
|
@ -172,7 +172,7 @@ fpsetround(fp_rnd_t _m)
|
||||||
}
|
}
|
||||||
|
|
||||||
//static __inline fp_prec_t
|
//static __inline fp_prec_t
|
||||||
DLLEXPORT fp_prec_t
|
OLM_DLLEXPORT fp_prec_t
|
||||||
fpgetprec(void)
|
fpgetprec(void)
|
||||||
{
|
{
|
||||||
unsigned short _cw;
|
unsigned short _cw;
|
||||||
|
@ -182,7 +182,7 @@ fpgetprec(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
//static __inline fp_prec_t
|
//static __inline fp_prec_t
|
||||||
DLLEXPORT fp_prec_t
|
OLM_DLLEXPORT fp_prec_t
|
||||||
fpsetprec(fp_prec_t _m)
|
fpsetprec(fp_prec_t _m)
|
||||||
{
|
{
|
||||||
fp_prec_t _p;
|
fp_prec_t _p;
|
||||||
|
|
18
i387/fenv.c
18
i387/fenv.c
|
@ -90,10 +90,10 @@ __test_sse(void)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline DLLEXPORT int feclearexcept(int __excepts);
|
extern inline OLM_DLLEXPORT int feclearexcept(int __excepts);
|
||||||
extern inline DLLEXPORT int fegetexceptflag(fexcept_t *__flagp, int __excepts);
|
extern inline OLM_DLLEXPORT int fegetexceptflag(fexcept_t *__flagp, int __excepts);
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
fesetexceptflag(const fexcept_t *flagp, int excepts)
|
fesetexceptflag(const fexcept_t *flagp, int excepts)
|
||||||
{
|
{
|
||||||
fenv_t env;
|
fenv_t env;
|
||||||
|
@ -114,7 +114,7 @@ fesetexceptflag(const fexcept_t *flagp, int excepts)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
feraiseexcept(int excepts)
|
feraiseexcept(int excepts)
|
||||||
{
|
{
|
||||||
fexcept_t ex = excepts;
|
fexcept_t ex = excepts;
|
||||||
|
@ -124,9 +124,9 @@ feraiseexcept(int excepts)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline DLLEXPORT int fetestexcept(int __excepts);
|
extern inline OLM_DLLEXPORT int fetestexcept(int __excepts);
|
||||||
extern inline DLLEXPORT int fegetround(void);
|
extern inline OLM_DLLEXPORT int fegetround(void);
|
||||||
extern inline DLLEXPORT int fesetround(int __round);
|
extern inline OLM_DLLEXPORT int fesetround(int __round);
|
||||||
|
|
||||||
int
|
int
|
||||||
fegetenv(fenv_t *envp)
|
fegetenv(fenv_t *envp)
|
||||||
|
@ -163,9 +163,9 @@ feholdexcept(fenv_t *envp)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline DLLEXPORT int fesetenv(const fenv_t *__envp);
|
extern inline OLM_DLLEXPORT int fesetenv(const fenv_t *__envp);
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
feupdateenv(const fenv_t *envp)
|
feupdateenv(const fenv_t *envp)
|
||||||
{
|
{
|
||||||
uint32_t mxcsr;
|
uint32_t mxcsr;
|
||||||
|
|
|
@ -125,8 +125,8 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
|
OLM_DLLEXPORT int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
|
||||||
int feraiseexcept(int __excepts);
|
OLM_DLLEXPORT int feraiseexcept(int __excepts);
|
||||||
|
|
||||||
__fenv_static __attribute__((always_inline)) inline int
|
__fenv_static __attribute__((always_inline)) inline int
|
||||||
fetestexcept(int __excepts)
|
fetestexcept(int __excepts)
|
||||||
|
@ -176,8 +176,8 @@ fesetround(int __round)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int fegetenv(fenv_t *__envp);
|
OLM_DLLEXPORT int fegetenv(fenv_t *__envp);
|
||||||
int feholdexcept(fenv_t *__envp);
|
OLM_DLLEXPORT int feholdexcept(fenv_t *__envp);
|
||||||
|
|
||||||
__fenv_static inline int
|
__fenv_static inline int
|
||||||
fesetenv(const fenv_t *__envp)
|
fesetenv(const fenv_t *__envp)
|
||||||
|
@ -196,12 +196,12 @@ fesetenv(const fenv_t *__envp)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int feupdateenv(const fenv_t *__envp);
|
OLM_DLLEXPORT int feupdateenv(const fenv_t *__envp);
|
||||||
|
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
|
|
||||||
int feenableexcept(int __mask);
|
OLM_DLLEXPORT int feenableexcept(int __mask);
|
||||||
int fedisableexcept(int __mask);
|
OLM_DLLEXPORT int fedisableexcept(int __mask);
|
||||||
|
|
||||||
/* We currently provide no external definition of fegetexcept(). */
|
/* We currently provide no external definition of fegetexcept(). */
|
||||||
static inline int
|
static inline int
|
||||||
|
|
|
@ -33,6 +33,16 @@
|
||||||
#define __pure2
|
#define __pure2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
# ifdef IMPORT_EXPORTS
|
||||||
|
# define OLM_DLLEXPORT __declspec(dllimport)
|
||||||
|
# else
|
||||||
|
# define OLM_DLLEXPORT __declspec(OLM_DLLEXPORT)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
#define OLM_DLLEXPORT __attribute__ ((visibility("default")))
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ANSI/POSIX
|
* ANSI/POSIX
|
||||||
*/
|
*/
|
||||||
|
@ -200,286 +210,286 @@ int isopenlibm(void);
|
||||||
/*
|
/*
|
||||||
* ANSI/POSIX
|
* ANSI/POSIX
|
||||||
*/
|
*/
|
||||||
int __fpclassifyd(double) __pure2;
|
OLM_DLLEXPORT int __fpclassifyd(double) __pure2;
|
||||||
int __fpclassifyf(float) __pure2;
|
OLM_DLLEXPORT int __fpclassifyf(float) __pure2;
|
||||||
int __fpclassifyl(long double) __pure2;
|
OLM_DLLEXPORT int __fpclassifyl(long double) __pure2;
|
||||||
int __isfinitef(float) __pure2;
|
OLM_DLLEXPORT int __isfinitef(float) __pure2;
|
||||||
int __isfinite(double) __pure2;
|
OLM_DLLEXPORT int __isfinite(double) __pure2;
|
||||||
int __isfinitel(long double) __pure2;
|
OLM_DLLEXPORT int __isfinitel(long double) __pure2;
|
||||||
int __isinff(float) __pure2;
|
OLM_DLLEXPORT int __isinff(float) __pure2;
|
||||||
int __isinfl(long double) __pure2;
|
OLM_DLLEXPORT int __isinfl(long double) __pure2;
|
||||||
int __isnanf(float) __pure2;
|
OLM_DLLEXPORT int __isnanf(float) __pure2;
|
||||||
int __isnanl(long double) __pure2;
|
OLM_DLLEXPORT int __isnanl(long double) __pure2;
|
||||||
int __isnormalf(float) __pure2;
|
OLM_DLLEXPORT int __isnormalf(float) __pure2;
|
||||||
int __isnormal(double) __pure2;
|
OLM_DLLEXPORT int __isnormal(double) __pure2;
|
||||||
int __isnormall(long double) __pure2;
|
OLM_DLLEXPORT int __isnormall(long double) __pure2;
|
||||||
int __signbit(double) __pure2;
|
OLM_DLLEXPORT int __signbit(double) __pure2;
|
||||||
int __signbitf(float) __pure2;
|
OLM_DLLEXPORT int __signbitf(float) __pure2;
|
||||||
int __signbitl(long double) __pure2;
|
OLM_DLLEXPORT int __signbitl(long double) __pure2;
|
||||||
|
|
||||||
double acos(double);
|
OLM_DLLEXPORT double acos(double);
|
||||||
double asin(double);
|
OLM_DLLEXPORT double asin(double);
|
||||||
double atan(double);
|
OLM_DLLEXPORT double atan(double);
|
||||||
double atan2(double, double);
|
OLM_DLLEXPORT double atan2(double, double);
|
||||||
double cos(double);
|
OLM_DLLEXPORT double cos(double);
|
||||||
double sin(double);
|
OLM_DLLEXPORT double sin(double);
|
||||||
double tan(double);
|
OLM_DLLEXPORT double tan(double);
|
||||||
|
|
||||||
double cosh(double);
|
OLM_DLLEXPORT double cosh(double);
|
||||||
double sinh(double);
|
OLM_DLLEXPORT double sinh(double);
|
||||||
double tanh(double);
|
OLM_DLLEXPORT double tanh(double);
|
||||||
|
|
||||||
double exp(double);
|
OLM_DLLEXPORT double exp(double);
|
||||||
double frexp(double, int *); /* fundamentally !__pure2 */
|
OLM_DLLEXPORT double frexp(double, int *); /* fundamentally !__pure2 */
|
||||||
double ldexp(double, int);
|
OLM_DLLEXPORT double ldexp(double, int);
|
||||||
double log(double);
|
OLM_DLLEXPORT double log(double);
|
||||||
double log10(double);
|
OLM_DLLEXPORT double log10(double);
|
||||||
double modf(double, double *); /* fundamentally !__pure2 */
|
OLM_DLLEXPORT double modf(double, double *); /* fundamentally !__pure2 */
|
||||||
|
|
||||||
double pow(double, double);
|
OLM_DLLEXPORT double pow(double, double);
|
||||||
double sqrt(double);
|
OLM_DLLEXPORT double sqrt(double);
|
||||||
|
|
||||||
double ceil(double);
|
OLM_DLLEXPORT double ceil(double);
|
||||||
double fabs(double) __pure2;
|
OLM_DLLEXPORT double fabs(double) __pure2;
|
||||||
double floor(double);
|
OLM_DLLEXPORT double floor(double);
|
||||||
double fmod(double, double);
|
OLM_DLLEXPORT double fmod(double, double);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These functions are not in C90.
|
* These functions are not in C90.
|
||||||
*/
|
*/
|
||||||
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE
|
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE
|
||||||
double acosh(double);
|
OLM_DLLEXPORT double acosh(double);
|
||||||
double asinh(double);
|
OLM_DLLEXPORT double asinh(double);
|
||||||
double atanh(double);
|
OLM_DLLEXPORT double atanh(double);
|
||||||
double cbrt(double);
|
OLM_DLLEXPORT double cbrt(double);
|
||||||
double erf(double);
|
OLM_DLLEXPORT double erf(double);
|
||||||
double erfc(double);
|
OLM_DLLEXPORT double erfc(double);
|
||||||
double exp2(double);
|
OLM_DLLEXPORT double exp2(double);
|
||||||
double expm1(double);
|
OLM_DLLEXPORT double expm1(double);
|
||||||
double fma(double, double, double);
|
OLM_DLLEXPORT double fma(double, double, double);
|
||||||
double hypot(double, double);
|
OLM_DLLEXPORT double hypot(double, double);
|
||||||
int ilogb(double) __pure2;
|
OLM_DLLEXPORT int ilogb(double) __pure2;
|
||||||
int (isinf)(double) __pure2;
|
OLM_DLLEXPORT int (isinf)(double) __pure2;
|
||||||
int (isnan)(double) __pure2;
|
OLM_DLLEXPORT int (isnan)(double) __pure2;
|
||||||
double lgamma(double);
|
OLM_DLLEXPORT double lgamma(double);
|
||||||
long long llrint(double);
|
OLM_DLLEXPORT long long llrint(double);
|
||||||
long long llround(double);
|
OLM_DLLEXPORT long long llround(double);
|
||||||
double log1p(double);
|
OLM_DLLEXPORT double log1p(double);
|
||||||
double log2(double);
|
OLM_DLLEXPORT double log2(double);
|
||||||
double logb(double);
|
OLM_DLLEXPORT double logb(double);
|
||||||
long lrint(double);
|
OLM_DLLEXPORT long lrint(double);
|
||||||
long lround(double);
|
OLM_DLLEXPORT long lround(double);
|
||||||
double nan(const char *) __pure2;
|
OLM_DLLEXPORT double nan(const char *) __pure2;
|
||||||
double nextafter(double, double);
|
OLM_DLLEXPORT double nextafter(double, double);
|
||||||
double remainder(double, double);
|
OLM_DLLEXPORT double remainder(double, double);
|
||||||
double remquo(double, double, int *);
|
OLM_DLLEXPORT double remquo(double, double, int *);
|
||||||
double rint(double);
|
OLM_DLLEXPORT double rint(double);
|
||||||
#endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
|
#endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
|
||||||
|
|
||||||
#if __BSD_VISIBLE || __XSI_VISIBLE
|
#if __BSD_VISIBLE || __XSI_VISIBLE
|
||||||
double j0(double);
|
OLM_DLLEXPORT double j0(double);
|
||||||
double j1(double);
|
OLM_DLLEXPORT double j1(double);
|
||||||
double jn(int, double);
|
OLM_DLLEXPORT double jn(int, double);
|
||||||
double y0(double);
|
OLM_DLLEXPORT double y0(double);
|
||||||
double y1(double);
|
OLM_DLLEXPORT double y1(double);
|
||||||
double yn(int, double);
|
OLM_DLLEXPORT double yn(int, double);
|
||||||
#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
|
#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
|
||||||
|
|
||||||
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
|
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
|
||||||
double copysign(double, double) __pure2;
|
OLM_DLLEXPORT double copysign(double, double) __pure2;
|
||||||
double fdim(double, double);
|
OLM_DLLEXPORT double fdim(double, double);
|
||||||
double fmax(double, double) __pure2;
|
OLM_DLLEXPORT double fmax(double, double) __pure2;
|
||||||
double fmin(double, double) __pure2;
|
OLM_DLLEXPORT double fmin(double, double) __pure2;
|
||||||
double nearbyint(double);
|
OLM_DLLEXPORT double nearbyint(double);
|
||||||
double round(double);
|
OLM_DLLEXPORT double round(double);
|
||||||
double scalbln(double, long);
|
OLM_DLLEXPORT double scalbln(double, long);
|
||||||
double scalbn(double, int);
|
OLM_DLLEXPORT double scalbn(double, int);
|
||||||
double tgamma(double);
|
OLM_DLLEXPORT double tgamma(double);
|
||||||
double trunc(double);
|
OLM_DLLEXPORT double trunc(double);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* BSD math library entry points
|
* BSD math library entry points
|
||||||
*/
|
*/
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
int isnanf(float) __pure2;
|
OLM_DLLEXPORT int isnanf(float) __pure2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reentrant version of lgamma; passes signgam back by reference as the
|
* Reentrant version of lgamma; passes signgam back by reference as the
|
||||||
* second argument; user must allocate space for signgam.
|
* second argument; user must allocate space for signgam.
|
||||||
*/
|
*/
|
||||||
double lgamma_r(double, int *);
|
OLM_DLLEXPORT double lgamma_r(double, int *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Single sine/cosine function.
|
* Single sine/cosine function.
|
||||||
*/
|
*/
|
||||||
void sincos(double, double *, double *);
|
OLM_DLLEXPORT void sincos(double, double *, double *);
|
||||||
#endif /* __BSD_VISIBLE */
|
#endif /* __BSD_VISIBLE */
|
||||||
|
|
||||||
/* float versions of ANSI/POSIX functions */
|
/* float versions of ANSI/POSIX functions */
|
||||||
#if __ISO_C_VISIBLE >= 1999
|
#if __ISO_C_VISIBLE >= 1999
|
||||||
float acosf(float);
|
OLM_DLLEXPORT float acosf(float);
|
||||||
float asinf(float);
|
OLM_DLLEXPORT float asinf(float);
|
||||||
float atanf(float);
|
OLM_DLLEXPORT float atanf(float);
|
||||||
float atan2f(float, float);
|
OLM_DLLEXPORT float atan2f(float, float);
|
||||||
float cosf(float);
|
OLM_DLLEXPORT float cosf(float);
|
||||||
float sinf(float);
|
OLM_DLLEXPORT float sinf(float);
|
||||||
float tanf(float);
|
OLM_DLLEXPORT float tanf(float);
|
||||||
|
|
||||||
float coshf(float);
|
OLM_DLLEXPORT float coshf(float);
|
||||||
float sinhf(float);
|
OLM_DLLEXPORT float sinhf(float);
|
||||||
float tanhf(float);
|
OLM_DLLEXPORT float tanhf(float);
|
||||||
|
|
||||||
float exp2f(float);
|
OLM_DLLEXPORT float exp2f(float);
|
||||||
float expf(float);
|
OLM_DLLEXPORT float expf(float);
|
||||||
float expm1f(float);
|
OLM_DLLEXPORT float expm1f(float);
|
||||||
float frexpf(float, int *); /* fundamentally !__pure2 */
|
OLM_DLLEXPORT float frexpf(float, int *); /* fundamentally !__pure2 */
|
||||||
int ilogbf(float) __pure2;
|
OLM_DLLEXPORT int ilogbf(float) __pure2;
|
||||||
float ldexpf(float, int);
|
OLM_DLLEXPORT float ldexpf(float, int);
|
||||||
float log10f(float);
|
OLM_DLLEXPORT float log10f(float);
|
||||||
float log1pf(float);
|
OLM_DLLEXPORT float log1pf(float);
|
||||||
float log2f(float);
|
OLM_DLLEXPORT float log2f(float);
|
||||||
float logf(float);
|
OLM_DLLEXPORT float logf(float);
|
||||||
float modff(float, float *); /* fundamentally !__pure2 */
|
OLM_DLLEXPORT float modff(float, float *); /* fundamentally !__pure2 */
|
||||||
|
|
||||||
float powf(float, float);
|
OLM_DLLEXPORT float powf(float, float);
|
||||||
float sqrtf(float);
|
OLM_DLLEXPORT float sqrtf(float);
|
||||||
|
|
||||||
float ceilf(float);
|
OLM_DLLEXPORT float ceilf(float);
|
||||||
float fabsf(float) __pure2;
|
OLM_DLLEXPORT float fabsf(float) __pure2;
|
||||||
float floorf(float);
|
OLM_DLLEXPORT float floorf(float);
|
||||||
float fmodf(float, float);
|
OLM_DLLEXPORT float fmodf(float, float);
|
||||||
float roundf(float);
|
OLM_DLLEXPORT float roundf(float);
|
||||||
|
|
||||||
float erff(float);
|
OLM_DLLEXPORT float erff(float);
|
||||||
float erfcf(float);
|
OLM_DLLEXPORT float erfcf(float);
|
||||||
float hypotf(float, float);
|
OLM_DLLEXPORT float hypotf(float, float);
|
||||||
float lgammaf(float);
|
OLM_DLLEXPORT float lgammaf(float);
|
||||||
float tgammaf(float);
|
OLM_DLLEXPORT float tgammaf(float);
|
||||||
|
|
||||||
float acoshf(float);
|
OLM_DLLEXPORT float acoshf(float);
|
||||||
float asinhf(float);
|
OLM_DLLEXPORT float asinhf(float);
|
||||||
float atanhf(float);
|
OLM_DLLEXPORT float atanhf(float);
|
||||||
float cbrtf(float);
|
OLM_DLLEXPORT float cbrtf(float);
|
||||||
float logbf(float);
|
OLM_DLLEXPORT float logbf(float);
|
||||||
float copysignf(float, float) __pure2;
|
OLM_DLLEXPORT float copysignf(float, float) __pure2;
|
||||||
long long llrintf(float);
|
OLM_DLLEXPORT long long llrintf(float);
|
||||||
long long llroundf(float);
|
OLM_DLLEXPORT long long llroundf(float);
|
||||||
long lrintf(float);
|
OLM_DLLEXPORT long lrintf(float);
|
||||||
long lroundf(float);
|
OLM_DLLEXPORT long lroundf(float);
|
||||||
float nanf(const char *) __pure2;
|
OLM_DLLEXPORT float nanf(const char *) __pure2;
|
||||||
float nearbyintf(float);
|
OLM_DLLEXPORT float nearbyintf(float);
|
||||||
float nextafterf(float, float);
|
OLM_DLLEXPORT float nextafterf(float, float);
|
||||||
float remainderf(float, float);
|
OLM_DLLEXPORT float remainderf(float, float);
|
||||||
float remquof(float, float, int *);
|
OLM_DLLEXPORT float remquof(float, float, int *);
|
||||||
float rintf(float);
|
OLM_DLLEXPORT float rintf(float);
|
||||||
float scalblnf(float, long);
|
OLM_DLLEXPORT float scalblnf(float, long);
|
||||||
float scalbnf(float, int);
|
OLM_DLLEXPORT float scalbnf(float, int);
|
||||||
float truncf(float);
|
OLM_DLLEXPORT float truncf(float);
|
||||||
|
|
||||||
float fdimf(float, float);
|
OLM_DLLEXPORT float fdimf(float, float);
|
||||||
float fmaf(float, float, float);
|
OLM_DLLEXPORT float fmaf(float, float, float);
|
||||||
float fmaxf(float, float) __pure2;
|
OLM_DLLEXPORT float fmaxf(float, float) __pure2;
|
||||||
float fminf(float, float) __pure2;
|
OLM_DLLEXPORT float fminf(float, float) __pure2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* float versions of BSD math library entry points
|
* float versions of BSD math library entry points
|
||||||
*/
|
*/
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
float dremf(float, float);
|
OLM_DLLEXPORT float dremf(float, float);
|
||||||
float j0f(float);
|
OLM_DLLEXPORT float j0f(float);
|
||||||
float j1f(float);
|
OLM_DLLEXPORT float j1f(float);
|
||||||
float jnf(int, float);
|
OLM_DLLEXPORT float jnf(int, float);
|
||||||
float y0f(float);
|
OLM_DLLEXPORT float y0f(float);
|
||||||
float y1f(float);
|
OLM_DLLEXPORT float y1f(float);
|
||||||
float ynf(int, float);
|
OLM_DLLEXPORT float ynf(int, float);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Float versions of reentrant version of lgamma; passes signgam back by
|
* Float versions of reentrant version of lgamma; passes signgam back by
|
||||||
* reference as the second argument; user must allocate space for signgam.
|
* reference as the second argument; user must allocate space for signgam.
|
||||||
*/
|
*/
|
||||||
float lgammaf_r(float, int *);
|
OLM_DLLEXPORT float lgammaf_r(float, int *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Single sine/cosine function.
|
* Single sine/cosine function.
|
||||||
*/
|
*/
|
||||||
void sincosf(float, float *, float *);
|
OLM_DLLEXPORT void sincosf(float, float *, float *);
|
||||||
#endif /* __BSD_VISIBLE */
|
#endif /* __BSD_VISIBLE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* long double versions of ISO/POSIX math functions
|
* long double versions of ISO/POSIX math functions
|
||||||
*/
|
*/
|
||||||
#if __ISO_C_VISIBLE >= 1999
|
#if __ISO_C_VISIBLE >= 1999
|
||||||
long double acoshl(long double);
|
OLM_DLLEXPORT long double acoshl(long double);
|
||||||
long double acosl(long double);
|
OLM_DLLEXPORT long double acosl(long double);
|
||||||
long double asinhl(long double);
|
OLM_DLLEXPORT long double asinhl(long double);
|
||||||
long double asinl(long double);
|
OLM_DLLEXPORT long double asinl(long double);
|
||||||
long double atan2l(long double, long double);
|
OLM_DLLEXPORT long double atan2l(long double, long double);
|
||||||
long double atanhl(long double);
|
OLM_DLLEXPORT long double atanhl(long double);
|
||||||
long double atanl(long double);
|
OLM_DLLEXPORT long double atanl(long double);
|
||||||
long double cbrtl(long double);
|
OLM_DLLEXPORT long double cbrtl(long double);
|
||||||
long double ceill(long double);
|
OLM_DLLEXPORT long double ceill(long double);
|
||||||
long double copysignl(long double, long double) __pure2;
|
OLM_DLLEXPORT long double copysignl(long double, long double) __pure2;
|
||||||
long double coshl(long double);
|
OLM_DLLEXPORT long double coshl(long double);
|
||||||
long double cosl(long double);
|
OLM_DLLEXPORT long double cosl(long double);
|
||||||
long double erfcl(long double);
|
OLM_DLLEXPORT long double erfcl(long double);
|
||||||
long double erfl(long double);
|
OLM_DLLEXPORT long double erfl(long double);
|
||||||
long double exp2l(long double);
|
OLM_DLLEXPORT long double exp2l(long double);
|
||||||
long double expl(long double);
|
OLM_DLLEXPORT long double expl(long double);
|
||||||
long double expm1l(long double);
|
OLM_DLLEXPORT long double expm1l(long double);
|
||||||
long double fabsl(long double) __pure2;
|
OLM_DLLEXPORT long double fabsl(long double) __pure2;
|
||||||
long double fdiml(long double, long double);
|
OLM_DLLEXPORT long double fdiml(long double, long double);
|
||||||
long double floorl(long double);
|
OLM_DLLEXPORT long double floorl(long double);
|
||||||
long double fmal(long double, long double, long double);
|
OLM_DLLEXPORT long double fmal(long double, long double, long double);
|
||||||
long double fmaxl(long double, long double) __pure2;
|
OLM_DLLEXPORT long double fmaxl(long double, long double) __pure2;
|
||||||
long double fminl(long double, long double) __pure2;
|
OLM_DLLEXPORT long double fminl(long double, long double) __pure2;
|
||||||
long double fmodl(long double, long double);
|
OLM_DLLEXPORT long double fmodl(long double, long double);
|
||||||
long double frexpl(long double value, int *); /* fundamentally !__pure2 */
|
OLM_DLLEXPORT long double frexpl(long double value, int *); /* fundamentally !__pure2 */
|
||||||
long double hypotl(long double, long double);
|
OLM_DLLEXPORT long double hypotl(long double, long double);
|
||||||
int ilogbl(long double) __pure2;
|
OLM_DLLEXPORT int ilogbl(long double) __pure2;
|
||||||
long double ldexpl(long double, int);
|
OLM_DLLEXPORT long double ldexpl(long double, int);
|
||||||
long double lgammal(long double);
|
OLM_DLLEXPORT long double lgammal(long double);
|
||||||
long long llrintl(long double);
|
OLM_DLLEXPORT long long llrintl(long double);
|
||||||
long long llroundl(long double);
|
OLM_DLLEXPORT long long llroundl(long double);
|
||||||
long double log10l(long double);
|
OLM_DLLEXPORT long double log10l(long double);
|
||||||
long double log1pl(long double);
|
OLM_DLLEXPORT long double log1pl(long double);
|
||||||
long double log2l(long double);
|
OLM_DLLEXPORT long double log2l(long double);
|
||||||
long double logbl(long double);
|
OLM_DLLEXPORT long double logbl(long double);
|
||||||
long double logl(long double);
|
OLM_DLLEXPORT long double logl(long double);
|
||||||
long lrintl(long double);
|
OLM_DLLEXPORT long lrintl(long double);
|
||||||
long lroundl(long double);
|
OLM_DLLEXPORT long lroundl(long double);
|
||||||
long double modfl(long double, long double *); /* fundamentally !__pure2 */
|
OLM_DLLEXPORT long double modfl(long double, long double *); /* fundamentally !__pure2 */
|
||||||
long double nanl(const char *) __pure2;
|
OLM_DLLEXPORT long double nanl(const char *) __pure2;
|
||||||
long double nearbyintl(long double);
|
OLM_DLLEXPORT long double nearbyintl(long double);
|
||||||
long double nextafterl(long double, long double);
|
OLM_DLLEXPORT long double nextafterl(long double, long double);
|
||||||
double nexttoward(double, long double);
|
OLM_DLLEXPORT double nexttoward(double, long double);
|
||||||
float nexttowardf(float, long double);
|
OLM_DLLEXPORT float nexttowardf(float, long double);
|
||||||
long double nexttowardl(long double, long double);
|
OLM_DLLEXPORT long double nexttowardl(long double, long double);
|
||||||
long double powl(long double, long double);
|
OLM_DLLEXPORT long double powl(long double, long double);
|
||||||
long double remainderl(long double, long double);
|
OLM_DLLEXPORT long double remainderl(long double, long double);
|
||||||
long double remquol(long double, long double, int *);
|
OLM_DLLEXPORT long double remquol(long double, long double, int *);
|
||||||
long double rintl(long double);
|
OLM_DLLEXPORT long double rintl(long double);
|
||||||
long double roundl(long double);
|
OLM_DLLEXPORT long double roundl(long double);
|
||||||
long double scalblnl(long double, long);
|
OLM_DLLEXPORT long double scalblnl(long double, long);
|
||||||
long double scalbnl(long double, int);
|
OLM_DLLEXPORT long double scalbnl(long double, int);
|
||||||
long double sinhl(long double);
|
OLM_DLLEXPORT long double sinhl(long double);
|
||||||
long double sinl(long double);
|
OLM_DLLEXPORT long double sinl(long double);
|
||||||
long double sqrtl(long double);
|
OLM_DLLEXPORT long double sqrtl(long double);
|
||||||
long double tanhl(long double);
|
OLM_DLLEXPORT long double tanhl(long double);
|
||||||
long double tanl(long double);
|
OLM_DLLEXPORT long double tanl(long double);
|
||||||
long double tgammal(long double);
|
OLM_DLLEXPORT long double tgammal(long double);
|
||||||
long double truncl(long double);
|
OLM_DLLEXPORT long double truncl(long double);
|
||||||
#endif /* __ISO_C_VISIBLE >= 1999 */
|
#endif /* __ISO_C_VISIBLE >= 1999 */
|
||||||
|
|
||||||
/* Reentrant version of lgammal. */
|
/* Reentrant version of lgammal. */
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
long double lgammal_r(long double, int *);
|
OLM_DLLEXPORT long double lgammal_r(long double, int *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Single sine/cosine function.
|
* Single sine/cosine function.
|
||||||
*/
|
*/
|
||||||
void sincosl(long double, long double *, long double *);
|
OLM_DLLEXPORT void sincosl(long double, long double *, long double *);
|
||||||
#endif /* __BSD_VISIBLE */
|
#endif /* __BSD_VISIBLE */
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
|
|
@ -47,7 +47,7 @@ C9 = 0.4110317413744594971475941557607804508039e-18,
|
||||||
C10 = -0.8896592467191938803288521958313920156409e-21,
|
C10 = -0.8896592467191938803288521958313920156409e-21,
|
||||||
C11 = 0.1601061435794535138244346256065192782581e-23;
|
C11 = 0.1601061435794535138244346256065192782581e-23;
|
||||||
|
|
||||||
DLLEXPORT long double
|
long double
|
||||||
__kernel_cosl(long double x, long double y)
|
__kernel_cosl(long double x, long double y)
|
||||||
{
|
{
|
||||||
long double hz,z,r,w;
|
long double hz,z,r,w;
|
||||||
|
|
|
@ -45,7 +45,7 @@ S10 = 0.19572940011906109418080609928334380560135358385256e-19,
|
||||||
S11 = -0.38680813379701966970673724299207480965452616911420e-22,
|
S11 = -0.38680813379701966970673724299207480965452616911420e-22,
|
||||||
S12 = 0.64038150078671872796678569586315881020659912139412e-25;
|
S12 = 0.64038150078671872796678569586315881020659912139412e-25;
|
||||||
|
|
||||||
DLLEXPORT long double
|
long double
|
||||||
__kernel_sinl(long double x, long double y, int iy)
|
__kernel_sinl(long double x, long double y, int iy)
|
||||||
{
|
{
|
||||||
long double z,r,v;
|
long double z,r,v;
|
||||||
|
|
|
@ -62,7 +62,7 @@ T53 = 0.0000000015468200913196612, /* 0x1a92fc98c29554.0p-82 */
|
||||||
T55 = -0.00000000061311613386849674, /* -0x151106cbc779a9.0p-83 */
|
T55 = -0.00000000061311613386849674, /* -0x151106cbc779a9.0p-83 */
|
||||||
T57 = 1.4912469681508012e-10; /* 0x147edbdba6f43a.0p-85 */
|
T57 = 1.4912469681508012e-10; /* 0x147edbdba6f43a.0p-85 */
|
||||||
|
|
||||||
DLLEXPORT long double
|
long double
|
||||||
__kernel_tanl(long double x, long double y, int iy) {
|
__kernel_tanl(long double x, long double y, int iy) {
|
||||||
long double z, r, v, w, s;
|
long double z, r, v, w, s;
|
||||||
long double osign;
|
long double osign;
|
||||||
|
|
|
@ -354,7 +354,7 @@ static const float eps[TBLSIZE] = {
|
||||||
* Gal, S. and Bachelis, B. An Accurate Elementary Mathematical Library
|
* Gal, S. and Bachelis, B. An Accurate Elementary Mathematical Library
|
||||||
* for the IEEE Floating Point Standard. TOMS 17(1), 26-46 (1991).
|
* for the IEEE Floating Point Standard. TOMS 17(1), 26-46 (1991).
|
||||||
*/
|
*/
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
exp2l(long double x)
|
exp2l(long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u, v;
|
union IEEEl2bits u, v;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "fpmath.h"
|
#include "fpmath.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
nanl(const char *s)
|
nanl(const char *s)
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -65,7 +65,7 @@ C5 = 0.0000000020876754400407278, /* 0x11eed8caaeccf1.0p-81 */
|
||||||
C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */
|
C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */
|
||||||
C7 = 4.7383039476436467e-14; /* 0x1aac9d9af5c43e.0p-97 */
|
C7 = 4.7383039476436467e-14; /* 0x1aac9d9af5c43e.0p-97 */
|
||||||
|
|
||||||
DLLEXPORT long double
|
long double
|
||||||
__kernel_cosl(long double x, long double y)
|
__kernel_cosl(long double x, long double y)
|
||||||
{
|
{
|
||||||
long double hz,z,r,w;
|
long double hz,z,r,w;
|
||||||
|
|
|
@ -49,7 +49,7 @@ S6 = 1.6059006598854211e-10, /* 0x161242b90243b5.0p-85 */
|
||||||
S7 = -7.6429779983024564e-13, /* -0x1ae42ebd1b2e00.0p-93 */
|
S7 = -7.6429779983024564e-13, /* -0x1ae42ebd1b2e00.0p-93 */
|
||||||
S8 = 2.6174587166648325e-15; /* 0x179372ea0b3f64.0p-101 */
|
S8 = 2.6174587166648325e-15; /* 0x179372ea0b3f64.0p-101 */
|
||||||
|
|
||||||
DLLEXPORT long double
|
long double
|
||||||
__kernel_sinl(long double x, long double y, int iy)
|
__kernel_sinl(long double x, long double y, int iy)
|
||||||
{
|
{
|
||||||
long double z,r,v;
|
long double z,r,v;
|
||||||
|
|
|
@ -70,7 +70,7 @@ T29 = 0.0000078293456938132840, /* 0x106b59141a6cb3.0p-69 */
|
||||||
T31 = -0.0000032609076735050182, /* -0x1b5abef3ba4b59.0p-71 */
|
T31 = -0.0000032609076735050182, /* -0x1b5abef3ba4b59.0p-71 */
|
||||||
T33 = 0.0000023261313142559411; /* 0x13835436c0c87f.0p-71 */
|
T33 = 0.0000023261313142559411; /* 0x13835436c0c87f.0p-71 */
|
||||||
|
|
||||||
DLLEXPORT long double
|
long double
|
||||||
__kernel_tanl(long double x, long double y, int iy) {
|
__kernel_tanl(long double x, long double y, int iy) {
|
||||||
long double z, r, v, w, s;
|
long double z, r, v, w, s;
|
||||||
long double osign;
|
long double osign;
|
||||||
|
|
|
@ -211,7 +211,7 @@ static const double tbl[TBLSIZE * 2] = {
|
||||||
* The table entries each have 104 bits of accuracy, encoded as
|
* The table entries each have 104 bits of accuracy, encoded as
|
||||||
* a pair of double precision values.
|
* a pair of double precision values.
|
||||||
*/
|
*/
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
exp2l(long double x)
|
exp2l(long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u, v;
|
union IEEEl2bits u, v;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
nanl(const char *s)
|
nanl(const char *s)
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#define __strong_reference(sym,aliassym) __weak_reference(sym,aliassym)
|
#define __strong_reference(sym,aliassym) __weak_reference(sym,aliassym)
|
||||||
#else
|
#else
|
||||||
#define __strong_reference(sym,aliassym) \
|
#define __strong_reference(sym,aliassym) \
|
||||||
DLLEXPORT extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
|
OLM_DLLEXPORT extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
|
||||||
#endif /* __APPLE__ */
|
#endif /* __APPLE__ */
|
||||||
#endif /* __strong_reference */
|
#endif /* __strong_reference */
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT int isopenlibm(void) {
|
OLM_DLLEXPORT int isopenlibm(void) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
|
||||||
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
|
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
|
||||||
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_acos(double x)
|
__ieee754_acos(double x)
|
||||||
{
|
{
|
||||||
double z,p,q,r,w,s,c,df;
|
double z,p,q,r,w,s,c,df;
|
||||||
|
|
|
@ -32,7 +32,7 @@ pS1 = -4.2743422091e-02,
|
||||||
pS2 = -8.6563630030e-03,
|
pS2 = -8.6563630030e-03,
|
||||||
qS1 = -7.0662963390e-01;
|
qS1 = -7.0662963390e-01;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_acosf(float x)
|
__ieee754_acosf(float x)
|
||||||
{
|
{
|
||||||
float z,p,q,r,w,s,c,df;
|
float z,p,q,r,w,s,c,df;
|
||||||
|
|
|
@ -37,7 +37,7 @@ static const double
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
|
ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_acosh(double x)
|
__ieee754_acosh(double x)
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
|
|
|
@ -24,7 +24,7 @@ static const float
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
ln2 = 6.9314718246e-01; /* 0x3f317218 */
|
ln2 = 6.9314718246e-01; /* 0x3f317218 */
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_acoshf(float x)
|
__ieee754_acoshf(float x)
|
||||||
{
|
{
|
||||||
float t;
|
float t;
|
||||||
|
|
|
@ -40,7 +40,7 @@ static const long double
|
||||||
pi = 3.14159265358979323846264338327950280e+00L;
|
pi = 3.14159265358979323846264338327950280e+00L;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
acosl(long double x)
|
acosl(long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u;
|
union IEEEl2bits u;
|
||||||
|
|
|
@ -67,7 +67,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
|
||||||
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
|
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
|
||||||
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_asin(double x)
|
__ieee754_asin(double x)
|
||||||
{
|
{
|
||||||
double t=0.0,w,p,q,c,r,s;
|
double t=0.0,w,p,q,c,r,s;
|
||||||
|
|
|
@ -32,7 +32,7 @@ qS1 = -7.0662963390e-01;
|
||||||
static const double
|
static const double
|
||||||
pio2 = 1.570796326794896558e+00;
|
pio2 = 1.570796326794896558e+00;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_asinf(float x)
|
__ieee754_asinf(float x)
|
||||||
{
|
{
|
||||||
double s;
|
double s;
|
||||||
|
|
|
@ -30,7 +30,7 @@ static const long double
|
||||||
one = 1.00000000000000000000e+00,
|
one = 1.00000000000000000000e+00,
|
||||||
huge = 1.000e+300;
|
huge = 1.000e+300;
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
asinl(long double x)
|
asinl(long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u;
|
union IEEEl2bits u;
|
||||||
|
|
|
@ -57,7 +57,7 @@ pi = 3.1415926535897931160E+00; /* 0x400921FB, 0x54442D18 */
|
||||||
static volatile double
|
static volatile double
|
||||||
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
|
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_atan2(double y, double x)
|
__ieee754_atan2(double y, double x)
|
||||||
{
|
{
|
||||||
double z;
|
double z;
|
||||||
|
|
|
@ -30,7 +30,7 @@ pi = 3.1415927410e+00; /* 0x40490fdb */
|
||||||
static volatile float
|
static volatile float
|
||||||
pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */
|
pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_atan2f(float y, float x)
|
__ieee754_atan2f(float y, float x)
|
||||||
{
|
{
|
||||||
float z;
|
float z;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static const long double
|
||||||
pi = 3.14159265358979323846264338327950280e+00L;
|
pi = 3.14159265358979323846264338327950280e+00L;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
atan2l(long double y, long double x)
|
atan2l(long double y, long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits ux, uy;
|
union IEEEl2bits ux, uy;
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
static const double one = 1.0, huge = 1e300;
|
static const double one = 1.0, huge = 1e300;
|
||||||
static const double zero = 0.0;
|
static const double zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_atanh(double x)
|
__ieee754_atanh(double x)
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
|
|
|
@ -24,7 +24,7 @@ static const float one = 1.0, huge = 1e30;
|
||||||
|
|
||||||
static const float zero = 0.0;
|
static const float zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_atanhf(float x)
|
__ieee754_atanhf(float x)
|
||||||
{
|
{
|
||||||
float t;
|
float t;
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
static const double one = 1.0, half=0.5, huge = 1.0e300;
|
static const double one = 1.0, half=0.5, huge = 1.0e300;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_cosh(double x)
|
__ieee754_cosh(double x)
|
||||||
{
|
{
|
||||||
double t,w;
|
double t,w;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
static const float one = 1.0, half=0.5, huge = 1.0e30;
|
static const float one = 1.0, half=0.5, huge = 1.0e30;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_coshf(float x)
|
__ieee754_coshf(float x)
|
||||||
{
|
{
|
||||||
float t,w;
|
float t,w;
|
||||||
|
|
|
@ -101,7 +101,7 @@ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
|
||||||
static volatile double
|
static volatile double
|
||||||
twom1000= 9.33263618503218878990e-302; /* 2**-1000=0x01700000,0*/
|
twom1000= 9.33263618503218878990e-302; /* 2**-1000=0x01700000,0*/
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_exp(double x) /* default IEEE double exp */
|
__ieee754_exp(double x) /* default IEEE double exp */
|
||||||
{
|
{
|
||||||
double y,hi=0.0,lo=0.0,c,t,twopk;
|
double y,hi=0.0,lo=0.0,c,t,twopk;
|
||||||
|
|
|
@ -41,7 +41,7 @@ P2 = -2.7667332906e-3; /* -0xb55215.0p-32 */
|
||||||
|
|
||||||
static volatile float twom100 = 7.8886090522e-31; /* 2**-100=0x0d800000 */
|
static volatile float twom100 = 7.8886090522e-31; /* 2**-100=0x0d800000 */
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_expf(float x)
|
__ieee754_expf(float x)
|
||||||
{
|
{
|
||||||
float y,hi=0.0,lo=0.0,c,t,twopk;
|
float y,hi=0.0,lo=0.0,c,t,twopk;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
static const double one = 1.0, Zero[] = {0.0, -0.0,};
|
static const double one = 1.0, Zero[] = {0.0, -0.0,};
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_fmod(double x, double y)
|
__ieee754_fmod(double x, double y)
|
||||||
{
|
{
|
||||||
int32_t n,hx,hy,hz,ix,iy,sx,i;
|
int32_t n,hx,hy,hz,ix,iy,sx,i;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
static const float one = 1.0, Zero[] = {0.0, -0.0,};
|
static const float one = 1.0, Zero[] = {0.0, -0.0,};
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_fmodf(float x, float y)
|
__ieee754_fmodf(float x, float y)
|
||||||
{
|
{
|
||||||
int32_t n,hx,hy,hz,ix,iy,sx,i;
|
int32_t n,hx,hy,hz,ix,iy,sx,i;
|
||||||
|
|
|
@ -62,7 +62,7 @@ static const long double one = 1.0, Zero[] = {0.0, -0.0,};
|
||||||
* - The high part of the mantissa fits in an int64_t with enough room
|
* - The high part of the mantissa fits in an int64_t with enough room
|
||||||
* for an explicit integer bit in front of the fractional bits.
|
* for an explicit integer bit in front of the fractional bits.
|
||||||
*/
|
*/
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
fmodl(long double x, long double y)
|
fmodl(long double x, long double y)
|
||||||
{
|
{
|
||||||
union IEEEl2bits ux, uy;
|
union IEEEl2bits ux, uy;
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_hypot(double x, double y)
|
__ieee754_hypot(double x, double y)
|
||||||
{
|
{
|
||||||
double a,b,t1,t2,y1,y2,w;
|
double a,b,t1,t2,y1,y2,w;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_hypotf(float x, float y)
|
__ieee754_hypotf(float x, float y)
|
||||||
{
|
{
|
||||||
float a,b,t1,t2,y1,y2,w;
|
float a,b,t1,t2,y1,y2,w;
|
||||||
|
|
|
@ -45,7 +45,7 @@ typedef u_int64_t man_t;
|
||||||
typedef u_int32_t man_t;
|
typedef u_int32_t man_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
hypotl(long double x, long double y)
|
hypotl(long double x, long double y)
|
||||||
{
|
{
|
||||||
long double a=x,b=y,t1,t2,y1,y2,w;
|
long double a=x,b=y,t1,t2,y1,y2,w;
|
||||||
|
|
|
@ -84,7 +84,7 @@ S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */
|
||||||
|
|
||||||
static const double zero = 0.0;
|
static const double zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_j0(double x)
|
__ieee754_j0(double x)
|
||||||
{
|
{
|
||||||
double z, s,c,ss,cc,r,u,v;
|
double z, s,c,ss,cc,r,u,v;
|
||||||
|
@ -145,7 +145,7 @@ v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */
|
||||||
v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
|
v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
|
||||||
v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
|
v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_y0(double x)
|
__ieee754_y0(double x)
|
||||||
{
|
{
|
||||||
double z, s,c,ss,cc,u,v;
|
double z, s,c,ss,cc,u,v;
|
||||||
|
|
|
@ -38,7 +38,7 @@ S04 = 1.1661400734e-09; /* 0x30a045e8 */
|
||||||
|
|
||||||
static const float zero = 0.0;
|
static const float zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_j0f(float x)
|
__ieee754_j0f(float x)
|
||||||
{
|
{
|
||||||
float z, s,c,ss,cc,r,u,v;
|
float z, s,c,ss,cc,r,u,v;
|
||||||
|
@ -99,7 +99,7 @@ v02 = 7.6006865129e-05, /* 0x389f65e0 */
|
||||||
v03 = 2.5915085189e-07, /* 0x348b216c */
|
v03 = 2.5915085189e-07, /* 0x348b216c */
|
||||||
v04 = 4.4111031494e-10; /* 0x2ff280c2 */
|
v04 = 4.4111031494e-10; /* 0x2ff280c2 */
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_y0f(float x)
|
__ieee754_y0f(float x)
|
||||||
{
|
{
|
||||||
float z, s,c,ss,cc,u,v;
|
float z, s,c,ss,cc,u,v;
|
||||||
|
|
|
@ -85,7 +85,7 @@ s05 = 1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */
|
||||||
|
|
||||||
static const double zero = 0.0;
|
static const double zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_j1(double x)
|
__ieee754_j1(double x)
|
||||||
{
|
{
|
||||||
double z, s,c,ss,cc,r,u,v,y;
|
double z, s,c,ss,cc,r,u,v,y;
|
||||||
|
@ -142,7 +142,7 @@ static const double V0[5] = {
|
||||||
1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */
|
1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */
|
||||||
};
|
};
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_y1(double x)
|
__ieee754_y1(double x)
|
||||||
{
|
{
|
||||||
double z, s,c,ss,cc,u,v;
|
double z, s,c,ss,cc,u,v;
|
||||||
|
|
|
@ -38,7 +38,7 @@ s05 = 1.2354227016e-11; /* 0x2d59567e */
|
||||||
|
|
||||||
static const float zero = 0.0;
|
static const float zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_j1f(float x)
|
__ieee754_j1f(float x)
|
||||||
{
|
{
|
||||||
float z, s,c,ss,cc,r,u,v,y;
|
float z, s,c,ss,cc,r,u,v,y;
|
||||||
|
@ -95,7 +95,7 @@ static const float V0[5] = {
|
||||||
1.6655924903e-11, /* 0x2d9281cf */
|
1.6655924903e-11, /* 0x2d9281cf */
|
||||||
};
|
};
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_y1f(float x)
|
__ieee754_y1f(float x)
|
||||||
{
|
{
|
||||||
float z, s,c,ss,cc,u,v;
|
float z, s,c,ss,cc,u,v;
|
||||||
|
|
|
@ -51,7 +51,7 @@ one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */
|
||||||
|
|
||||||
static const double zero = 0.00000000000000000000e+00;
|
static const double zero = 0.00000000000000000000e+00;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_jn(int n, double x)
|
__ieee754_jn(int n, double x)
|
||||||
{
|
{
|
||||||
int32_t i,hx,ix,lx, sgn;
|
int32_t i,hx,ix,lx, sgn;
|
||||||
|
@ -212,7 +212,7 @@ __ieee754_jn(int n, double x)
|
||||||
if(sgn==1) return -b; else return b;
|
if(sgn==1) return -b; else return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_yn(int n, double x)
|
__ieee754_yn(int n, double x)
|
||||||
{
|
{
|
||||||
int32_t i,hx,ix,lx;
|
int32_t i,hx,ix,lx;
|
||||||
|
|
|
@ -26,7 +26,7 @@ one = 1.0000000000e+00; /* 0x3F800000 */
|
||||||
|
|
||||||
static const float zero = 0.0000000000e+00;
|
static const float zero = 0.0000000000e+00;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_jnf(int n, float x)
|
__ieee754_jnf(int n, float x)
|
||||||
{
|
{
|
||||||
int32_t i,hx,ix, sgn;
|
int32_t i,hx,ix, sgn;
|
||||||
|
@ -164,7 +164,7 @@ __ieee754_jnf(int n, float x)
|
||||||
if(sgn==1) return -b; else return b;
|
if(sgn==1) return -b; else return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_ynf(int n, float x)
|
__ieee754_ynf(int n, float x)
|
||||||
{
|
{
|
||||||
int32_t i,hx,ix,ib;
|
int32_t i,hx,ix,ib;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_lgamma(double x)
|
__ieee754_lgamma(double x)
|
||||||
{
|
{
|
||||||
#ifdef OPENLIBM_ONLY_THREAD_SAFE
|
#ifdef OPENLIBM_ONLY_THREAD_SAFE
|
||||||
|
|
|
@ -202,7 +202,7 @@ static const double zero= 0.00000000000000000000e+00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_lgamma_r(double x, int *signgamp)
|
__ieee754_lgamma_r(double x, int *signgamp)
|
||||||
{
|
{
|
||||||
double t,y,z,nadj,p,p1,p2,p3,q,r,w;
|
double t,y,z,nadj,p,p1,p2,p3,q,r,w;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_lgammaf(float x)
|
__ieee754_lgammaf(float x)
|
||||||
{
|
{
|
||||||
#ifdef OPENLIBM_ONLY_THREAD_SAFE
|
#ifdef OPENLIBM_ONLY_THREAD_SAFE
|
||||||
|
|
|
@ -135,7 +135,7 @@ static const float zero= 0.0000000000e+00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_lgammaf_r(float x, int *signgamp)
|
__ieee754_lgammaf_r(float x, int *signgamp)
|
||||||
{
|
{
|
||||||
float t,y,z,nadj,p,p1,p2,p3,q,r,w;
|
float t,y,z,nadj,p,p1,p2,p3,q,r,w;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
lgammal(long double x)
|
lgammal(long double x)
|
||||||
{
|
{
|
||||||
#ifdef OPENLIBM_ONLY_THREAD_SAFE
|
#ifdef OPENLIBM_ONLY_THREAD_SAFE
|
||||||
|
|
|
@ -83,7 +83,7 @@ Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
|
||||||
|
|
||||||
static const double zero = 0.0;
|
static const double zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_log(double x)
|
__ieee754_log(double x)
|
||||||
{
|
{
|
||||||
double hfsq,f,s,z,R,w,t1,t2,dk;
|
double hfsq,f,s,z,R,w,t1,t2,dk;
|
||||||
|
|
|
@ -36,7 +36,7 @@ log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
|
||||||
|
|
||||||
static const double zero = 0.0;
|
static const double zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_log10(double x)
|
__ieee754_log10(double x)
|
||||||
{
|
{
|
||||||
double f,hfsq,hi,lo,r,val_hi,val_lo,w,y,y2;
|
double f,hfsq,hi,lo,r,val_hi,val_lo,w,y,y2;
|
||||||
|
|
|
@ -33,7 +33,7 @@ log10_2lo = 7.9034151668e-07; /* 0x355427db */
|
||||||
|
|
||||||
static const float zero = 0.0;
|
static const float zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_log10f(float x)
|
__ieee754_log10f(float x)
|
||||||
{
|
{
|
||||||
float f,hfsq,hi,lo,r,y;
|
float f,hfsq,hi,lo,r,y;
|
||||||
|
|
|
@ -36,7 +36,7 @@ ivln2lo = 1.67517131648865118353e-10; /* 0x3de705fc, 0x2eefa200 */
|
||||||
|
|
||||||
static const double zero = 0.0;
|
static const double zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_log2(double x)
|
__ieee754_log2(double x)
|
||||||
{
|
{
|
||||||
double f,hfsq,hi,lo,r,val_hi,val_lo,w,y;
|
double f,hfsq,hi,lo,r,val_hi,val_lo,w,y;
|
||||||
|
|
|
@ -31,7 +31,7 @@ ivln2lo = -1.7605285393e-04; /* 0xb9389ad4 */
|
||||||
|
|
||||||
static const float zero = 0.0;
|
static const float zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_log2f(float x)
|
__ieee754_log2f(float x)
|
||||||
{
|
{
|
||||||
float f,hfsq,hi,lo,r,y;
|
float f,hfsq,hi,lo,r,y;
|
||||||
|
|
|
@ -32,7 +32,7 @@ Lg4 = 0xf89e26.0p-26; /* 0.24279078841 */
|
||||||
|
|
||||||
static const float zero = 0.0;
|
static const float zero = 0.0;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_logf(float x)
|
__ieee754_logf(float x)
|
||||||
{
|
{
|
||||||
float hfsq,f,s,z,R,w,t1,t2,dk;
|
float hfsq,f,s,z,R,w,t1,t2,dk;
|
||||||
|
|
|
@ -94,7 +94,7 @@ ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */
|
||||||
ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
|
ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
|
||||||
ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
|
ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_pow(double x, double y)
|
__ieee754_pow(double x, double y)
|
||||||
{
|
{
|
||||||
double z,ax,z_h,z_l,p_h,p_l;
|
double z,ax,z_h,z_l,p_h,p_l;
|
||||||
|
|
|
@ -53,7 +53,7 @@ ivln2 = 1.4426950216e+00, /* 0x3fb8aa3b =1/ln2 */
|
||||||
ivln2_h = 1.4426879883e+00, /* 0x3fb8aa00 =16b 1/ln2*/
|
ivln2_h = 1.4426879883e+00, /* 0x3fb8aa00 =16b 1/ln2*/
|
||||||
ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
|
ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_powf(float x, float y)
|
__ieee754_powf(float x, float y)
|
||||||
{
|
{
|
||||||
float z,ax,z_h,z_l,p_h,p_l;
|
float z,ax,z_h,z_l,p_h,p_l;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
static const double zero = 0.0;
|
static const double zero = 0.0;
|
||||||
|
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_remainder(double x, double p)
|
__ieee754_remainder(double x, double p)
|
||||||
{
|
{
|
||||||
int32_t hx,hp;
|
int32_t hx,hp;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
static const float zero = 0.0;
|
static const float zero = 0.0;
|
||||||
|
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_remainderf(float x, float p)
|
__ieee754_remainderf(float x, float p)
|
||||||
{
|
{
|
||||||
int32_t hx,hp;
|
int32_t hx,hp;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <openlibm_math.h>
|
#include <openlibm_math.h>
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
remainderl(long double x, long double y)
|
remainderl(long double x, long double y)
|
||||||
{
|
{
|
||||||
int quo;
|
int quo;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
static const double one = 1.0, shuge = 1.0e307;
|
static const double one = 1.0, shuge = 1.0e307;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_sinh(double x)
|
__ieee754_sinh(double x)
|
||||||
{
|
{
|
||||||
double t,h;
|
double t,h;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
static const float one = 1.0, shuge = 1.0e37;
|
static const float one = 1.0, shuge = 1.0e37;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_sinhf(float x)
|
__ieee754_sinhf(float x)
|
||||||
{
|
{
|
||||||
float t,h;
|
float t,h;
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
static const double one = 1.0, tiny=1.0e-300;
|
static const double one = 1.0, tiny=1.0e-300;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ieee754_sqrt(double x)
|
__ieee754_sqrt(double x)
|
||||||
{
|
{
|
||||||
double z;
|
double z;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
static const float one = 1.0, tiny=1.0e-30;
|
static const float one = 1.0, tiny=1.0e-30;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ieee754_sqrtf(float x)
|
__ieee754_sqrtf(float x)
|
||||||
{
|
{
|
||||||
float z;
|
float z;
|
||||||
|
|
|
@ -75,7 +75,7 @@ dec(long double x)
|
||||||
* if possible.
|
* if possible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
sqrtl(long double x)
|
sqrtl(long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u;
|
union IEEEl2bits u;
|
||||||
|
|
|
@ -66,7 +66,7 @@ C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
|
||||||
C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
|
C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
|
||||||
C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
|
C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__kernel_cos(double x, double y)
|
__kernel_cos(double x, double y)
|
||||||
{
|
{
|
||||||
double hz,z,r,w;
|
double hz,z,r,w;
|
||||||
|
|
|
@ -35,7 +35,7 @@ C3 = 0x199342e0ee5069.0p-68; /* 0.0000243904487962774090654 */
|
||||||
extern
|
extern
|
||||||
#endif
|
#endif
|
||||||
//__inline float
|
//__inline float
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__kernel_cosdf(double x)
|
__kernel_cosdf(double x)
|
||||||
{
|
{
|
||||||
double r, w, z;
|
double r, w, z;
|
||||||
|
|
|
@ -71,7 +71,7 @@ __frexp_exp(double x, int *expt)
|
||||||
* has filtered out very large x, for which overflow would be inevitable.
|
* has filtered out very large x, for which overflow would be inevitable.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__ldexp_exp(double x, int expt)
|
__ldexp_exp(double x, int expt)
|
||||||
{
|
{
|
||||||
double exp_x, scale;
|
double exp_x, scale;
|
||||||
|
@ -83,7 +83,7 @@ __ldexp_exp(double x, int expt)
|
||||||
return (exp_x * scale);
|
return (exp_x * scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT double complex
|
OLM_DLLEXPORT double complex
|
||||||
__ldexp_cexp(double complex z, int expt)
|
__ldexp_cexp(double complex z, int expt)
|
||||||
{
|
{
|
||||||
double x, y, exp_x, scale1, scale2;
|
double x, y, exp_x, scale1, scale2;
|
||||||
|
|
|
@ -54,7 +54,7 @@ __frexp_expf(float x, int *expt)
|
||||||
return (exp_x);
|
return (exp_x);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__ldexp_expf(float x, int expt)
|
__ldexp_expf(float x, int expt)
|
||||||
{
|
{
|
||||||
float exp_x, scale;
|
float exp_x, scale;
|
||||||
|
@ -66,7 +66,7 @@ __ldexp_expf(float x, int expt)
|
||||||
return (exp_x * scale);
|
return (exp_x * scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT float complex
|
OLM_DLLEXPORT float complex
|
||||||
__ldexp_cexpf(float complex z, int expt)
|
__ldexp_cexpf(float complex z, int expt)
|
||||||
{
|
{
|
||||||
float x, y, exp_x, scale1, scale2;
|
float x, y, exp_x, scale1, scale2;
|
||||||
|
|
|
@ -290,7 +290,7 @@ one = 1.0,
|
||||||
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
|
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
|
||||||
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
|
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
|
||||||
|
|
||||||
DLLEXPORT int
|
OLM_DLLEXPORT int
|
||||||
__kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec)
|
__kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec)
|
||||||
{
|
{
|
||||||
int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
|
int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
|
||||||
|
|
|
@ -57,7 +57,7 @@ S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */
|
||||||
S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
|
S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
|
||||||
S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
|
S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
__kernel_sin(double x, double y, int iy)
|
__kernel_sin(double x, double y, int iy)
|
||||||
{
|
{
|
||||||
double z,r,v,w;
|
double z,r,v,w;
|
||||||
|
|
|
@ -34,7 +34,7 @@ S4 = 0x16cd878c3b46a7.0p-71; /* 0.0000027183114939898219064 */
|
||||||
extern
|
extern
|
||||||
#endif
|
#endif
|
||||||
//__inline float
|
//__inline float
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__kernel_sindf(double x)
|
__kernel_sindf(double x)
|
||||||
{
|
{
|
||||||
double r, s, w, z;
|
double r, s, w, z;
|
||||||
|
|
|
@ -77,7 +77,7 @@ static const double xxx[] = {
|
||||||
#define T xxx
|
#define T xxx
|
||||||
/* INDENT ON */
|
/* INDENT ON */
|
||||||
|
|
||||||
DLLEXPORT double
|
double
|
||||||
__kernel_tan(double x, double y, int iy) {
|
__kernel_tan(double x, double y, int iy) {
|
||||||
double z, r, v, w, s;
|
double z, r, v, w, s;
|
||||||
int32_t ix, hx;
|
int32_t ix, hx;
|
||||||
|
|
|
@ -37,7 +37,7 @@ T[] = {
|
||||||
extern
|
extern
|
||||||
#endif
|
#endif
|
||||||
//__inline float
|
//__inline float
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
__kernel_tandf(double x, int iy)
|
__kernel_tandf(double x, int iy)
|
||||||
{
|
{
|
||||||
double z,r,w,s,t,u;
|
double z,r,w,s,t,u;
|
||||||
|
|
|
@ -355,14 +355,16 @@ long double __kernel_sinl(long double, long double, int);
|
||||||
long double __kernel_cosl(long double, long double);
|
long double __kernel_cosl(long double, long double);
|
||||||
long double __kernel_tanl(long double, long double, int);
|
long double __kernel_tanl(long double, long double, int);
|
||||||
|
|
||||||
|
#undef OLM_DLLEXPORT
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# ifdef IMPORT_EXPORTS
|
# ifdef IMPORT_EXPORTS
|
||||||
# define DLLEXPORT __declspec(dllimport)
|
# define OLM_DLLEXPORT __declspec(dllimport)
|
||||||
# else
|
# else
|
||||||
# define DLLEXPORT __declspec(dllexport)
|
# define OLM_DLLEXPORT __declspec(OLM_DLLEXPORT)
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#define DLLEXPORT __attribute__ ((visibility("default")))
|
#define OLM_DLLEXPORT __attribute__ ((visibility("default")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* !_MATH_PRIVATE_H_ */
|
#endif /* !_MATH_PRIVATE_H_ */
|
||||||
|
|
|
@ -33,7 +33,7 @@ one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
|
||||||
ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
|
ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
|
||||||
huge= 1.00000000000000000000e+300;
|
huge= 1.00000000000000000000e+300;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
asinh(double x)
|
asinh(double x)
|
||||||
{
|
{
|
||||||
double t,w;
|
double t,w;
|
||||||
|
|
|
@ -25,7 +25,7 @@ one = 1.0000000000e+00, /* 0x3F800000 */
|
||||||
ln2 = 6.9314718246e-01, /* 0x3f317218 */
|
ln2 = 6.9314718246e-01, /* 0x3f317218 */
|
||||||
huge= 1.0000000000e+30;
|
huge= 1.0000000000e+30;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
asinhf(float x)
|
asinhf(float x)
|
||||||
{
|
{
|
||||||
float t,w;
|
float t,w;
|
||||||
|
|
|
@ -70,7 +70,7 @@ static const double aT[] = {
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
huge = 1.0e300;
|
huge = 1.0e300;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
atan(double x)
|
atan(double x)
|
||||||
{
|
{
|
||||||
double w,s1,s2,z;
|
double w,s1,s2,z;
|
||||||
|
|
|
@ -46,7 +46,7 @@ static const float
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
huge = 1.0e30;
|
huge = 1.0e30;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
atanf(float x)
|
atanf(float x)
|
||||||
{
|
{
|
||||||
float w,s1,s2,z;
|
float w,s1,s2,z;
|
||||||
|
|
|
@ -29,7 +29,7 @@ static const long double
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
huge = 1.0e300;
|
huge = 1.0e300;
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
atanl(long double x)
|
atanl(long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u;
|
union IEEEl2bits u;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
carg(double complex z)
|
carg(double complex z)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
cargf(float complex z)
|
cargf(float complex z)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
cargl(long double complex z)
|
cargl(long double complex z)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ P2 = 1.621429720105354466140, /* 0x3ff9f160, 0x4a49d6c2 */
|
||||||
P3 = -0.758397934778766047437, /* 0xbfe844cb, 0xbee751d9 */
|
P3 = -0.758397934778766047437, /* 0xbfe844cb, 0xbee751d9 */
|
||||||
P4 = 0.145996192886612446982; /* 0x3fc2b000, 0xd4e4edd7 */
|
P4 = 0.145996192886612446982; /* 0x3fc2b000, 0xd4e4edd7 */
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
cbrt(double x)
|
cbrt(double x)
|
||||||
{
|
{
|
||||||
int32_t hx;
|
int32_t hx;
|
||||||
|
|
|
@ -28,7 +28,7 @@ static const unsigned
|
||||||
B1 = 709958130, /* B1 = (127-127.0/3-0.03306235651)*2**23 */
|
B1 = 709958130, /* B1 = (127-127.0/3-0.03306235651)*2**23 */
|
||||||
B2 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */
|
B2 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
cbrtf(float x)
|
cbrtf(float x)
|
||||||
{
|
{
|
||||||
double r,T;
|
double r,T;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
static const unsigned
|
static const unsigned
|
||||||
B1 = 709958130; /* B1 = (127-127.0/3-0.03306235651)*2**23 */
|
B1 = 709958130; /* B1 = (127-127.0/3-0.03306235651)*2**23 */
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
cbrtl(long double x)
|
cbrtl(long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u, v;
|
union IEEEl2bits u, v;
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
static const double huge = 0x1p1023;
|
static const double huge = 0x1p1023;
|
||||||
|
|
||||||
DLLEXPORT double complex
|
OLM_DLLEXPORT double complex
|
||||||
ccosh(double complex z)
|
ccosh(double complex z)
|
||||||
{
|
{
|
||||||
double x, y, h;
|
double x, y, h;
|
||||||
|
@ -146,7 +146,7 @@ ccosh(double complex z)
|
||||||
return (CMPLX((x * x) * (y - y), (x + x) * (y - y)));
|
return (CMPLX((x * x) * (y - y), (x + x) * (y - y)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT double complex
|
OLM_DLLEXPORT double complex
|
||||||
ccos(double complex z)
|
ccos(double complex z)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
static const float huge = 0x1p127;
|
static const float huge = 0x1p127;
|
||||||
|
|
||||||
DLLEXPORT float complex
|
OLM_DLLEXPORT float complex
|
||||||
ccoshf(float complex z)
|
ccoshf(float complex z)
|
||||||
{
|
{
|
||||||
float x, y, h;
|
float x, y, h;
|
||||||
|
@ -96,7 +96,7 @@ ccoshf(float complex z)
|
||||||
return (CMPLXF((x * x) * (y - y), (x + x) * (y - y)));
|
return (CMPLXF((x * x) * (y - y), (x + x) * (y - y)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT float complex
|
OLM_DLLEXPORT float complex
|
||||||
ccosf(float complex z)
|
ccosf(float complex z)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
static const double huge = 1.0e300;
|
static const double huge = 1.0e300;
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
ceil(double x)
|
ceil(double x)
|
||||||
{
|
{
|
||||||
int32_t i0,i1,j0;
|
int32_t i0,i1,j0;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
static const float huge = 1.0e30;
|
static const float huge = 1.0e30;
|
||||||
|
|
||||||
DLLEXPORT float
|
OLM_DLLEXPORT float
|
||||||
ceilf(float x)
|
ceilf(float x)
|
||||||
{
|
{
|
||||||
int32_t i0,j0;
|
int32_t i0,j0;
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
static const long double huge = 1.0e300;
|
static const long double huge = 1.0e300;
|
||||||
|
|
||||||
DLLEXPORT long double
|
OLM_DLLEXPORT long double
|
||||||
ceill(long double x)
|
ceill(long double x)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u = { .e = x };
|
union IEEEl2bits u = { .e = x };
|
||||||
|
|
|
@ -36,7 +36,7 @@ static const u_int32_t
|
||||||
exp_ovfl = 0x40862e42, /* high bits of MAX_EXP * ln2 ~= 710 */
|
exp_ovfl = 0x40862e42, /* high bits of MAX_EXP * ln2 ~= 710 */
|
||||||
cexp_ovfl = 0x4096b8e4; /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */
|
cexp_ovfl = 0x4096b8e4; /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */
|
||||||
|
|
||||||
DLLEXPORT double complex
|
OLM_DLLEXPORT double complex
|
||||||
cexp(double complex z)
|
cexp(double complex z)
|
||||||
{
|
{
|
||||||
double x, y, exp_x;
|
double x, y, exp_x;
|
||||||
|
|
|
@ -36,7 +36,7 @@ static const u_int32_t
|
||||||
exp_ovfl = 0x42b17218, /* MAX_EXP * ln2 ~= 88.722839355 */
|
exp_ovfl = 0x42b17218, /* MAX_EXP * ln2 ~= 88.722839355 */
|
||||||
cexp_ovfl = 0x43400074; /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */
|
cexp_ovfl = 0x43400074; /* (MAX_EXP - MIN_DENORM_EXP) * ln2 */
|
||||||
|
|
||||||
DLLEXPORT float complex
|
OLM_DLLEXPORT float complex
|
||||||
cexpf(float complex z)
|
cexpf(float complex z)
|
||||||
{
|
{
|
||||||
float x, y, exp_x;
|
float x, y, exp_x;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
DLLEXPORT double
|
OLM_DLLEXPORT double
|
||||||
cimag(double complex z)
|
cimag(double complex z)
|
||||||
{
|
{
|
||||||
return (__imag__ z);
|
return (__imag__ z);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue