xref: /illumos-gate/usr/src/cmd/ast/libshell/sparcv9/FEATURE/math (revision 689b9301078f0c35c7f198fcee8032a0d30eff3a)
1
2/* : : generated by proto : : */
3/* : : generated from contrib/ast/src/cmd/ksh93/features/math.sh by iffe version 2012-07-17 : : */
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
66
67/* : : generated by cmd/ast/tools/iffe from contrib/ast/src/cmd/ksh93/data/math.tab : : */
68
69typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
70
71#include <math.h>
72#include <ieeefp.h>
73
74static Sfdouble_t local_finite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return finite(a1);}
75static int local_fpclassify __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclassify(a1);}
76static int local_fpclass __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclass(a1);}
77static int local_isfinite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isfinite(a1);}
78static int local_isgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreater(a1,a2);}
79static int local_isgreaterequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreaterequal(a1,a2);}
80static int local_isinf __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isinf(a1);}
81static int local_isless __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isless(a1,a2);}
82static int local_islessequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessequal(a1,a2);}
83static int local_islessgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessgreater(a1,a2);}
84static int local_isnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isnormal(a1);}
85static int local_issubnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_SUBNORMAL; }
86static int local_isunordered __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isunordered(a1,a2);}
87static int local_iszero __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_ZERO; }
88static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return signbit(a1);}
89
90/*
91 * first byte is two-digit octal number.  Last digit is number of args
92 * first digit is 0 if return value is double, 1 for integer
93 */
94const struct mathtab shtab_math[] =
95{
96	"\001acos",	(Math_f)(uintptr_t)acosl,
97	"\001acosh",	(Math_f)(uintptr_t)acoshl,
98	"\001asin",	(Math_f)(uintptr_t)asinl,
99	"\001asinh",	(Math_f)(uintptr_t)asinhl,
100	"\001atan",	(Math_f)(uintptr_t)atanl,
101	"\002atan2",	(Math_f)(uintptr_t)atan2l,
102	"\001atanh",	(Math_f)(uintptr_t)atanhl,
103	"\001cbrt",	(Math_f)(uintptr_t)cbrtl,
104	"\001ceil",	(Math_f)(uintptr_t)ceill,
105	"\002copysign",	(Math_f)(uintptr_t)copysignl,
106	"\001cos",	(Math_f)(uintptr_t)cosl,
107	"\001cosh",	(Math_f)(uintptr_t)coshl,
108	"\001erf",	(Math_f)(uintptr_t)erfl,
109	"\001erfc",	(Math_f)(uintptr_t)erfcl,
110	"\001exp",	(Math_f)(uintptr_t)expl,
111	"\001exp2",	(Math_f)(uintptr_t)exp2l,
112	"\001expm1",	(Math_f)(uintptr_t)expm1l,
113	"\001fabs",	(Math_f)(uintptr_t)fabsl,
114	"\001abs",	(Math_f)(uintptr_t)fabsl,
115	"\002fdim",	(Math_f)(uintptr_t)fdiml,
116	"\001finite",	(Math_f)(uintptr_t)local_finite,
117	"\001floor",	(Math_f)(uintptr_t)floorl,
118	"\001int",	(Math_f)(uintptr_t)floorl,
119	"\003fma",	(Math_f)(uintptr_t)fmal,
120	"\002fmax",	(Math_f)(uintptr_t)fmaxl,
121	"\002fmin",	(Math_f)(uintptr_t)fminl,
122	"\002fmod",	(Math_f)(uintptr_t)fmodl,
123	"\011fpclassify",	(Math_f)(uintptr_t)local_fpclassify,
124	"\011fpclass",	(Math_f)(uintptr_t)local_fpclass,
125	"\002hypot",	(Math_f)(uintptr_t)hypotl,
126	"\011ilogb",	(Math_f)(uintptr_t)ilogbl,
127	"\011isfinite",	(Math_f)(uintptr_t)local_isfinite,
128	"\012isgreater",	(Math_f)(uintptr_t)local_isgreater,
129	"\012isgreaterequal",	(Math_f)(uintptr_t)local_isgreaterequal,
130	"\011isinf",	(Math_f)(uintptr_t)local_isinf,
131	"\012isless",	(Math_f)(uintptr_t)local_isless,
132	"\012islessequal",	(Math_f)(uintptr_t)local_islessequal,
133	"\012islessgreater",	(Math_f)(uintptr_t)local_islessgreater,
134	"\011isnan",	(Math_f)(uintptr_t)isnanl,
135	"\011isnormal",	(Math_f)(uintptr_t)local_isnormal,
136	"\011issubnormal",	(Math_f)(uintptr_t)local_issubnormal,
137	"\012isunordered",	(Math_f)(uintptr_t)local_isunordered,
138	"\011iszero",	(Math_f)(uintptr_t)local_iszero,
139	"\001j0",	(Math_f)(uintptr_t)j0l,
140	"\001j1",	(Math_f)(uintptr_t)j1l,
141	"\002jn",	(Math_f)(uintptr_t)jnl,
142	"\042ldexp",	(Math_f)(uintptr_t)ldexpl,
143	"\001lgamma",	(Math_f)(uintptr_t)lgammal,
144	"\001log",	(Math_f)(uintptr_t)logl,
145	"\001log10",	(Math_f)(uintptr_t)log10l,
146	"\001log1p",	(Math_f)(uintptr_t)log1pl,
147	"\001log2",	(Math_f)(uintptr_t)log2l,
148	"\001logb",	(Math_f)(uintptr_t)logbl,
149	"\001nearbyint",	(Math_f)(uintptr_t)nearbyintl,
150	"\002nextafter",	(Math_f)(uintptr_t)nextafterl,
151	"\002nexttoward",	(Math_f)(uintptr_t)nexttowardl,
152	"\002pow",	(Math_f)(uintptr_t)powl,
153	"\002remainder",	(Math_f)(uintptr_t)remainderl,
154	"\001rint",	(Math_f)(uintptr_t)rintl,
155	"\001round",	(Math_f)(uintptr_t)roundl,
156	"\002scalb",	(Math_f)(uintptr_t)scalbl,
157	"\002scalbn",	(Math_f)(uintptr_t)scalbnl,
158	"\011signbit",	(Math_f)(uintptr_t)local_signbit,
159	"\001sin",	(Math_f)(uintptr_t)sinl,
160	"\001sinh",	(Math_f)(uintptr_t)sinhl,
161	"\001sqrt",	(Math_f)(uintptr_t)sqrtl,
162	"\001tan",	(Math_f)(uintptr_t)tanl,
163	"\001tanh",	(Math_f)(uintptr_t)tanhl,
164	"\001tgamma",	(Math_f)(uintptr_t)tgammal,
165	"\001trunc",	(Math_f)(uintptr_t)truncl,
166	"\001y0",	(Math_f)(uintptr_t)y0l,
167	"\001y1",	(Math_f)(uintptr_t)y1l,
168	"\002yn",	(Math_f)(uintptr_t)ynl,
169	"",		(Math_f)0
170};
171#endif
172