]> git.saurik.com Git - apple/xnu.git/blame - osfmk/libsa/ieeefloat.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / osfmk / libsa / ieeefloat.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
ff6e181a
A
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
1c79356b 12 *
ff6e181a
A
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1c79356b
A
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
ff6e181a
A
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
1c79356b
A
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*
24 * @OSF_COPYRIGHT@
25 *
26 */
27/*
28 * HISTORY
29 *
30 * Revision 1.1.1.1 1998/09/22 21:05:51 wsanchez
31 * Import of Mac OS X kernel (~semeria)
32 *
33 * Revision 1.1.1.1 1998/03/07 02:25:35 wsanchez
34 * Import of OSF Mach kernel (~mburg)
35 *
36 * Revision 1.1.2.1 1996/10/10 13:56:15 yp
37 * Created.
38 * [96/10/10 yp]
39 *
40 * $EndLog$
41 */
42
43#ifndef _IEEEFLOAT_H_
44#define _IEEEFLOAT_H_
45
46/*
47 * Copyright (c) 1989, 1993
48 * The Regents of the University of California. All rights reserved.
49 *
50 * Redistribution and use in source and binary forms, with or without
51 * modification, are permitted provided that the following conditions
52 * are met:
53 * 1. Redistributions of source code must retain the above copyright
54 * notice, this list of conditions and the following disclaimer.
55 * 2. Redistributions in binary form must reproduce the above copyright
56 * notice, this list of conditions and the following disclaimer in the
57 * documentation and/or other materials provided with the distribution.
58 * 3. All advertising materials mentioning features or use of this software
59 * must display the following acknowledgement:
60 * This product includes software developed by the University of
61 * California, Berkeley and its contributors.
62 * 4. Neither the name of the University nor the names of its contributors
63 * may be used to endorse or promote products derived from this software
64 * without specific prior written permission.
65 *
66 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
67 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
68 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
69 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
70 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
71 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
72 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
73 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
74 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
75 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
76 * SUCH DAMAGE.
77 *
78 * @(#)float.h 8.1 (Berkeley) 6/10/93
79 */
80
81#define FLT_RADIX 2 /* b */
82#define FLT_ROUNDS 1 /* FP addition rounds to nearest */
83
84#define FLT_MANT_DIG 24 /* p */
85#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
86#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
87#define FLT_MIN_EXP -125 /* emin */
88#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */
89#define FLT_MIN_10_EXP -37 /* ceil(log10(b**(emin-1))) */
90#define FLT_MAX_EXP 128 /* emax */
91#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
92#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
93
94#define DBL_MANT_DIG 53
95#define DBL_EPSILON 2.2204460492503131E-16
96#define DBL_DIG 15
97#define DBL_MIN_EXP -1021
98#define DBL_MIN 2.225073858507201E-308
99#define DBL_MIN_10_EXP -307
100#define DBL_MAX_EXP 1024
101#define DBL_MAX 1.797693134862316E+308
102#define DBL_MAX_10_EXP 308
103
104#define LDBL_MANT_DIG DBL_MANT_DIG
105#define LDBL_EPSILON DBL_EPSILON
106#define LDBL_DIG DBL_DIG
107#define LDBL_MIN_EXP DBL_MIN_EXP
108#define LDBL_MIN DBL_MIN
109#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
110#define LDBL_MAX_EXP DBL_MAX_EXP
111#define LDBL_MAX DBL_MAX
112#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
113
114#endif /* _IEEEFLOAT_H_ */