-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcmath.h
113 lines (91 loc) · 1.79 KB
/
cmath.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/* cmath.h - replacement for math.h or missing in libm functions */
#include <config.h>
#if defined(HAVE_LIBM)
# include <math.h>
#endif
#if defined(HAVE_IEEEFP_H)
# include <ieeefp.h>
#endif
#ifndef __ACEGR_SOURCE_
#ifndef MACHEP
extern double MACHEP;
#endif
#ifndef UFLOWTHRESH
extern double UFLOWTHRESH;
#endif
#ifndef MAXNUM
extern double MAXNUM;
#endif
#endif
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
#ifndef HAVE_HYPOT
# define hypot(x, y) sqrt((x)*(x) + (y)*(y))
#endif
extern double round ( double x );
#ifndef HAVE_RINT
# define rint round
#endif
#ifndef HAVE_CBRT
extern double cbrt ( double x );
#endif
/* Cygnus gnuwin32 has the log2 macro */
#ifdef log2
# undef log2
#endif
#ifndef HAVE_LOG2
extern double log2 ( double x );
#endif
#ifndef HAVE_LGAMMA
# define lgamma lgam
extern double lgam ( double x );
#else
# ifndef HAVE_LGAMMA_IN_MATH_H
extern double lgamma ( double x );
extern int signgam;
# endif
# define lgam lgamma
# define sgngam signgam
#endif
#ifndef HAVE_ACOSH
extern double acosh ( double x );
#endif
#ifndef HAVE_ASINH
extern double asinh ( double x );
#endif
#ifndef HAVE_ATANH
extern double atanh ( double x );
#endif
#ifndef HAVE_ERF
extern double erf ( double x );
#endif
#ifndef HAVE_ERFC
extern double erfc ( double x );
#endif
#ifndef HAVE_Y0
extern double y0 ( double x );
#endif
#ifndef HAVE_Y1
extern double y1 ( double x );
#endif
#ifndef HAVE_YN
extern double yn ( int n, double x );
#endif
#ifndef HAVE_J0
extern double j0 ( double x );
#endif
#ifndef HAVE_J1
extern double j1 ( double x );
#endif
#ifndef HAVE_JN
extern double jn ( int n, double x );
#endif
#ifndef HAVE_FINITE
# define finite isfinite
# ifndef HAVE_ISFINITE
# if !(defined(__APPLE__) && defined(__aarch64__))
extern int isfinite ( double x );
# endif
# endif
#endif