1 /* w_scalbl.c -- long double version of w_scalb.c.
2 * Conversion to long double by Ulrich Drepper,
3 * Cygnus Support, drepper@cygnus.com.
7 * ====================================================
8 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
10 * Developed at SunPro, a Sun Microsystems, Inc. business.
11 * Permission to use, copy, modify, and distribute this
12 * software is freely granted, provided that this notice
14 * ====================================================
17 #if defined(LIBM_SCCS) && !defined(lint)
18 static char rcsid[] = "$NetBSD: $";
22 * wrapper scalbl(long double x, long double fn) is provide for
23 * passing various standard test suite. One
24 * should use scalbnl() instead.
28 #include "math_private.h"
34 long double __scalbl(long double x, int fn) /* wrapper scalbl */
36 long double __scalbl(long double x, long double fn)/* wrapper scalbl */
39 long double __scalbl(x,fn) /* wrapper scalbl */
41 long double x; int fn;
48 return __ieee754_scalbl(x,fn);
51 z = __ieee754_scalbl(x,fn);
52 if(_LIB_VERSION != _SVID_) return z;
53 if(!(__finitel(z)||__isnanl(z))&&__finitel(x)) {
54 return __kernel_standard(x,(double)fn,232); /* scalb overflow */
57 return __kernel_standard(x,(double)fn,233); /* scalb underflow */
60 if(!__finitel(fn)) __set_errno (ERANGE);
65 weak_alias (__scalbl, scalbl)