OSDN Git Service

config/
[pf3gnuchains/gcc-fork.git] / libquadmath / math / ldexpq.c
1 /* s_ldexpl.c -- long double version of s_ldexp.c.
2  * Conversion to long double by Ulrich Drepper,
3  * Cygnus Support, drepper@cygnus.com.
4  */
5
6 /*
7  * ====================================================
8  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
9  *
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
13  * is preserved.
14  * ====================================================
15  */
16
17 #include "quadmath-imp.h"
18
19 __float128
20 ldexpq (__float128 value, int exp)
21 {
22   if(!finiteq(value)||value==0.0Q) return value;
23   value = scalbnq(value,exp);
24   /* if(!__finitel(value)||value==0.0Q) __set_errno (ERANGE); */
25   return value;
26 }