From octave-sources-request at bevo dot che dot wisc dot edu Sun Dec 17 10:03:57 2000 Subject: special function e_1 ( exponential function ) From: karas To: octave-sources at bevo dot che dot wisc dot edu Date: 17 Dec 2000 17:07:43 -0100 file : e1.m -- ## Copyright (C) 2000, Wojciech Kara‚¶ ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## usage: e1(x) ## ## Computes the exponential function e_1(x) ( see M.Abramowitz, I.Stegun, ## Dover Publications,Inc., 1972, &&5.1.53,51.55, p.231 ) ## Precision 0<=x<=1 => 2e-7 ## 1<=x<=INF => 2e-8 ## Author: WK ## Created: 17 December 2000 function ret = e1(x) if ( x <= 1.0 ) ret = -log(x)-.57721566+x*(.99999193+x*(-.24991055+x*(.05519968+x*(-.00976004+x*.00107857)))) else nom = .2677737343+x*(8.6347608925+x*(18.0590169730+x*(8.5733287401+x))) den = 3.9584969228+x*(21.0996530827+x*(25.6329561486+x*(9.5733223454+x))) ret = exp(-x)/x ret = ret*(nom/den) endif endfunction W.Karas mailto:karas at uci dot agh dot edu dot pl http://gollum.uci.agh.edu.pl ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------