1 /* w_scalbf.c -- float version of w_scalb.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
13 * ====================================================
17 static char rcsid[] = "$FreeBSD: src/lib/msun/src/w_scalbf.c,v 1.5 1999/08/28 00:07:08 peter Exp $";
21 * wrapper scalbf(float x, float fn) is provide for
22 * passing various standard test suite. One
23 * should use scalbn() instead.
27 #include "math_private.h"
33 float scalbf(float x, int fn) /* wrapper scalbf */
35 float scalbf(float x, float fn) /* wrapper scalbf */
38 float scalbf(x,fn) /* wrapper scalbf */
47 return __ieee754_scalbf(x,fn);
50 z = __ieee754_scalbf(x,fn);
51 if(_LIB_VERSION == _IEEE_) return z;
52 if(!(finitef(z)||isnanf(z))&&finitef(x)) {
54 return (float)__kernel_standard((double)x,(double)fn,132);
56 if(z==(float)0.0&&z!=x) {
57 /* scalbf underflow */
58 return (float)__kernel_standard((double)x,(double)fn,133);
61 if(!finitef(fn)) errno = ERANGE;