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