1*181254a7Smrg /* @(#)s_ldexp.c 5.1 93/09/24 */
2*181254a7Smrg /*
3*181254a7Smrg * ====================================================
4*181254a7Smrg * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5*181254a7Smrg *
6*181254a7Smrg * Developed at SunPro, a Sun Microsystems, Inc. business.
7*181254a7Smrg * Permission to use, copy, modify, and distribute this
8*181254a7Smrg * software is freely granted, provided that this notice
9*181254a7Smrg * is preserved.
10*181254a7Smrg * ====================================================
11*181254a7Smrg */
12*181254a7Smrg
13*181254a7Smrg #if defined(LIBM_SCCS) && !defined(lint)
14*181254a7Smrg static char rcsid[] = "NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp ";
15*181254a7Smrg #endif
16*181254a7Smrg
17*181254a7Smrg #include "quadmath-imp.h"
18*181254a7Smrg
19*181254a7Smrg __float128
ldexpq(__float128 value,int exp)20*181254a7Smrg ldexpq (__float128 value, int exp)
21*181254a7Smrg {
22*181254a7Smrg if(!finiteq(value)||value==0) return value + value;
23*181254a7Smrg value = scalbnq(value,exp);
24*181254a7Smrg if(!finiteq(value)||value==0) errno = ERANGE;
25*181254a7Smrg return value;
26*181254a7Smrg }
27*181254a7Smrg
28*181254a7Smrg
29*181254a7Smrg
30*181254a7Smrg
31*181254a7Smrg
32*181254a7Smrg /* Note, versioning issues are punted to ldbl-opt in this case. */
33