Capture window station name passed from usermode
[reactos.git] / reactos / include / win32k / math.h
1 /*
2 * math.h
3 *
4 * Mathematical functions.
5 *
6 * This file is part of the Mingw32 package.
7 *
8 * Contributors:
9 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * $Revision: 1.4 $
22 * $Author$
23 * $Date$
24 *
25 */
26 /* added modfl */
27
28 #ifndef _MATH_H_
29 #define _MATH_H_
30
31 #include_next <math.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /*
38 * HUGE_VAL is returned by strtod when the value would overflow the
39 * representation of 'double'. There are other uses as well.
40 *
41 * __imp__HUGE is a pointer to the actual variable _HUGE in
42 * MSVCRT.DLL. If we used _HUGE directly we would get a pointer
43 * to a thunk function.
44 *
45 * NOTE: The CRTDLL version uses _HUGE_dll instead.
46 */
47 #ifdef __MSVCRT__
48 extern double* __imp__HUGE;
49 #define HUGE_VAL (*__imp__HUGE)
50 #else
51 /* CRTDLL */
52 extern double* _HUGE_dll;
53 #define HUGE_VAL (*_HUGE_dll)
54 #endif
55
56 #define M_PI 22 / 7
57 #define M_PI_2 M_PI * 2
58
59 struct _exception
60 {
61 int type;
62 char *name;
63 double arg1;
64 double arg2;
65 double retval;
66 };
67
68 /*
69 * Types for the above _exception structure.
70 */
71
72 #define _DOMAIN 1 /* domain error in argument */
73 #define _SING 2 /* singularity */
74 #define _OVERFLOW 3 /* range overflow */
75 #define _UNDERFLOW 4 /* range underflow */
76 #define _TLOSS 5 /* total loss of precision */
77 #define _PLOSS 6 /* partial loss of precision */
78
79 /*
80 * Exception types with non-ANSI names for compatibility.
81 */
82
83 #ifndef __STRICT_ANSI__
84 #ifndef _NO_OLDNAMES
85
86 #define DOMAIN _DOMAIN
87 #define SING _SING
88 #define OVERFLOW _OVERFLOW
89 #define UNDERFLOW _UNDERFLOW
90 #define TLOSS _TLOSS
91 #define PLOSS _PLOSS
92
93 #endif /* Not _NO_OLDNAMES */
94 #endif /* Not __STRICT_ANSI__ */
95
96
97 double sin (double x);
98 double cos (double x);
99 double tan (double x);
100 double sinh (double x);
101 double cosh (double x);
102 double tanh (double x);
103 double asin (double x);
104 double acos (double x);
105 double atan (double x);
106 double atan2 (double y, double x);
107 double exp (double x);
108 double log (double x);
109 double log10 (double x);
110 double pow (double x, double y);
111 long double powl (long double x,long double y);
112 double sqrt (double x);
113 double ceil (double x);
114 double floor (double x);
115 double fabs (double x);
116 double ldexp (double x, int n);
117 double frexp (double x, int* exp);
118 double modf (double x, double* ip);
119 long double modfl (long double x,long double* ip);
120 double fmod (double x, double y);
121
122
123 #ifndef __STRICT_ANSI__
124
125 /* Complex number (for cabs) */
126 struct _complex
127 {
128 double x; /* Real part */
129 double y; /* Imaginary part */
130 };
131
132 double _cabs (struct _complex x);
133 double _hypot (double x, double y);
134 double _j0 (double x);
135 double _j1 (double x);
136 double _jn (int n, double x);
137 double _y0 (double x);
138 double _y1 (double x);
139 double _yn (int n, double x);
140
141 #ifndef _NO_OLDNAMES
142
143 /*
144 * Non-underscored versions of non-ANSI functions. These reside in
145 * liboldnames.a. Provided for extra portability.
146 */
147 #if 0
148 /* GCC 3.4 warns that this is not equal to it's internal definition for cabs */
149 double cabs (struct _complex x);
150 #endif
151 double hypot (double x, double y);
152 double j0 (double x);
153 double j1 (double x);
154 double jn (int n, double x);
155 double y0 (double x);
156 double y1 (double x);
157 double yn (int n, double x);
158
159 #endif /* Not _NO_OLDNAMES */
160
161 #endif /* Not __STRICT_ANSI__ */
162
163 #ifdef __cplusplus
164 }
165 #endif
166
167 #endif /* Not _MATH_H_ */
168