xref: /titanic_50/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math (revision 3e14f97f673e8a630f076077de35afdd43dc1587)
1
2/* : : generated by proto : : */
3/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/math.sh by iffe version 2009-12-04 : : */
4#ifndef _def_math_ksh93
5#if !defined(__PROTO__)
6#  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
7#    if defined(__cplusplus)
8#      define __LINKAGE__	"C"
9#    else
10#      define __LINKAGE__
11#    endif
12#    define __STDARG__
13#    define __PROTO__(x)	x
14#    define __OTORP__(x)
15#    define __PARAM__(n,o)	n
16#    if !defined(__STDC__) && !defined(__cplusplus)
17#      if !defined(c_plusplus)
18#      	define const
19#      endif
20#      define signed
21#      define void		int
22#      define volatile
23#      define __V_		char
24#    else
25#      define __V_		void
26#    endif
27#  else
28#    define __PROTO__(x)	()
29#    define __OTORP__(x)	x
30#    define __PARAM__(n,o)	o
31#    define __LINKAGE__
32#    define __V_		char
33#    define const
34#    define signed
35#    define void		int
36#    define volatile
37#  endif
38#  define __MANGLE__	__LINKAGE__
39#  if defined(__cplusplus) || defined(c_plusplus)
40#    define __VARARG__	...
41#  else
42#    define __VARARG__
43#  endif
44#  if defined(__STDARG__)
45#    define __VA_START__(p,a)	va_start(p,a)
46#  else
47#    define __VA_START__(p,a)	va_start(p)
48#  endif
49#  if !defined(__INLINE__)
50#    if defined(__cplusplus)
51#      define __INLINE__	extern __MANGLE__ inline
52#    else
53#      if defined(_WIN32) && !defined(__GNUC__)
54#      	define __INLINE__	__inline
55#      endif
56#    endif
57#  endif
58#endif
59#if !defined(__LINKAGE__)
60#define __LINKAGE__		/* 2004-08-11 transition */
61#endif
62
63#define _def_math_ksh93	1
64#define _sys_types	1	/* #include <sys/types.h> ok */
65#define _LIB_dll	1	/* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
66#define _LIB_ast	1	/* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
67#define _LIB_m	1	/* -lm is a library */
68#define _LIB_cmd	1	/* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
69#define _LIB_md	1	/* -lmd is a library */
70#define _LIB_nsl	1	/* -lnsl is a library */
71
72
73/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/data/math.tab : : */
74
75typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
76
77#include <ast_standards.h>
78#include <math.h>
79#include <ieeefp.h>
80
81static Sfdouble_t local_finite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return finite(a1);}
82static int local_fpclassify __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclassify(a1);}
83static int local_isfinite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isfinite(a1);}
84static int local_isgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreater(a1,a2);}
85static int local_isgreaterequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreaterequal(a1,a2);}
86static int local_isinf __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isinf(a1);}
87static int local_isless __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isless(a1,a2);}
88static int local_islessequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessequal(a1,a2);}
89static int local_islessgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessgreater(a1,a2);}
90static int local_isnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isnormal(a1);}
91#ifdef FP_SUBNORMAL
92static int local_issubnormal __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_SUBNORMAL; }
93#endif
94static int local_isunordered __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isunordered(a1,a2);}
95#ifdef FP_ZERO
96static int local_iszero __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_ZERO; }
97#endif
98static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return signbit(a1);}
99
100/*
101 * first byte is two-digit octal number.  Last digit is number of args
102 * first digit is 0 if return value is double, 1 for integer
103 */
104const struct mathtab shtab_math[] =
105{
106	"\001acos",	(Math_f)acosl,
107	"\001acosh",	(Math_f)acoshl,
108	"\001asin",	(Math_f)asinl,
109	"\001asinh",	(Math_f)asinhl,
110	"\001atan",	(Math_f)atanl,
111	"\002atan2",	(Math_f)atan2l,
112	"\001atanh",	(Math_f)atanhl,
113	"\001cbrt",	(Math_f)cbrtl,
114	"\001ceil",	(Math_f)ceill,
115	"\002copysign",	(Math_f)copysignl,
116	"\001cos",	(Math_f)cosl,
117	"\001cosh",	(Math_f)coshl,
118	"\001erf",	(Math_f)erfl,
119	"\001erfc",	(Math_f)erfcl,
120	"\001exp",	(Math_f)expl,
121	"\001exp2",	(Math_f)exp2l,
122	"\001expm1",	(Math_f)expm1l,
123	"\001fabs",	(Math_f)fabsl,
124	"\001abs",	(Math_f)fabsl,
125	"\002fdim",	(Math_f)fdiml,
126	"\001finite",	(Math_f)local_finite,
127	"\001floor",	(Math_f)floorl,
128	"\001int",	(Math_f)floorl,
129	"\003fma",	(Math_f)fmal,
130	"\002fmax",	(Math_f)fmaxl,
131	"\002fmin",	(Math_f)fminl,
132	"\002fmod",	(Math_f)fmodl,
133	"\011fpclassify",	(Math_f)local_fpclassify,
134	"\002hypot",	(Math_f)hypotl,
135	"\011ilogb",	(Math_f)ilogbl,
136	"\011isfinite",	(Math_f)local_isfinite,
137	"\012isgreater",	(Math_f)local_isgreater,
138	"\012isgreaterequal",	(Math_f)local_isgreaterequal,
139	"\011isinf",	(Math_f)local_isinf,
140	"\012isless",	(Math_f)local_isless,
141	"\012islessequal",	(Math_f)local_islessequal,
142	"\012islessgreater",	(Math_f)local_islessgreater,
143	"\011isnan",	(Math_f)isnanl,
144	"\011isnormal",	(Math_f)local_isnormal,
145#ifdef FP_SUBNORMAL
146	"\011issubnormal",	(Math_f)local_issubnormal,
147#endif
148	"\012isunordered",	(Math_f)local_isunordered,
149#ifdef FP_ZERO
150	"\011iszero",	(Math_f)local_iszero,
151#endif
152	"\001j0",	(Math_f)j0l,
153	"\001j1",	(Math_f)j1l,
154	"\002jn",	(Math_f)jnl,
155	"\001lgamma",	(Math_f)lgammal,
156	"\001log",	(Math_f)logl,
157	"\001log10",	(Math_f)log10l,
158	"\001log1p",	(Math_f)log1pl,
159	"\001log2",	(Math_f)log2l,
160	"\001logb",	(Math_f)logbl,
161	"\001nearbyint",	(Math_f)nearbyintl,
162	"\002nextafter",	(Math_f)nextafterl,
163	"\002nexttoward",	(Math_f)nexttowardl,
164	"\002pow",	(Math_f)powl,
165	"\002remainder",	(Math_f)remainderl,
166	"\001rint",	(Math_f)rintl,
167	"\001round",	(Math_f)roundl,
168	"\002scalb",	(Math_f)scalbl,
169	"\002scalbn",	(Math_f)scalbnl,
170	"\011signbit",	(Math_f)local_signbit,
171	"\001sin",	(Math_f)sinl,
172	"\001sinh",	(Math_f)sinhl,
173	"\001sqrt",	(Math_f)sqrtl,
174	"\001tan",	(Math_f)tanl,
175	"\001tanh",	(Math_f)tanhl,
176	"\001tgamma",	(Math_f)tgammal,
177	"\001trunc",	(Math_f)truncl,
178	"\001y0",	(Math_f)y0l,
179	"\001y1",	(Math_f)y1l,
180	"\002yn",	(Math_f)ynl,
181	"",		(Math_f)0
182};
183#endif
184