]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/libsa/ieeefloat.h
fd1999f89274a2cbd54eab87666b1ca06a418beb
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
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. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
37 * Revision 1.1.1.1 1998/09/22 21:05:51 wsanchez
38 * Import of Mac OS X kernel (~semeria)
40 * Revision 1.1.1.1 1998/03/07 02:25:35 wsanchez
41 * Import of OSF Mach kernel (~mburg)
43 * Revision 1.1.2.1 1996/10/10 13:56:15 yp
54 * Copyright (c) 1989, 1993
55 * The Regents of the University of California. All rights reserved.
57 * Redistribution and use in source and binary forms, with or without
58 * modification, are permitted provided that the following conditions
60 * 1. Redistributions of source code must retain the above copyright
61 * notice, this list of conditions and the following disclaimer.
62 * 2. Redistributions in binary form must reproduce the above copyright
63 * notice, this list of conditions and the following disclaimer in the
64 * documentation and/or other materials provided with the distribution.
65 * 3. All advertising materials mentioning features or use of this software
66 * must display the following acknowledgement:
67 * This product includes software developed by the University of
68 * California, Berkeley and its contributors.
69 * 4. Neither the name of the University nor the names of its contributors
70 * may be used to endorse or promote products derived from this software
71 * without specific prior written permission.
73 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
74 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
75 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
76 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
77 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
78 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
79 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
80 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
81 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
82 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
85 * @(#)float.h 8.1 (Berkeley) 6/10/93
88 #define FLT_RADIX 2 /* b */
89 #define FLT_ROUNDS 1 /* FP addition rounds to nearest */
91 #define FLT_MANT_DIG 24 /* p */
92 #define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
93 #define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
94 #define FLT_MIN_EXP -125 /* emin */
95 #define FLT_MIN 1.17549435E-38F /* b**(emin-1) */
96 #define FLT_MIN_10_EXP -37 /* ceil(log10(b**(emin-1))) */
97 #define FLT_MAX_EXP 128 /* emax */
98 #define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
99 #define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
101 #define DBL_MANT_DIG 53
102 #define DBL_EPSILON 2.2204460492503131E-16
104 #define DBL_MIN_EXP -1021
105 #define DBL_MIN 2.225073858507201E-308
106 #define DBL_MIN_10_EXP -307
107 #define DBL_MAX_EXP 1024
108 #define DBL_MAX 1.797693134862316E+308
109 #define DBL_MAX_10_EXP 308
111 #define LDBL_MANT_DIG DBL_MANT_DIG
112 #define LDBL_EPSILON DBL_EPSILON
113 #define LDBL_DIG DBL_DIG
114 #define LDBL_MIN_EXP DBL_MIN_EXP
115 #define LDBL_MIN DBL_MIN
116 #define LDBL_MIN_10_EXP DBL_MIN_10_EXP
117 #define LDBL_MAX_EXP DBL_MAX_EXP
118 #define LDBL_MAX DBL_MAX
119 #define LDBL_MAX_10_EXP DBL_MAX_10_EXP
121 #endif /* _IEEEFLOAT_H_ */