xref: /titanic_41/usr/src/lib/libbc/inc/include/sys/ieeefp.h (revision 3c112a2b34403220c06c3e2fcac403358cfba168)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 #pragma ident	"%Z%%M%	%I%	%E% SMI"
23 
24 /*
25  * Copyright (c) 1987 by Sun Microsystems, Inc.
26  */
27 
28 /*
29  * Definitions for constants and types for IEEE floating point.
30  */
31 
32 #ifndef _sys_ieeefp_h
33 #define _sys_ieeefp_h
34 
35 
36 /*	Sun TYPES for IEEE floating point.	*/
37 
38 #ifdef sparc
39 enum fp_direction_type 		/* rounding direction */
40 	{
41 	fp_nearest	= 0,
42 	fp_tozero	= 1,
43 	fp_positive	= 2,
44 	fp_negative	= 3
45 	} ;
46 #endif
47 #ifdef i386
48 enum fp_direction_type 		/* rounding direction */
49 	{
50 	fp_nearest	= 0,
51 	fp_negative	= 1,
52 	fp_positive	= 2,
53 	fp_tozero	= 3
54 	} ;
55 #endif
56 #ifdef mc68000
57 enum fp_direction_type 		/* rounding direction */
58 	{
59 	fp_nearest	= 0,
60 	fp_tozero	= 1,
61 	fp_negative	= 2,
62 	fp_positive	= 3
63 	} ;
64 #endif
65 
66 #ifdef i386
67 enum fp_precision_type		/* extended rounding precision */
68 	{
69 	fp_single	= 0,
70 	fp_precision_3	= 1,
71 	fp_double	= 2,
72 	fp_extended	= 3
73 	} ;
74 #else
75 enum fp_precision_type		/* extended rounding precision */
76 	{
77 	fp_extended	= 0,
78 	fp_single	= 1,
79 	fp_double	= 2,
80 	fp_precision_3	= 3
81 	} ;
82 #endif
83 
84 #ifdef i386
85 enum fp_exception_type		/* exceptions according to bit number */
86 	{
87 	fp_invalid	= 0,
88 	fp_denormalized	= 1,
89 	fp_division	= 2,
90 	fp_overflow	= 3,
91 	fp_underflow	= 4,
92 	fp_inexact	= 5
93 	} ;
94 #else
95 enum fp_exception_type		/* exceptions according to bit number */
96 	{
97 	fp_inexact	= 0,
98 	fp_division	= 1,
99 	fp_underflow	= 2,
100 	fp_overflow	= 3,
101 	fp_invalid	= 4
102 	} ;
103 #endif
104 
105 enum fp_class_type		/* floating-point classes */
106 	{
107 	fp_zero		= 0,
108 	fp_subnormal	= 1,
109 	fp_normal	= 2,
110 	fp_infinity   	= 3,
111 	fp_quiet	= 4,
112 	fp_signaling	= 5
113 	} ;
114 
115 #endif /*!_sys_ieeefp_h*/
116