BUGSrad
 All Classes Files Functions Variables
newexp.f90
Go to the documentation of this file.
1 
2 
3 ! CVS: $Id: newexp.F90,v 1.1 2003/11/11 21:55:13 norm Exp $
4 ! CVS: $Name: $
5 
6 module newexp
7  use kinds
8  contains
9 
10  function exp(x) result(val)
11  !Fast replacement for standard exp() function
12  implicit none
13  real (kind = dbl_kind), intent(in) :: x
14  real (kind=dbl_kind):: &
15  y1 , y2 , y4 , val
16 
17  y1 = 1._dbl_kind - x*(0.2507213_dbl_kind - (x*(0.0292732_dbl_kind - x*0.0038278_dbl_kind)))
18  y2 = y1*y1
19  y4 = y2*y2
20  val = 1._dbl_kind/y4
21  return
22  end function exp
23 
24 end module newexp