xref: /onnv-gate/usr/src/lib/libbc/inc/include/math.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright (c) 1988 by Sun Microsystems, Inc.
24*0Sstevel@tonic-gate  */
25*0Sstevel@tonic-gate 
26*0Sstevel@tonic-gate /*      Copyright (c) 1984 AT&T */
27*0Sstevel@tonic-gate /*        All Rights Reserved   */
28*0Sstevel@tonic-gate 
29*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*0Sstevel@tonic-gate 
31*0Sstevel@tonic-gate 
32*0Sstevel@tonic-gate /*
33*0Sstevel@tonic-gate  * Math library definitions for all the public functions implemented in libm.a.
34*0Sstevel@tonic-gate  */
35*0Sstevel@tonic-gate 
36*0Sstevel@tonic-gate #ifndef	__math_h
37*0Sstevel@tonic-gate #define	__math_h
38*0Sstevel@tonic-gate 
39*0Sstevel@tonic-gate /*
40*0Sstevel@tonic-gate  * Posix (actually ansi C) section
41*0Sstevel@tonic-gate  */
42*0Sstevel@tonic-gate #define	HUGE_VAL	(__infinity())	/* Produces IEEE Infinity. */
43*0Sstevel@tonic-gate 
44*0Sstevel@tonic-gate 
45*0Sstevel@tonic-gate extern double	__infinity();
46*0Sstevel@tonic-gate extern double	acos(/* double x */);
47*0Sstevel@tonic-gate extern double	asin(/* double x */);
48*0Sstevel@tonic-gate extern double	atan(/* double x */);
49*0Sstevel@tonic-gate extern double	atan2(/* double y, double x */);
50*0Sstevel@tonic-gate extern double	ceil(/* double x */);
51*0Sstevel@tonic-gate extern double	cos(/* double x */);
52*0Sstevel@tonic-gate extern double	cosh(/* double x */);
53*0Sstevel@tonic-gate extern double	exp(/* double x */);
54*0Sstevel@tonic-gate extern double	fabs(/* double x */);
55*0Sstevel@tonic-gate extern double	floor(/* double x */);
56*0Sstevel@tonic-gate extern double	fmod(/* double x, double y */);
57*0Sstevel@tonic-gate extern double	frexp(/* double value, int *exp */);
58*0Sstevel@tonic-gate extern double	ldexp(/* double value, int exp */);
59*0Sstevel@tonic-gate extern double	log(/* double x */);
60*0Sstevel@tonic-gate extern double	log10(/* double x */);
61*0Sstevel@tonic-gate extern double	modf(/* double value, double *iptr */);
62*0Sstevel@tonic-gate extern double	pow(/* double x, double y */);
63*0Sstevel@tonic-gate extern double	sin(/* double x */);
64*0Sstevel@tonic-gate extern double	sinh(/* double x */);
65*0Sstevel@tonic-gate extern double	sqrt(/* double x */);
66*0Sstevel@tonic-gate extern double	tan(/* double x */);
67*0Sstevel@tonic-gate extern double	tanh(/* double x */);
68*0Sstevel@tonic-gate 
69*0Sstevel@tonic-gate #ifndef	_POSIX_SOURCE			/* the rest of the file is !POSIX */
70*0Sstevel@tonic-gate #include <floatingpoint.h>		/* Contains definitions for types and
71*0Sstevel@tonic-gate 					 * functions implemented in libc.a.
72*0Sstevel@tonic-gate 					 */
73*0Sstevel@tonic-gate extern double	acosh();
74*0Sstevel@tonic-gate extern double	asinh();
75*0Sstevel@tonic-gate extern double	atanh();
76*0Sstevel@tonic-gate extern double	cbrt();
77*0Sstevel@tonic-gate extern double	copysign();
78*0Sstevel@tonic-gate extern double	erf();
79*0Sstevel@tonic-gate extern double	erfc();
80*0Sstevel@tonic-gate extern double	expm1();
81*0Sstevel@tonic-gate extern int	finite();
82*0Sstevel@tonic-gate extern double	hypot();
83*0Sstevel@tonic-gate extern double	j0();
84*0Sstevel@tonic-gate extern double	j1();
85*0Sstevel@tonic-gate extern double	jn();
86*0Sstevel@tonic-gate extern double	lgamma();
87*0Sstevel@tonic-gate extern double	log1p();
88*0Sstevel@tonic-gate extern double	rint();
89*0Sstevel@tonic-gate extern double	y0();
90*0Sstevel@tonic-gate extern double	y1();
91*0Sstevel@tonic-gate extern double	yn();
92*0Sstevel@tonic-gate 
93*0Sstevel@tonic-gate /*
94*0Sstevel@tonic-gate  * Sun definitions.
95*0Sstevel@tonic-gate  */
96*0Sstevel@tonic-gate 
97*0Sstevel@tonic-gate /*
98*0Sstevel@tonic-gate  * Implemented precisions for trigonometric argument reduction.
99*0Sstevel@tonic-gate  */
100*0Sstevel@tonic-gate enum fp_pi_type {
101*0Sstevel@tonic-gate 	fp_pi_infinite	= 0,	/* Infinite-precision approximation to pi. */
102*0Sstevel@tonic-gate 	fp_pi_66	= 1,	/* 66-bit approximation to pi. */
103*0Sstevel@tonic-gate 	fp_pi_53	= 2	/* 53-bit approximation to pi. */
104*0Sstevel@tonic-gate };
105*0Sstevel@tonic-gate 
106*0Sstevel@tonic-gate /*
107*0Sstevel@tonic-gate  * Pi precision to use for trigonometric argument reduction.
108*0Sstevel@tonic-gate  */
109*0Sstevel@tonic-gate extern enum	fp_pi_type fp_pi;
110*0Sstevel@tonic-gate 
111*0Sstevel@tonic-gate /*
112*0Sstevel@tonic-gate  * Functions callable from C, intended to support IEEE arithmetic.
113*0Sstevel@tonic-gate  */
114*0Sstevel@tonic-gate extern enum	fp_class_type fp_class();
115*0Sstevel@tonic-gate extern int	ieee_flags();
116*0Sstevel@tonic-gate extern int	ieee_handler();
117*0Sstevel@tonic-gate extern void	ieee_retrospective();
118*0Sstevel@tonic-gate extern int	ilogb();
119*0Sstevel@tonic-gate extern double	infinity();
120*0Sstevel@tonic-gate extern int	irint();
121*0Sstevel@tonic-gate extern int	isinf();
122*0Sstevel@tonic-gate extern int	isnan();
123*0Sstevel@tonic-gate extern int	isnormal();
124*0Sstevel@tonic-gate extern int	issubnormal();
125*0Sstevel@tonic-gate extern int	iszero();
126*0Sstevel@tonic-gate extern double	logb();
127*0Sstevel@tonic-gate extern double	max_normal();
128*0Sstevel@tonic-gate extern double	max_subnormal();
129*0Sstevel@tonic-gate extern double	min_normal();
130*0Sstevel@tonic-gate extern double	min_subnormal();
131*0Sstevel@tonic-gate extern double	nextafter();
132*0Sstevel@tonic-gate extern void	nonstandard_arithmetic();
133*0Sstevel@tonic-gate extern double	quiet_nan();
134*0Sstevel@tonic-gate extern double	remainder();
135*0Sstevel@tonic-gate extern double	scalb();
136*0Sstevel@tonic-gate extern double	scalbn();
137*0Sstevel@tonic-gate extern double	signaling_nan();
138*0Sstevel@tonic-gate extern int	signbit();
139*0Sstevel@tonic-gate extern double	significand();
140*0Sstevel@tonic-gate extern void	standard_arithmetic();
141*0Sstevel@tonic-gate 
142*0Sstevel@tonic-gate /*
143*0Sstevel@tonic-gate  * Other functions for C programmers.
144*0Sstevel@tonic-gate  */
145*0Sstevel@tonic-gate extern double	acospi();
146*0Sstevel@tonic-gate extern double	aint();
147*0Sstevel@tonic-gate extern double	anint();
148*0Sstevel@tonic-gate extern double	annuity();
149*0Sstevel@tonic-gate extern double	asinpi();
150*0Sstevel@tonic-gate extern double	atan2pi();
151*0Sstevel@tonic-gate extern double	atanpi();
152*0Sstevel@tonic-gate extern double	compound();
153*0Sstevel@tonic-gate extern double	cospi();
154*0Sstevel@tonic-gate extern double	exp10();
155*0Sstevel@tonic-gate extern double	exp2();
156*0Sstevel@tonic-gate extern double	log2();
157*0Sstevel@tonic-gate extern int	nint();
158*0Sstevel@tonic-gate extern void	sincos();
159*0Sstevel@tonic-gate extern void	sincospi();
160*0Sstevel@tonic-gate extern double	sinpi();
161*0Sstevel@tonic-gate extern double	tanpi();
162*0Sstevel@tonic-gate extern int	matherr();
163*0Sstevel@tonic-gate 
164*0Sstevel@tonic-gate 
165*0Sstevel@tonic-gate /*
166*0Sstevel@tonic-gate  *	Single-precision functions callable from Fortran, Pascal, Modula-2, etc,
167*0Sstevel@tonic-gate  *	take float* arguments instead of double and
168*0Sstevel@tonic-gate  *	return FLOATFUNCTIONTYPE results instead of double.
169*0Sstevel@tonic-gate  *	RETURNFLOAT is used to return a float function value without conversion
170*0Sstevel@tonic-gate  *	to double.
171*0Sstevel@tonic-gate  *	ASSIGNFLOAT is used to get the float value out of a FLOATFUNCTIONTYPE
172*0Sstevel@tonic-gate  *	result.
173*0Sstevel@tonic-gate  *	We don't want you to have to think about -fsingle2.
174*0Sstevel@tonic-gate  *
175*0Sstevel@tonic-gate  *	Some internal library functions pass float parameters as 32-bit values,
176*0Sstevel@tonic-gate  *	disguised as FLOATPARAMETER.  FLOATPARAMETERVALUE(x) extracts the
177*0Sstevel@tonic-gate  *	float value from the FLOATPARAMETER.
178*0Sstevel@tonic-gate  */
179*0Sstevel@tonic-gate 
180*0Sstevel@tonic-gate /*	mc68000 returns float results in d0, same as int	*/
181*0Sstevel@tonic-gate 
182*0Sstevel@tonic-gate #ifdef	mc68000
183*0Sstevel@tonic-gate #define	FLOATFUNCTIONTYPE	int
184*0Sstevel@tonic-gate #define	RETURNFLOAT(x) 		return (*(int *)(&(x)))
185*0Sstevel@tonic-gate #define	ASSIGNFLOAT(x,y)	*(int *)(&x) = y
186*0Sstevel@tonic-gate #endif
187*0Sstevel@tonic-gate 
188*0Sstevel@tonic-gate /*	sparc returns float results in %f0, same as top half of double	*/
189*0Sstevel@tonic-gate 
190*0Sstevel@tonic-gate #ifdef	sparc
191*0Sstevel@tonic-gate #define	FLOATFUNCTIONTYPE	double
192*0Sstevel@tonic-gate #define	RETURNFLOAT(x) 		{ union {double _d; float _f } _kluge; _kluge._f = (x); return _kluge._d; }
193*0Sstevel@tonic-gate #define	ASSIGNFLOAT(x,y)	{ union {double _d; float _f } _kluge; _kluge._d = (y); x = _kluge._f; }
194*0Sstevel@tonic-gate #endif
195*0Sstevel@tonic-gate 
196*0Sstevel@tonic-gate /*	i386 returns float results on stack as extendeds, same as double */
197*0Sstevel@tonic-gate 
198*0Sstevel@tonic-gate #ifdef	i386
199*0Sstevel@tonic-gate #define	FLOATFUNCTIONTYPE	float
200*0Sstevel@tonic-gate #define	RETURNFLOAT(x) 		return (x)
201*0Sstevel@tonic-gate #define	ASSIGNFLOAT(x,y)	x = y
202*0Sstevel@tonic-gate #endif
203*0Sstevel@tonic-gate 
204*0Sstevel@tonic-gate /* So far everybody passes float parameters as 32 bits on stack, same as int. */
205*0Sstevel@tonic-gate 
206*0Sstevel@tonic-gate #define	FLOATPARAMETER		int
207*0Sstevel@tonic-gate #define	FLOATPARAMETERVALUE(x)	(*(float *)(&(x)))
208*0Sstevel@tonic-gate 
209*0Sstevel@tonic-gate extern int		 ir_finite_();
210*0Sstevel@tonic-gate extern enum fp_class_type ir_fp_class_();
211*0Sstevel@tonic-gate extern int		 ir_ilogb_();
212*0Sstevel@tonic-gate extern int		 ir_irint_();
213*0Sstevel@tonic-gate extern int		 ir_isinf_();
214*0Sstevel@tonic-gate extern int		 ir_isnan_();
215*0Sstevel@tonic-gate extern int		 ir_isnormal_();
216*0Sstevel@tonic-gate extern int		 ir_issubnormal_();
217*0Sstevel@tonic-gate extern int		 ir_iszero_();
218*0Sstevel@tonic-gate extern int		 ir_nint_();
219*0Sstevel@tonic-gate extern int		 ir_signbit_();
220*0Sstevel@tonic-gate extern void		 r_sincos_();
221*0Sstevel@tonic-gate extern void		 r_sincospi_();
222*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_acos_();
223*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_acosh_();
224*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_acospi_();
225*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_aint_();
226*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_anint_();
227*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_annuity_();
228*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_asin_();
229*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_asinh_();
230*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_asinpi_();
231*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_atan2_();
232*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_atan2pi_();
233*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_atan_();
234*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_atanh_();
235*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_atanpi_();
236*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_cbrt_();
237*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_ceil_();
238*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_compound_();
239*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_copysign_();
240*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_cos_();
241*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_cosh_();
242*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_cospi_();
243*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_erf_();
244*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_erfc_();
245*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_exp10_();
246*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_exp2_();
247*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_exp_();
248*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_expm1_();
249*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_fabs_();
250*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_floor_();
251*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_fmod_();
252*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_hypot_();
253*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_infinity_();
254*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_j0_();
255*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_j1_();
256*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_jn_();
257*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_lgamma_();
258*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_log10_();
259*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_log1p_();
260*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_log2_();
261*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_log_();
262*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_logb_();
263*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_max_normal_();
264*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_max_subnormal_();
265*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_min_normal_();
266*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_min_subnormal_();
267*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_nextafter_();
268*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_pow_();
269*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_quiet_nan_();
270*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_remainder_();
271*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_rint_();
272*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_scalb_();
273*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_scalbn_();
274*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_signaling_nan_();
275*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_significand_();
276*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_sin_();
277*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_sinh_();
278*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_sinpi_();
279*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_sqrt_();
280*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_tan_();
281*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_tanh_();
282*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_tanpi_();
283*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_y0_();
284*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_y1_();
285*0Sstevel@tonic-gate extern FLOATFUNCTIONTYPE r_yn_();
286*0Sstevel@tonic-gate 
287*0Sstevel@tonic-gate /* 	Constants, variables, and functions from System V */
288*0Sstevel@tonic-gate 
289*0Sstevel@tonic-gate #define	_ABS(x) ((x) < 0 ? -(x) : (x))
290*0Sstevel@tonic-gate 
291*0Sstevel@tonic-gate #define	HUGE		(infinity())	/* For historical compatibility. */
292*0Sstevel@tonic-gate 
293*0Sstevel@tonic-gate #define	DOMAIN		1
294*0Sstevel@tonic-gate #define	SING		2
295*0Sstevel@tonic-gate #define	OVERFLOW	3
296*0Sstevel@tonic-gate #define	UNDERFLOW	4
297*0Sstevel@tonic-gate #define	TLOSS		5
298*0Sstevel@tonic-gate #define	PLOSS		6
299*0Sstevel@tonic-gate 
300*0Sstevel@tonic-gate struct exception {
301*0Sstevel@tonic-gate 	int type;
302*0Sstevel@tonic-gate 	char *name;
303*0Sstevel@tonic-gate 	double arg1;
304*0Sstevel@tonic-gate 	double arg2;
305*0Sstevel@tonic-gate 	double retval;
306*0Sstevel@tonic-gate };
307*0Sstevel@tonic-gate 
308*0Sstevel@tonic-gate /*
309*0Sstevel@tonic-gate  * First three have to be defined exactly as in values.h including spacing!
310*0Sstevel@tonic-gate  */
311*0Sstevel@tonic-gate #define	M_LN2	0.69314718055994530942
312*0Sstevel@tonic-gate #define	M_PI	3.14159265358979323846
313*0Sstevel@tonic-gate #define	M_SQRT2	1.41421356237309504880
314*0Sstevel@tonic-gate 
315*0Sstevel@tonic-gate #define	M_E		2.7182818284590452354
316*0Sstevel@tonic-gate #define	M_LOG2E		1.4426950408889634074
317*0Sstevel@tonic-gate #define	M_LOG10E	0.43429448190325182765
318*0Sstevel@tonic-gate #define	M_LN10		2.30258509299404568402
319*0Sstevel@tonic-gate #define	M_PI_2		1.57079632679489661923
320*0Sstevel@tonic-gate #define	M_PI_4		0.78539816339744830962
321*0Sstevel@tonic-gate #define	M_1_PI		0.31830988618379067154
322*0Sstevel@tonic-gate #define	M_2_PI		0.63661977236758134308
323*0Sstevel@tonic-gate #define	M_2_SQRTPI	1.12837916709551257390
324*0Sstevel@tonic-gate #define	M_SQRT1_2	0.70710678118654752440
325*0Sstevel@tonic-gate #define	_REDUCE(TYPE, X, XN, C1, C2)	{ \
326*0Sstevel@tonic-gate 	double x1 = (double)(TYPE)X, x2 = X - x1; \
327*0Sstevel@tonic-gate 	X = x1 - (XN) * (C1); X += x2; X -= (XN) * (C2); }
328*0Sstevel@tonic-gate #define	_POLY1(x, c)    ((c)[0] * (x) + (c)[1])
329*0Sstevel@tonic-gate #define	_POLY2(x, c)    (_POLY1((x), (c)) * (x) + (c)[2])
330*0Sstevel@tonic-gate #define	_POLY3(x, c)    (_POLY2((x), (c)) * (x) + (c)[3])
331*0Sstevel@tonic-gate #define	_POLY4(x, c)    (_POLY3((x), (c)) * (x) + (c)[4])
332*0Sstevel@tonic-gate #define	_POLY5(x, c)    (_POLY4((x), (c)) * (x) + (c)[5])
333*0Sstevel@tonic-gate #define	_POLY6(x, c)    (_POLY5((x), (c)) * (x) + (c)[6])
334*0Sstevel@tonic-gate #define	_POLY7(x, c)    (_POLY6((x), (c)) * (x) + (c)[7])
335*0Sstevel@tonic-gate #define	_POLY8(x, c)    (_POLY7((x), (c)) * (x) + (c)[8])
336*0Sstevel@tonic-gate #define	_POLY9(x, c)    (_POLY8((x), (c)) * (x) + (c)[9])
337*0Sstevel@tonic-gate 
338*0Sstevel@tonic-gate extern int	signgam;
339*0Sstevel@tonic-gate /*
340*0Sstevel@tonic-gate  *	Deprecated functions for compatibility with past.
341*0Sstevel@tonic-gate  *	Changes planned for future.
342*0Sstevel@tonic-gate  */
343*0Sstevel@tonic-gate 
344*0Sstevel@tonic-gate extern double cabs();	/* Use double hypot(x,y)
345*0Sstevel@tonic-gate 			 * Traditional cabs usage is confused -
346*0Sstevel@tonic-gate 			 * is its argument two doubles or one struct?
347*0Sstevel@tonic-gate 			 */
348*0Sstevel@tonic-gate extern double drem();	/* Use double remainder(x,y)
349*0Sstevel@tonic-gate 			 * drem will disappear in a future release.
350*0Sstevel@tonic-gate 			 */
351*0Sstevel@tonic-gate extern double gamma();	/* Use double lgamma(x)
352*0Sstevel@tonic-gate 			 * to compute log of gamma function.
353*0Sstevel@tonic-gate 			 * Name gamma is reserved for true gamma function
354*0Sstevel@tonic-gate 			 * to appear in a future release.
355*0Sstevel@tonic-gate 			 */
356*0Sstevel@tonic-gate #endif	/* !_POSIX_SOURCE */
357*0Sstevel@tonic-gate #endif	/* !__math_h */
358