xref: /titanic_52/usr/src/cmd/ast/libast/i386/FEATURE/float (revision 906afcb89d0412cc073b95c2d701a804a8cdb62c)
1*906afcb8SAndy Fiddaman
2*906afcb8SAndy Fiddaman/* : : generated by proto : : */
3*906afcb8SAndy Fiddaman/* : : generated from contrib/ast/src/lib/libast/features/float by iffe version 2012-07-17 : : */
4*906afcb8SAndy Fiddaman
5*906afcb8SAndy Fiddaman#ifndef _def_float_ast
6*906afcb8SAndy Fiddaman#if !defined(__PROTO__)
7*906afcb8SAndy Fiddaman#  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
8*906afcb8SAndy Fiddaman#    if defined(__cplusplus)
9*906afcb8SAndy Fiddaman#      define __LINKAGE__	"C"
10*906afcb8SAndy Fiddaman#    else
11*906afcb8SAndy Fiddaman#      define __LINKAGE__
12*906afcb8SAndy Fiddaman#    endif
13*906afcb8SAndy Fiddaman#    define __STDARG__
14*906afcb8SAndy Fiddaman#    define __PROTO__(x)	x
15*906afcb8SAndy Fiddaman#    define __OTORP__(x)
16*906afcb8SAndy Fiddaman#    define __PARAM__(n,o)	n
17*906afcb8SAndy Fiddaman#    if !defined(__STDC__) && !defined(__cplusplus)
18*906afcb8SAndy Fiddaman#      if !defined(c_plusplus)
19*906afcb8SAndy Fiddaman#      	define const
20*906afcb8SAndy Fiddaman#      endif
21*906afcb8SAndy Fiddaman#      define signed
22*906afcb8SAndy Fiddaman#      define void		int
23*906afcb8SAndy Fiddaman#      define volatile
24*906afcb8SAndy Fiddaman#      define __V_		char
25*906afcb8SAndy Fiddaman#    else
26*906afcb8SAndy Fiddaman#      define __V_		void
27*906afcb8SAndy Fiddaman#    endif
28*906afcb8SAndy Fiddaman#  else
29*906afcb8SAndy Fiddaman#    define __PROTO__(x)	()
30*906afcb8SAndy Fiddaman#    define __OTORP__(x)	x
31*906afcb8SAndy Fiddaman#    define __PARAM__(n,o)	o
32*906afcb8SAndy Fiddaman#    define __LINKAGE__
33*906afcb8SAndy Fiddaman#    define __V_		char
34*906afcb8SAndy Fiddaman#    define const
35*906afcb8SAndy Fiddaman#    define signed
36*906afcb8SAndy Fiddaman#    define void		int
37*906afcb8SAndy Fiddaman#    define volatile
38*906afcb8SAndy Fiddaman#  endif
39*906afcb8SAndy Fiddaman#  define __MANGLE__	__LINKAGE__
40*906afcb8SAndy Fiddaman#  if defined(__cplusplus) || defined(c_plusplus)
41*906afcb8SAndy Fiddaman#    define __VARARG__	...
42*906afcb8SAndy Fiddaman#  else
43*906afcb8SAndy Fiddaman#    define __VARARG__
44*906afcb8SAndy Fiddaman#  endif
45*906afcb8SAndy Fiddaman#  if defined(__STDARG__)
46*906afcb8SAndy Fiddaman#    define __VA_START__(p,a)	va_start(p,a)
47*906afcb8SAndy Fiddaman#  else
48*906afcb8SAndy Fiddaman#    define __VA_START__(p,a)	va_start(p)
49*906afcb8SAndy Fiddaman#  endif
50*906afcb8SAndy Fiddaman#  if !defined(__INLINE__)
51*906afcb8SAndy Fiddaman#    if defined(__cplusplus)
52*906afcb8SAndy Fiddaman#      define __INLINE__	extern __MANGLE__ inline
53*906afcb8SAndy Fiddaman#    else
54*906afcb8SAndy Fiddaman#      if defined(_WIN32) && !defined(__GNUC__)
55*906afcb8SAndy Fiddaman#      	define __INLINE__	__inline
56*906afcb8SAndy Fiddaman#      endif
57*906afcb8SAndy Fiddaman#    endif
58*906afcb8SAndy Fiddaman#  endif
59*906afcb8SAndy Fiddaman#endif
60*906afcb8SAndy Fiddaman#if !defined(__LINKAGE__)
61*906afcb8SAndy Fiddaman#define __LINKAGE__		/* 2004-08-11 transition */
62*906afcb8SAndy Fiddaman#endif
63*906afcb8SAndy Fiddaman
64*906afcb8SAndy Fiddaman#define _def_float_ast	1
65*906afcb8SAndy Fiddaman#define _sys_types	1	/* #include <sys/types.h> ok */
66*906afcb8SAndy Fiddaman#define _hdr_float	1	/* #include <float.h> ok */
67*906afcb8SAndy Fiddaman#define _hdr_limits	1	/* #include <limits.h> ok */
68*906afcb8SAndy Fiddaman#define _hdr_math	1	/* #include <math.h> ok */
69*906afcb8SAndy Fiddaman#define _hdr_values	1	/* #include <values.h> ok */
70*906afcb8SAndy Fiddaman#define _LIB_m	1	/* -lm is a library */
71*906afcb8SAndy Fiddaman#define _lib_frexp	1	/* frexp() in default lib(s) */
72*906afcb8SAndy Fiddaman#define _lib_frexpl	1	/* frexpl() in default lib(s) */
73*906afcb8SAndy Fiddaman#define _lib_ldexp	1	/* ldexp() in default lib(s) */
74*906afcb8SAndy Fiddaman#define _lib_ldexpl	1	/* ldexpl() in default lib(s) */
75*906afcb8SAndy Fiddaman#define _lib_finite	1	/* finite() in default lib(s) */
76*906afcb8SAndy Fiddaman#define _lib_isnanl	1	/* isnanl() in default lib(s) */
77*906afcb8SAndy Fiddaman#define _lib_copysign	1	/* copysign() in default lib(s) */
78*906afcb8SAndy Fiddaman#define _lib_copysignl	1	/* copysignl() in default lib(s) */
79*906afcb8SAndy Fiddaman#define _npt_finite	1	/* finite() needs a prototype */
80*906afcb8SAndy Fiddaman#define _npt_finitel	1	/* finitel() needs a prototype */
81*906afcb8SAndy Fiddaman#define _npt_isinfl	1	/* isinfl() needs a prototype */
82*906afcb8SAndy Fiddaman#define _lib_fpclassify	1	/* fpclassify present and works */
83*906afcb8SAndy Fiddaman#define _lib_isinf	1	/* isinf present and works */
84*906afcb8SAndy Fiddaman#define _lib_isnan	1	/* isnan present and works */
85*906afcb8SAndy Fiddaman#define _lib_signbit	1	/* signbit present and works */
86*906afcb8SAndy Fiddaman#include <ast_common.h>
87*906afcb8SAndy Fiddaman#include <float.h>
88*906afcb8SAndy Fiddaman#include <math.h>
89*906afcb8SAndy Fiddaman#ifndef FLT_DIG
90*906afcb8SAndy Fiddaman#define FLT_DIG 6
91*906afcb8SAndy Fiddaman#endif
92*906afcb8SAndy Fiddaman#ifndef FLT_MAX
93*906afcb8SAndy Fiddaman#define FLT_MAX 3.4028234663852885981170E+38F
94*906afcb8SAndy Fiddaman#endif
95*906afcb8SAndy Fiddaman#ifndef FLT_MAX_10_EXP
96*906afcb8SAndy Fiddaman#define FLT_MAX_10_EXP (+38)
97*906afcb8SAndy Fiddaman#endif
98*906afcb8SAndy Fiddaman#ifndef FLT_MAX_EXP
99*906afcb8SAndy Fiddaman#define FLT_MAX_EXP (+128)
100*906afcb8SAndy Fiddaman#endif
101*906afcb8SAndy Fiddaman#ifndef FLT_MIN
102*906afcb8SAndy Fiddaman#define FLT_MIN 1.1754943508222875079688E-38F
103*906afcb8SAndy Fiddaman#endif
104*906afcb8SAndy Fiddaman#ifndef FLT_MIN_10_EXP
105*906afcb8SAndy Fiddaman#define FLT_MIN_10_EXP (-37)
106*906afcb8SAndy Fiddaman#endif
107*906afcb8SAndy Fiddaman#ifndef FLT_MIN_EXP
108*906afcb8SAndy Fiddaman#define FLT_MIN_EXP (-125)
109*906afcb8SAndy Fiddaman#endif
110*906afcb8SAndy Fiddaman#ifndef DBL_DIG
111*906afcb8SAndy Fiddaman#define DBL_DIG 15
112*906afcb8SAndy Fiddaman#endif
113*906afcb8SAndy Fiddaman#ifndef DBL_MAX
114*906afcb8SAndy Fiddaman#define DBL_MAX 1.7976931348623157081452E+308
115*906afcb8SAndy Fiddaman#endif
116*906afcb8SAndy Fiddaman#ifndef DBL_MAX_10_EXP
117*906afcb8SAndy Fiddaman#define DBL_MAX_10_EXP (+308)
118*906afcb8SAndy Fiddaman#endif
119*906afcb8SAndy Fiddaman#ifndef DBL_MAX_EXP
120*906afcb8SAndy Fiddaman#define DBL_MAX_EXP (+1024)
121*906afcb8SAndy Fiddaman#endif
122*906afcb8SAndy Fiddaman#ifndef DBL_MIN
123*906afcb8SAndy Fiddaman#define DBL_MIN 2.2250738585072013830903E-308
124*906afcb8SAndy Fiddaman#endif
125*906afcb8SAndy Fiddaman#ifndef DBL_MIN_10_EXP
126*906afcb8SAndy Fiddaman#define DBL_MIN_10_EXP (-307)
127*906afcb8SAndy Fiddaman#endif
128*906afcb8SAndy Fiddaman#ifndef DBL_MIN_EXP
129*906afcb8SAndy Fiddaman#define DBL_MIN_EXP (-1021)
130*906afcb8SAndy Fiddaman#endif
131*906afcb8SAndy Fiddaman#ifndef LDBL_DIG
132*906afcb8SAndy Fiddaman#define LDBL_DIG 18
133*906afcb8SAndy Fiddaman#endif
134*906afcb8SAndy Fiddaman#ifndef LDBL_MAX
135*906afcb8SAndy Fiddaman#define LDBL_MAX 1.1897314953572317650213E+4932L
136*906afcb8SAndy Fiddaman#endif
137*906afcb8SAndy Fiddaman#ifndef LDBL_MAX_10_EXP
138*906afcb8SAndy Fiddaman#define LDBL_MAX_10_EXP (+4932)
139*906afcb8SAndy Fiddaman#endif
140*906afcb8SAndy Fiddaman#ifndef LDBL_MAX_EXP
141*906afcb8SAndy Fiddaman#define LDBL_MAX_EXP (+16384)
142*906afcb8SAndy Fiddaman#endif
143*906afcb8SAndy Fiddaman#ifndef LDBL_MIN
144*906afcb8SAndy Fiddaman#define LDBL_MIN 3.3621031431120935062627E-4932L
145*906afcb8SAndy Fiddaman#endif
146*906afcb8SAndy Fiddaman#ifndef LDBL_MIN_10_EXP
147*906afcb8SAndy Fiddaman#define LDBL_MIN_10_EXP (-4931)
148*906afcb8SAndy Fiddaman#endif
149*906afcb8SAndy Fiddaman#ifndef LDBL_MIN_EXP
150*906afcb8SAndy Fiddaman#define LDBL_MIN_EXP (-16381)
151*906afcb8SAndy Fiddaman#endif
152*906afcb8SAndy Fiddaman
153*906afcb8SAndy Fiddaman
154*906afcb8SAndy Fiddaman#define USHRT_DIG		4
155*906afcb8SAndy Fiddaman#define UINT_DIG		9
156*906afcb8SAndy Fiddaman#define ULONG_DIG		9
157*906afcb8SAndy Fiddaman#define ULLONG_DIG		19
158*906afcb8SAndy Fiddaman#define UINTMAX_DIG		ULLONG_DIG
159*906afcb8SAndy Fiddaman
160*906afcb8SAndy Fiddaman#define FLT_ULONG_MAX		4294967295.0F
161*906afcb8SAndy Fiddaman#define FLT_ULLONG_MAX		18446744073709551615.0F
162*906afcb8SAndy Fiddaman#define FLT_UINTMAX_MAX		FLT_ULLONG_MAX
163*906afcb8SAndy Fiddaman#define FLT_LONG_MAX		2147483647.0F
164*906afcb8SAndy Fiddaman#define FLT_LLONG_MAX		9223372036854775807.0F
165*906afcb8SAndy Fiddaman#define FLT_INTMAX_MAX		FLT_LLONG_MAX
166*906afcb8SAndy Fiddaman#define FLT_LONG_MIN		(-2147483648.0F)
167*906afcb8SAndy Fiddaman#define FLT_LLONG_MIN		(-9223372036854775808.0F)
168*906afcb8SAndy Fiddaman#define FLT_INTMAX_MIN		FLT_LLONG_MIN
169*906afcb8SAndy Fiddaman
170*906afcb8SAndy Fiddaman#define DBL_ULONG_MAX		4294967295.0
171*906afcb8SAndy Fiddaman#define DBL_ULLONG_MAX		18446744073709551615.0
172*906afcb8SAndy Fiddaman#define DBL_UINTMAX_MAX		DBL_ULLONG_MAX
173*906afcb8SAndy Fiddaman#define DBL_LONG_MAX		2147483647.0
174*906afcb8SAndy Fiddaman#define DBL_LLONG_MAX		9223372036854775807.0
175*906afcb8SAndy Fiddaman#define DBL_INTMAX_MAX		DBL_LLONG_MAX
176*906afcb8SAndy Fiddaman#define DBL_LONG_MIN		(-2147483648.0)
177*906afcb8SAndy Fiddaman#define DBL_LLONG_MIN		(-9223372036854775808.0)
178*906afcb8SAndy Fiddaman#define DBL_INTMAX_MIN		DBL_LLONG_MIN
179*906afcb8SAndy Fiddaman
180*906afcb8SAndy Fiddaman#define LDBL_ULONG_MAX		4294967295.0L
181*906afcb8SAndy Fiddaman#define LDBL_ULLONG_MAX		18446744073709551615.0L
182*906afcb8SAndy Fiddaman#define LDBL_UINTMAX_MAX	LDBL_ULLONG_MAX
183*906afcb8SAndy Fiddaman#define LDBL_LONG_MAX		2147483647.0L
184*906afcb8SAndy Fiddaman#define LDBL_LLONG_MAX		9223372036854775807.0L
185*906afcb8SAndy Fiddaman#define LDBL_INTMAX_MAX		LDBL_LLONG_MAX
186*906afcb8SAndy Fiddaman#define LDBL_LONG_MIN		(-2147483648.0L)
187*906afcb8SAndy Fiddaman#define LDBL_LLONG_MIN		(-9223372036854775808.0L)
188*906afcb8SAndy Fiddaman#define LDBL_INTMAX_MIN		LDBL_LLONG_MIN
189*906afcb8SAndy Fiddaman
190*906afcb8SAndy Fiddaman#define FLTMAX_UINTMAX_MAX	LDBL_UINTMAX_MAX
191*906afcb8SAndy Fiddaman#define FLTMAX_INTMAX_MAX	LDBL_INTMAX_MAX
192*906afcb8SAndy Fiddaman#define FLTMAX_INTMAX_MIN	LDBL_INTMAX_MIN
193*906afcb8SAndy Fiddaman
194*906afcb8SAndy Fiddamantypedef union _ast_dbl_exp_u
195*906afcb8SAndy Fiddaman{
196*906afcb8SAndy Fiddaman	uint32_t		e[sizeof(double)/4];
197*906afcb8SAndy Fiddaman	double			f;
198*906afcb8SAndy Fiddaman} _ast_dbl_exp_t;
199*906afcb8SAndy Fiddaman
200*906afcb8SAndy Fiddaman#define _ast_dbl_exp_index	1
201*906afcb8SAndy Fiddaman#define _ast_dbl_exp_shift	20
202*906afcb8SAndy Fiddaman
203*906afcb8SAndy Fiddamantypedef union _fltmax_exp_u
204*906afcb8SAndy Fiddaman{
205*906afcb8SAndy Fiddaman	uint32_t		e[sizeof(_ast_fltmax_t)/4];
206*906afcb8SAndy Fiddaman	_ast_fltmax_t		f;
207*906afcb8SAndy Fiddaman} _ast_fltmax_exp_t;
208*906afcb8SAndy Fiddaman
209*906afcb8SAndy Fiddaman#define _ast_fltmax_exp_index	2
210*906afcb8SAndy Fiddaman#define _ast_fltmax_exp_shift	0
211*906afcb8SAndy Fiddaman
212*906afcb8SAndy Fiddaman#define _ast_flt_unsigned_max_t	unsigned long long
213*906afcb8SAndy Fiddaman#define _ast_flt_nan_init	0xff,0xff,0xff,0x7f
214*906afcb8SAndy Fiddaman#define _ast_flt_inf_init	0x00,0x00,0x80,0x7f
215*906afcb8SAndy Fiddaman#define _ast_dbl_nan_init	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f
216*906afcb8SAndy Fiddaman#define _ast_dbl_inf_init	0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f
217*906afcb8SAndy Fiddaman#define _ast_ldbl_nan_init	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00
218*906afcb8SAndy Fiddaman#define _ast_ldbl_inf_init	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x00,0x00
219*906afcb8SAndy Fiddaman#endif
220