1 /* @(#)s_scalbn.c 5.1 93/09/24 */
2 /*
3  * ====================================================
4  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5  *
6  * Developed at SunPro, a Sun Microsystems, Inc. business.
7  * Permission to use, copy, modify, and distribute this
8  * software is freely granted, provided that this notice
9  * is preserved.
10  * ====================================================
11  */
12 
13 /*
14  * scalbn (double x, int n)
15  * scalbn(x,n) returns x* 2**n  computed by  exponent
16  * manipulation rather than by actually performing an
17  * exponentiation or a multiplication.
18  */
19 
20 #include <float.h>
21 #include <math.h>
22 
23 double
24 scalbn (double x, int n)
25 {
26 	return ldexp(x, n);
27 }
28 
29 #if	LDBL_MANT_DIG == DBL_MANT_DIG
30 __strong_alias(scalbnl, scalbn);
31 #endif	/* LDBL_MANT_DIG == DBL_MANT_DIG */
32