Back to index

glibc  2.9
w_exp10.c
Go to the documentation of this file.
00001 /* @(#)w_exp10.c
00002  * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>.
00003  */
00004 
00005 /*
00006  * ====================================================
00007  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
00008  *
00009  * Developed at SunPro, a Sun Microsystems, Inc. business.
00010  * Permission to use, copy, modify, and distribute this
00011  * software is freely granted, provided that this notice
00012  * is preserved.
00013  * ====================================================
00014  */
00015 
00016 /*
00017  * wrapper exp10(x)
00018  */
00019 
00020 #include <math.h>
00021 #include "math_private.h"
00022 
00023 #ifdef __STDC__
00024        double __exp10(double x)           /* wrapper exp10 */
00025 #else
00026        double __exp10(x)                  /* wrapper exp10 */
00027        double x;
00028 #endif
00029 {
00030 #ifdef _IEEE_LIBM
00031        return __ieee754_exp10(x);
00032 #else
00033        double z;
00034        z = __ieee754_exp10(x);
00035        if(_LIB_VERSION == _IEEE_) return z;
00036        if(!__finite(z) && __finite(x)) {
00037            /* exp10 overflow (46) if x > 0, underflow (47) if x < 0.  */
00038            return __kernel_standard(x,x,46+!!__signbit(x));
00039        }
00040        return z;
00041 #endif
00042 }
00043 weak_alias (__exp10, exp10)
00044 strong_alias (__exp10, __pow10)
00045 weak_alias (__pow10, pow10)
00046 #ifdef NO_LONG_DOUBLE
00047 strong_alias (__exp10, __exp10l)
00048 weak_alias (__exp10, exp10l)
00049 strong_alias (__exp10l, __pow10l)
00050 weak_alias (__pow10l, pow10l)
00051 #endif