Back to index

glibc  2.9
s_ldexpl.c
Go to the documentation of this file.
00001 /* s_ldexpl.c -- long double version of s_ldexp.c.
00002  * Conversion to long double by Ulrich Drepper,
00003  * Cygnus Support, drepper@cygnus.com.
00004  */
00005 
00006 /*
00007  * ====================================================
00008  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
00009  *
00010  * Developed at SunPro, a Sun Microsystems, Inc. business.
00011  * Permission to use, copy, modify, and distribute this
00012  * software is freely granted, provided that this notice
00013  * is preserved.
00014  * ====================================================
00015  */
00016 
00017 #if defined(LIBM_SCCS) && !defined(lint)
00018 static char rcsid[] = "$NetBSD: $";
00019 #endif
00020 
00021 #include <math.h>
00022 #include "math_private.h"
00023 #include <errno.h>
00024 
00025 #ifdef __STDC__
00026        long double __ldexpl(long double value, int exp)
00027 #else
00028        long double __ldexpl(value, exp)
00029        long double value; int exp;
00030 #endif
00031 {
00032        if(!__finitel(value)||value==0.0) return value;
00033        value = __scalbnl(value,exp);
00034        if(!__finitel(value)||value==0.0) __set_errno (ERANGE);
00035        return value;
00036 }
00037 weak_alias (__ldexpl, ldexpl)