Back to index

glibc  2.9
w_exp10f.c
Go to the documentation of this file.
00001 /* w_exp10f.c -- float version of 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 expf10(x)
00018  */
00019 
00020 #include <math.h>
00021 #include "math_private.h"
00022 
00023 #ifdef __STDC__
00024        float __exp10f(float x)            /* wrapper exp10f */
00025 #else
00026        float __exp10f(x)                  /* wrapper exp10f */
00027        float x;
00028 #endif
00029 {
00030 #ifdef _IEEE_LIBM
00031        return __ieee754_exp10f(x);
00032 #else
00033        float z;
00034        z = __ieee754_exp10f(x);
00035        if(_LIB_VERSION == _IEEE_) return z;
00036        if(!__finitef(z) && __finitef(x)) {
00037            /* exp10f overflow (146) if x > 0, underflow (147) if x < 0.  */
00038            return (float)__kernel_standard((double) x, (double) x,
00039                                        146+!!__signbitf(x));
00040        }
00041        return z;
00042 #endif
00043 }
00044 weak_alias (__exp10f, exp10f)
00045 strong_alias (__exp10f, __pow10f)
00046 weak_alias (__pow10f, pow10f)