1 | /*
|
---|
2 | * Math functions.
|
---|
3 | *
|
---|
4 | * Derived from the mingw header written by Colin Peters.
|
---|
5 | * Modified for Wine use by Hans Leidekker.
|
---|
6 | * This file is in the public domain.
|
---|
7 | */
|
---|
8 |
|
---|
9 | /*
|
---|
10 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
11 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
12 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
13 | * a choice of LGPL license versions is made available with the language indicating
|
---|
14 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
15 | * of the LGPL is applied is otherwise unspecified.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef __WINE_MATH_H
|
---|
19 | #define __WINE_MATH_H
|
---|
20 |
|
---|
21 | #include <crtdefs.h>
|
---|
22 |
|
---|
23 | #include <pshpack8.h>
|
---|
24 |
|
---|
25 | #ifdef __cplusplus
|
---|
26 | extern "C" {
|
---|
27 | #endif
|
---|
28 |
|
---|
29 | #define _DOMAIN 1 /* domain error in argument */
|
---|
30 | #define _SING 2 /* singularity */
|
---|
31 | #define _OVERFLOW 3 /* range overflow */
|
---|
32 | #define _UNDERFLOW 4 /* range underflow */
|
---|
33 | #define _TLOSS 5 /* total loss of precision */
|
---|
34 | #define _PLOSS 6 /* partial loss of precision */
|
---|
35 |
|
---|
36 | #ifndef _EXCEPTION_DEFINED
|
---|
37 | #define _EXCEPTION_DEFINED
|
---|
38 | struct _exception
|
---|
39 | {
|
---|
40 | int type;
|
---|
41 | char *name;
|
---|
42 | double arg1;
|
---|
43 | double arg2;
|
---|
44 | double retval;
|
---|
45 | };
|
---|
46 | #endif /* _EXCEPTION_DEFINED */
|
---|
47 |
|
---|
48 | #ifndef _COMPLEX_DEFINED
|
---|
49 | #define _COMPLEX_DEFINED
|
---|
50 | struct _complex
|
---|
51 | {
|
---|
52 | double x; /* Real part */
|
---|
53 | double y; /* Imaginary part */
|
---|
54 | };
|
---|
55 | #endif /* _COMPLEX_DEFINED */
|
---|
56 |
|
---|
57 | double __cdecl sin(double);
|
---|
58 | double __cdecl cos(double);
|
---|
59 | double __cdecl tan(double);
|
---|
60 | double __cdecl sinh(double);
|
---|
61 | double __cdecl cosh(double);
|
---|
62 | double __cdecl tanh(double);
|
---|
63 | double __cdecl asin(double);
|
---|
64 | double __cdecl acos(double);
|
---|
65 | double __cdecl atan(double);
|
---|
66 | double __cdecl atan2(double, double);
|
---|
67 | double __cdecl exp(double);
|
---|
68 | double __cdecl log(double);
|
---|
69 | double __cdecl log10(double);
|
---|
70 | double __cdecl pow(double, double);
|
---|
71 | double __cdecl sqrt(double);
|
---|
72 | double __cdecl ceil(double);
|
---|
73 | double __cdecl floor(double);
|
---|
74 | double __cdecl fabs(double);
|
---|
75 | double __cdecl ldexp(double, int);
|
---|
76 | double __cdecl frexp(double, int*);
|
---|
77 | double __cdecl modf(double, double*);
|
---|
78 | double __cdecl fmod(double, double);
|
---|
79 |
|
---|
80 | double __cdecl hypot(double, double);
|
---|
81 | double __cdecl j0(double);
|
---|
82 | double __cdecl j1(double);
|
---|
83 | double __cdecl jn(int, double);
|
---|
84 | double __cdecl y0(double);
|
---|
85 | double __cdecl y1(double);
|
---|
86 | double __cdecl yn(int, double);
|
---|
87 |
|
---|
88 | int __cdecl _matherr(struct _exception*);
|
---|
89 | double __cdecl _cabs(struct _complex);
|
---|
90 |
|
---|
91 | #ifndef HUGE_VAL
|
---|
92 | # if defined(__GNUC__) && (__GNUC__ >= 3)
|
---|
93 | # define HUGE_VAL (__extension__ 0x1.0p2047)
|
---|
94 | # else
|
---|
95 | static const union {
|
---|
96 | unsigned char __c[8];
|
---|
97 | double __d;
|
---|
98 | } __huge_val = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
|
---|
99 | # define HUGE_VAL (__huge_val.__d)
|
---|
100 | # endif
|
---|
101 | #endif
|
---|
102 |
|
---|
103 | #ifdef __cplusplus
|
---|
104 | }
|
---|
105 | #endif
|
---|
106 |
|
---|
107 | #include <poppack.h>
|
---|
108 |
|
---|
109 | #endif /* __WINE_MATH_H */
|
---|