VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/float.h@ 38147

Last change on this file since 38147 was 21731, checked in by vboxsync, 16 years ago

crOpenGL: update to wine 1.1.26

  • Property svn:eol-style set to native
File size: 4.7 KB
Line 
1/*
2 * Floating point arithmetic.
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_FLOAT_H
19#define __WINE_FLOAT_H
20
21#include <crtdefs.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#define DBL_DIG 15
28#define DBL_EPSILON 2.2204460492503131e-016
29#define DBL_MANT_DIG 53
30#define DBL_MAX 1.7976931348623158e+308
31#define DBL_MAX_10_EXP 308
32#define DBL_MAX_EXP 1024
33#define DBL_MIN 2.2250738585072014e-308
34#define DBL_MIN_10_EXP (-307)
35#define DBL_MIN_EXP (-1021)
36
37#define _DBL_RADIX 2
38#define _DBL_ROUNDS 1
39
40#define DBL_RADIX _DBL_RADIX
41#define DBL_ROUNDS _DBL_ROUNDS
42
43#define FLT_DIG 6
44#define FLT_EPSILON 1.192092896e-07F
45#define FLT_MANT_DIG 24
46#define FLT_MAX 3.402823466e+38F
47#define FLT_MAX_10_EXP 38
48#define FLT_MAX_EXP 128
49#define FLT_MIN 1.175494351e-38F
50#define FLT_MIN_10_EXP (-37)
51#define FLT_MIN_EXP (-125)
52
53#define FLT_RADIX 2
54#define FLT_ROUNDS 1
55
56#define LDBL_DIG DBL_DIG
57#define LDBL_EPSILON DBL_EPSILON
58#define LDBL_MANT_DIG DBL_MANT_DIG
59#define LDBL_MAX DBL_MAX
60#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
61#define LDBL_MAX_EXP DBL_MAX_EXP
62#define LDBL_MIN DBL_MIN
63#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
64#define LDBL_MIN_EXP DBL_MIN_EXP
65
66#define _LDBL_RADIX _DBL_RADIX
67#define _LDBL_ROUNDS _DBL_ROUNDS
68
69#define LDBL_RADIX _LDBL_RADIX
70#define LDBL_ROUNDS _LDBL_ROUNDS
71
72/* _controlfp masks and bitflags - x86 only so far */
73#ifdef __i386__
74
75/* Control word masks for unMask */
76#define _MCW_EM 0x0008001F /* Error masks */
77#define _MCW_IC 0x00040000 /* Infinity */
78#define _MCW_RC 0x00000300 /* Rounding */
79#define _MCW_PC 0x00030000 /* Precision */
80
81/* Control word values for unNew (use with related unMask above) */
82#define _EM_INVALID 0x00000010
83#define _EM_DENORMAL 0x00080000
84#define _EM_ZERODIVIDE 0x00000008
85#define _EM_OVERFLOW 0x00000004
86#define _EM_UNDERFLOW 0x00000002
87#define _EM_INEXACT 0x00000001
88#define _IC_AFFINE 0x00040000
89#define _IC_PROJECTIVE 0x00000000
90#define _RC_CHOP 0x00000300
91#define _RC_UP 0x00000200
92#define _RC_DOWN 0x00000100
93#define _RC_NEAR 0x00000000
94#define _PC_24 0x00020000
95#define _PC_53 0x00010000
96#define _PC_64 0x00000000
97#endif
98
99/* _statusfp bit flags */
100#define _SW_INEXACT 0x00000001 /* inexact (precision) */
101#define _SW_UNDERFLOW 0x00000002 /* underflow */
102#define _SW_OVERFLOW 0x00000004 /* overflow */
103#define _SW_ZERODIVIDE 0x00000008 /* zero divide */
104#define _SW_INVALID 0x00000010 /* invalid */
105
106#define _SW_UNEMULATED 0x00000040 /* unemulated instruction */
107#define _SW_SQRTNEG 0x00000080 /* square root of a neg number */
108#define _SW_STACKOVERFLOW 0x00000200 /* FP stack overflow */
109#define _SW_STACKUNDERFLOW 0x00000400 /* FP stack underflow */
110
111#define _SW_DENORMAL 0x00080000 /* denormal status bit */
112
113/* fpclass constants */
114#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
115#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
116#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
117#define _FPCLASS_NN 0x0008 /* Negative Normal */
118#define _FPCLASS_ND 0x0010 /* Negative Denormal */
119#define _FPCLASS_NZ 0x0020 /* Negative Zero */
120#define _FPCLASS_PZ 0x0040 /* Positive Zero */
121#define _FPCLASS_PD 0x0080 /* Positive Denormal */
122#define _FPCLASS_PN 0x0100 /* Positive Normal */
123#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
124
125/* floating point error signals */
126#define _FPE_INVALID 0x81
127#define _FPE_DENORMAL 0x82
128#define _FPE_ZERODIVIDE 0x83
129#define _FPE_OVERFLOW 0x84
130#define _FPE_UNDERFLOW 0x85
131#define _FPE_INEXACT 0x86
132#define _FPE_UNEMULATED 0x87
133#define _FPE_SQRTNEG 0x88
134#define _FPE_STACKOVERFLOW 0x8a
135#define _FPE_STACKUNDERFLOW 0x8b
136#define _FPE_EXPLICITGEN 0x8c
137
138double __cdecl _copysign (double, double);
139double __cdecl _chgsign (double);
140double __cdecl _scalb(double, __msvcrt_long);
141double __cdecl _logb(double);
142double __cdecl _nextafter(double, double);
143int __cdecl _finite(double);
144int __cdecl _isnan(double);
145int __cdecl _fpclass(double);
146
147#ifdef __cplusplus
148}
149#endif
150
151#endif /* __WINE_FLOAT_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette