3 /* @(#)w_pow.c 5.2 93/10/01 */
5 * ====================================================
6 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 * Developed at SunPro, a Sun Microsystems, Inc. business.
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
12 * ====================================================
15 #include <sys/cdefs.h>
16 #if defined(LIBM_SCCS) && !defined(lint)
17 __RCSID("$NetBSD: w_pow.c,v 1.7 2002/05/26 22:02:02 wiz Exp $");
21 * wrapper pow(x,y) return x**y
25 #include "math_private.h"
29 pow(double x
, double y
) /* wrapper pow */
32 return __ieee754_pow(x
,y
);
36 if(_LIB_VERSION
== _IEEE_
|| isnan(y
)) return z
;
39 return __kernel_standard(x
,y
,42); /* pow(NaN,0.0) */
45 return __kernel_standard(x
,y
,20); /* pow(0.0,0.0) */
47 return __kernel_standard(x
,y
,23); /* pow(0.0,negative) */
51 if(finite(x
)&&finite(y
)) {
53 return __kernel_standard(x
,y
,24); /* pow neg**non-int */
55 return __kernel_standard(x
,y
,21); /* pow overflow */
58 if(z
==0.0&&finite(x
)&&finite(y
))
59 return __kernel_standard(x
,y
,22); /* pow underflow */