Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
fdlibm.h
Go to the documentation of this file.
1#ifndef FDLIBM_H
2#define FDLIBM_H
3
4/* @(#)fdlibm.h 1.5 04/04/22 */
5/*
6 * ====================================================
7 * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
11 * is preserved.
12 * ====================================================
13 */
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/* Sometimes it's necessary to define __LITTLE_ENDIAN explicitly
20 but these catch some common cases. */
21
22#if defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc) || \
23 defined(__alpha) || defined(__osf__)
24#define __LITTLE_ENDIAN
25#endif
26
27#ifdef __LITTLE_ENDIAN
28#define __HI(x) *(1 + (int*)&x)
29#define __LO(x) *(int*)&x
30#define __HIp(x) *(1 + (int*)x)
31#define __LOp(x) *(int*)x
32#else
33#define __HI(x) *(int*)&x
34#define __LO(x) *(1 + (int*)&x)
35#define __HIp(x) *(int*)x
36#define __LOp(x) *(1 + (int*)x)
37#endif
38
39// TODO: should __STDC__ actually be defined?
40//#ifdef __STDC__
41#define __P(p) p
42//#else
43//#define __P(p) ()
44//#endif
45
46/*
47 * ANSI/POSIX
48 */
49
50extern int signgam;
51
52#define MAXFLOAT ((float)3.40282346638528860e+38)
53
55
56#define _LIB_VERSION_TYPE enum fdversion
57#define _LIB_VERSION _fdlib_version
58
59/* if global variable _LIB_VERSION is not desirable, one may
60 * change the following to be a constant by:
61 * #define _LIB_VERSION_TYPE const enum version
62 * In that case, after one initializes the value _LIB_VERSION (see
63 * s_lib_version.c) during compile time, it cannot be modified
64 * in the middle of a program
65 */
67
68#define _IEEE_ fdlibm_ieee
69#define _SVID_ fdlibm_svid
70#define _XOPEN_ fdlibm_xopen
71#define _POSIX_ fdlibm_posix
72
73struct exception {
74 int type;
75 char* name;
76 double arg1;
77 double arg2;
78 double retval;
79};
80
81#define HUGE MAXFLOAT
82
83/*
84 * set X_TLOSS = pi*2**52, which is possibly defined in <values.h"
85 * (one may replace the following line by "#include "values.h"")
86 */
87
88#define X_TLOSS 1.41484755040568800000e+16
89
90#define DOMAIN 1
91#define SING 2
92#define OVERFLOW 3
93#define UNDERFLOW 4
94#define TLOSS 5
95#define PLOSS 6
96
97/*
98 * ANSI/POSIX
99 */
100extern double acos __P((double));
101extern double asin __P((double));
102extern double atan __P((double));
103extern double atan2 __P((double, double));
104extern double cos __P((double));
105extern double sin __P((double));
106extern double tan __P((double));
107
108extern double cosh __P((double));
109extern double sinh __P((double));
110extern double tanh __P((double));
111
112extern double exp __P((double));
113extern double frexp __P((double, int*));
114extern double ldexp __P((double, int));
115extern double log __P((double));
116extern double log10 __P((double));
117extern double modf __P((double, double*));
118
119extern double pow __P((double, double));
120extern double sqrt __P((double));
121
122extern double ceil __P((double));
123extern double fabs __P((double));
124extern double floor __P((double));
125extern double fmod __P((double, double));
126
127extern double erf __P((double));
128extern double erfc __P((double));
129extern double gamma __P((double));
130extern double hypot __P((double, double));
131extern int isnan __P((double));
132extern int finite __P((double));
133extern double j0 __P((double));
134extern double j1 __P((double));
135extern double jn __P((int, double));
136extern double lgamma __P((double));
137extern double y0 __P((double));
138extern double y1 __P((double));
139extern double yn __P((int, double));
140
141extern double acosh __P((double));
142extern double asinh __P((double));
143extern double atanh __P((double));
144extern double cbrt __P((double));
145extern double logb __P((double));
146extern double nextafter __P((double, double));
147extern double remainder __P((double, double));
148#ifdef _SCALB_INT
149extern double scalb __P((double, int));
150#else
151extern double scalb __P((double, double));
152#endif
153
154extern int matherr __P((struct exception*));
155
156/*
157 * IEEE Test Vector
158 */
159extern double significand __P((double));
160
161/*
162 * Functions callable from C, intended to support IEEE arithmetic.
163 */
164extern double copysign __P((double, double));
165extern int ilogb __P((double));
166extern double rint __P((double));
167extern double scalbn __P((double, int));
168
169/*
170 * BSD math library entry points
171 */
172extern double expm1 __P((double));
173extern double log1p __P((double));
174
175/*
176 * Reentrant version of gamma & lgamma; passes signgam back by reference
177 * as the second argument; user must allocate space for signgam.
178 */
179#ifdef _REENTRANT
180extern double gamma_r __P((double, int*));
181extern double lgamma_r __P((double, int*));
182#endif /* _REENTRANT */
183
184/* ieee style elementary functions */
185extern double __ieee754_sqrt __P((double));
186extern double __ieee754_acos __P((double));
187extern double __ieee754_acosh __P((double));
188extern double __ieee754_log __P((double));
189extern double __ieee754_atanh __P((double));
190extern double __ieee754_asin __P((double));
191extern double __ieee754_atan2 __P((double, double));
192extern double __ieee754_exp __P((double));
193extern double __ieee754_cosh __P((double));
194extern double __ieee754_fmod __P((double, double));
195extern double __ieee754_pow __P((double, double));
196extern double __ieee754_lgamma_r __P((double, int*));
197extern double __ieee754_gamma_r __P((double, int*));
198extern double __ieee754_lgamma __P((double));
199extern double __ieee754_gamma __P((double));
200extern double __ieee754_log10 __P((double));
201extern double __ieee754_sinh __P((double));
202extern double __ieee754_hypot __P((double, double));
203extern double __ieee754_j0 __P((double));
204extern double __ieee754_j1 __P((double));
205extern double __ieee754_y0 __P((double));
206extern double __ieee754_y1 __P((double));
207extern double __ieee754_jn __P((int, double));
208extern double __ieee754_yn __P((int, double));
209extern double __ieee754_remainder __P((double, double));
210extern int __ieee754_rem_pio2 __P((double, double*));
211#ifdef _SCALB_INT
212extern double __ieee754_scalb __P((double, int));
213#else
214extern double __ieee754_scalb __P((double, double));
215#endif
216
217/* fdlibm kernel function */
218extern double __kernel_standard __P((double, double, int));
219extern double __kernel_sin __P((double, double, int));
220extern double __kernel_cos __P((double, double));
221extern double __kernel_tan __P((double, double, int));
222extern int __kernel_rem_pio2 __P((double*, double*, int, int, int, const int*));
223
224#ifdef __cplusplus
225};
226#endif
227
228#endif /* FDLIBM_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
void floor()
void fmod()
void ceil()
double __ieee754_acos(double x) double __ieee754_acos(x) double x
double __ieee754_asin(double x) double __ieee754_asin(x) double x
double __ieee754_atan2(double y, double x) double __ieee754_atan2(y
double __ieee754_exp(double x) double __ieee754_exp(x) double x
double __ieee754_fmod(double x, double y) double __ieee754_fmod(x
double __ieee754_pow(double x, double y) double __ieee754_pow(x
double y1
Definition e_pow.c:163
double __ieee754_sqrt(double x) double __ieee754_sqrt(x) double x
_LIB_VERSION_TYPE _LIB_VERSION
double acos __P((double))
int signgam
fdversion
Definition fdlibm.h:54
@ fdlibm_xopen
Definition fdlibm.h:54
@ fdlibm_svid
Definition fdlibm.h:54
@ fdlibm_ieee
Definition fdlibm.h:54
@ fdlibm_posix
Definition fdlibm.h:54
double __kernel_cos(double x, double y) double __kernel_cos(x
double __kernel_sin(double x, double y, int iy) double __kernel_sin(x
double __kernel_tan(double x, double y, int iy)
Definition k_tan.c:122
double atan2(double, double)
Definition w_atan2.c:4
double frexp(double, int *)
double acos(double)
Definition w_acos.c:4
double modf(double, double *)
double cos(double)
double copysign(double, double)
double pow(double, double)
Definition w_pow.c:4
double ldexp(double, int)
Definition s_ldexp.c:22
double atan(double)
double fabs(double f)
Definition math.h:32
double tan(double)
double sqrt(double)
Definition w_sqrt.c:4
double sin(double)
double asin(double)
Definition w_asin.c:4
double exp(double)
Definition w_exp.c:4
j0
Definition s_ceil.c:40
Definition fdlibm.h:73
char * name
Definition fdlibm.h:75
double retval
Definition fdlibm.h:78
int type
Definition fdlibm.h:74
double arg1
Definition fdlibm.h:76
double arg2
Definition fdlibm.h:77