help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] function gsl_sf_exprel_e


From: Brian Gough
Subject: Re: [Help-gsl] function gsl_sf_exprel_e
Date: Sat, 13 Dec 2003 09:52:52 +0000

Daniel Rohe writes:
 > The gsl documentation says the following:
 > Function:
 > int gsl_sf_exprel_e (double x, gsl_sf_result * result) These
 > routines compute the quantity (\exp(x)-1)/x using an algorithm that
 > is accurate for small x.  For small x the algorithm is based on the
 > expansion (\exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) +
 > 
 > My question is: when I use this function, shall I dustinguish
 > between small and non-small values of x myself, or does the
 > function handle this internally, i.e. does it call the usual exp()
 > function if x is larger than a certain value?

The file specfunc/exp.c contains the function gsl_sf_exprel_e() which
does the calculation --- look there for the definitive reference.  It
works for all x and calls exp(x) directly when x is not near zero.

-- 
Brian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]