include: Add the msvcrt/crtdefs.h header and include it where needed.
[wine/wine64.git] / include / msvcrt / math.h
blob5aaf7abc311efa9c446d5855b90eb9868b8f4b75
1 /*
2 * Math functions.
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 */
9 #ifndef __WINE_MATH_H
10 #define __WINE_MATH_H
12 #include <crtdefs.h>
14 #include <pshpack8.h>
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 #define _DOMAIN 1 /* domain error in argument */
21 #define _SING 2 /* singularity */
22 #define _OVERFLOW 3 /* range overflow */
23 #define _UNDERFLOW 4 /* range underflow */
24 #define _TLOSS 5 /* total loss of precision */
25 #define _PLOSS 6 /* partial loss of precision */
27 #ifndef _EXCEPTION_DEFINED
28 #define _EXCEPTION_DEFINED
29 struct _exception
31 int type;
32 char *name;
33 double arg1;
34 double arg2;
35 double retval;
37 #endif /* _EXCEPTION_DEFINED */
39 #ifndef _COMPLEX_DEFINED
40 #define _COMPLEX_DEFINED
41 struct _complex
43 double x; /* Real part */
44 double y; /* Imaginary part */
46 #endif /* _COMPLEX_DEFINED */
48 double sin(double);
49 double cos(double);
50 double tan(double);
51 double sinh(double);
52 double cosh(double);
53 double tanh(double);
54 double asin(double);
55 double acos(double);
56 double atan(double);
57 double atan2(double, double);
58 double exp(double);
59 double log(double);
60 double log10(double);
61 double pow(double, double);
62 double sqrt(double);
63 double ceil(double);
64 double floor(double);
65 double fabs(double);
66 double ldexp(double, int);
67 double frexp(double, int*);
68 double modf(double, double*);
69 double fmod(double, double);
71 double hypot(double, double);
72 double j0(double);
73 double j1(double);
74 double jn(int, double);
75 double y0(double);
76 double y1(double);
77 double yn(int, double);
79 int _matherr(struct _exception*);
80 double _cabs(struct _complex);
82 #ifndef HUGE_VAL
83 # if defined(__GNUC__) && (__GNUC__ >= 3)
84 # define HUGE_VAL (__extension__ 0x1.0p2047)
85 # else
86 static const union {
87 unsigned char __c[8];
88 double __d;
89 } __huge_val = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
90 # define HUGE_VAL (__huge_val.__d)
91 # endif
92 #endif
94 #ifdef __cplusplus
96 #endif
98 #include <poppack.h>
100 #endif /* __WINE_MATH_H */