summaryrefslogtreecommitdiff
path: root/libquadmath/math/ldexpq.c
diff options
context:
space:
mode:
Diffstat (limited to 'libquadmath/math/ldexpq.c')
-rw-r--r--libquadmath/math/ldexpq.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/libquadmath/math/ldexpq.c b/libquadmath/math/ldexpq.c
index c18968b03bc..73e63f1a9ce 100644
--- a/libquadmath/math/ldexpq.c
+++ b/libquadmath/math/ldexpq.c
@@ -1,8 +1,4 @@
-/* ldexpq.c -- __float128 version of s_ldexp.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
+/* @(#)s_ldexp.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -14,14 +10,23 @@
* ====================================================
*/
-#include <errno.h>
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $";
+#endif
+
#include "quadmath-imp.h"
__float128
ldexpq (__float128 value, int exp)
{
- if(!finiteq(value)||value==0.0Q) return value;
- value = scalbnq(value,exp);
- if(!finiteq(value)||value==0.0Q) errno = ERANGE;
- return value;
+ if(!finiteq(value)||value==0) return value + value;
+ value = scalbnq(value,exp);
+ if(!finiteq(value)||value==0) errno = ERANGE;
+ return value;
}
+
+
+
+
+
+/* Note, versioning issues are punted to ldbl-opt in this case. */