ddraw: Use wined3d_get_adapter_display_mode() in ddraw7_GetFourCCCodes().
[wine/multimedia.git] / include / msvcrt / math.h
blobe99777d3ffa91d7235fccaa54bc6d002f6c90d36
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 __cdecl sin(double);
49 double __cdecl cos(double);
50 double __cdecl tan(double);
51 double __cdecl sinh(double);
52 double __cdecl cosh(double);
53 double __cdecl tanh(double);
54 double __cdecl asin(double);
55 double __cdecl acos(double);
56 double __cdecl atan(double);
57 double __cdecl atan2(double, double);
58 double __cdecl exp(double);
59 double __cdecl log(double);
60 double __cdecl log10(double);
61 double __cdecl pow(double, double);
62 double __cdecl sqrt(double);
63 double __cdecl ceil(double);
64 double __cdecl floor(double);
65 double __cdecl fabs(double);
66 double __cdecl ldexp(double, int);
67 double __cdecl frexp(double, int*);
68 double __cdecl modf(double, double*);
69 double __cdecl fmod(double, double);
71 double __cdecl hypot(double, double);
72 double __cdecl j0(double);
73 double __cdecl j1(double);
74 double __cdecl jn(int, double);
75 double __cdecl y0(double);
76 double __cdecl y1(double);
77 double __cdecl yn(int, double);
79 #ifdef __x86_64__
81 float __cdecl sinf(float);
82 float __cdecl cosf(float);
83 float __cdecl tanf(float);
84 float __cdecl sinhf(float);
85 float __cdecl coshf(float);
86 float __cdecl tanhf(float);
87 float __cdecl asinf(float);
88 float __cdecl acosf(float);
89 float __cdecl atanf(float);
90 float __cdecl atan2f(float, float);
91 float __cdecl expf(float);
92 float __cdecl logf(float);
93 float __cdecl log10f(float);
94 float __cdecl powf(float, float);
95 float __cdecl sqrtf(float);
96 float __cdecl ceilf(float);
97 float __cdecl floorf(float);
98 float __cdecl fabsf(float);
99 float __cdecl ldexpf(float, int);
100 float __cdecl frexpf(float, int*);
101 float __cdecl modff(float, float*);
102 float __cdecl fmodf(float, float);
104 #else
106 #define sinf(x) ((float)sin((double)(x)))
107 #define cosf(x) ((float)cos((double)(x)))
108 #define tanf(x) ((float)tan((double)(x)))
109 #define sinhf(x) ((float)sinh((double)(x)))
110 #define coshf(x) ((float)cosh((double)(x)))
111 #define tanhf(x) ((float)tanh((double)(x)))
112 #define asinf(x) ((float)asin((double)(x)))
113 #define acosf(x) ((float)acos((double)(x)))
114 #define atanf(x) ((float)atan((double)(x)))
115 #define atan2f(x,y) ((float)atan2((double)(x), (double)(y)))
116 #define expf(x) ((float)exp((double)(x)))
117 #define logf(x) ((float)log((double)(x)))
118 #define log10f(x) ((float)log10((double)(x)))
119 #define powf(x,y) ((float)pow((double)(x), (double)(y)))
120 #define sqrtf(x) ((float)sqrt((double)(x)))
121 #define ceilf(x) ((float)ceil((double)(x)))
122 #define floorf(x) ((float)floor((double)(x)))
123 #define frexpf(x) ((float)frexp((double)(x)))
124 #define modff(x,y) ((float)modf((double)(x), (double*)(y)))
125 #define fmodf(x,y) ((float)fmod((double)(x), (double)(y)))
127 #endif
129 #define fabsf(x) ((float)fabs((double)(x)))
130 #define ldexpf(x,y) ((float)ldexp((double)(x),(y)))
132 float __cdecl hypotf(float, float);
134 int __cdecl _matherr(struct _exception*);
135 double __cdecl _cabs(struct _complex);
137 #ifndef HUGE_VAL
138 # if defined(__GNUC__) && (__GNUC__ >= 3)
139 # define HUGE_VAL (__extension__ 0x1.0p2047)
140 # else
141 static const union {
142 unsigned char __c[8];
143 double __d;
144 } __huge_val = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
145 # define HUGE_VAL (__huge_val.__d)
146 # endif
147 #endif
149 #ifdef __cplusplus
151 #endif
153 #include <poppack.h>
155 #endif /* __WINE_MATH_H */