Don't macro-expand failed assertion expression [BZ #18604]
[glibc.git] / math / s_ldexpl.c
blobf34c805bdac23ad711a3fa4df81e2717a3342e08
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 */
6 /*
7 * ====================================================
8 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
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 * ====================================================
17 #if defined(LIBM_SCCS) && !defined(lint)
18 static char rcsid[] = "$NetBSD: $";
19 #endif
21 #include <math.h>
22 #include <math_private.h>
23 #include <errno.h>
25 long double __ldexpl(long double value, int exp)
27 if(!isfinite(value)||value==0.0) return value;
28 value = __scalbnl(value,exp);
29 if(!isfinite(value)||value==0.0) __set_errno (ERANGE);
30 return value;
32 weak_alias (__ldexpl, ldexpl)
33 weak_alias (__ldexpl, scalbnl)