userenv/tests: Fix buffer overrun.
[wine/multimedia.git] / include / msvcrt / math.h
blob4192378ce8fe08d507687ee63e53468c209f48cf
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
11 #ifndef __WINE_USE_MSVCRT
12 #define __WINE_USE_MSVCRT
13 #endif
15 #include <pshpack8.h>
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 #define _DOMAIN 1 /* domain error in argument */
22 #define _SING 2 /* singularity */
23 #define _OVERFLOW 3 /* range overflow */
24 #define _UNDERFLOW 4 /* range underflow */
25 #define _TLOSS 5 /* total loss of precision */
26 #define _PLOSS 6 /* partial loss of precision */
28 #ifndef _EXCEPTION_DEFINED
29 #define _EXCEPTION_DEFINED
30 struct _exception
32 int type;
33 char *name;
34 double arg1;
35 double arg2;
36 double retval;
38 #endif /* _EXCEPTION_DEFINED */
40 #ifndef _COMPLEX_DEFINED
41 #define _COMPLEX_DEFINED
42 struct _complex
44 double x; /* Real part */
45 double y; /* Imaginary part */
47 #endif /* _COMPLEX_DEFINED */
49 double sin(double);
50 double cos(double);
51 double tan(double);
52 double sinh(double);
53 double cosh(double);
54 double tanh(double);
55 double asin(double);
56 double acos(double);
57 double atan(double);
58 double atan2(double, double);
59 double exp(double);
60 double log(double);
61 double log10(double);
62 double pow(double, double);
63 double sqrt(double);
64 double ceil(double);
65 double floor(double);
66 double fabs(double);
67 double ldexp(double, int);
68 double frexp(double, int*);
69 double modf(double, double*);
70 double fmod(double, double);
72 double hypot(double, double);
73 double j0(double);
74 double j1(double);
75 double jn(int, double);
76 double y0(double);
77 double y1(double);
78 double yn(int, double);
80 int _matherr(struct _exception*);
81 double _cabs(struct _complex);
83 #ifndef HUGE_VAL
84 # if defined(__GNUC__) && (__GNUC__ >= 3)
85 # define HUGE_VAL (__extension__ 0x1.0p2047)
86 # else
87 static const union {
88 unsigned char __c[8];
89 double __d;
90 } __huge_val = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
91 # define HUGE_VAL (__huge_val.__d)
92 # endif
93 #endif
95 #ifdef __cplusplus
97 #endif
99 #include <poppack.h>
101 #endif /* __WINE_MATH_H */