The TELEMAC-MASCARET system  trunk
bief_erf.f
Go to the documentation of this file.
1 ! **********************************
2  DOUBLE PRECISION FUNCTION bief_erf
3 ! **********************************
4 !
5  &(x)
6 !
7 !***********************************************************************
8 ! BIEF V6P3 07/03/2013
9 !***********************************************************************
10 !
11 !brief Function erf (until all compilers have it).
12 !+ From 'Numerical Recipes' Chapter 6, and Tideway model.
13 !
14 !history D J Evans-Roberts (HRW)
15 !+ 23/11/1993
16 !+ V6P3
17 !+ First version sent by Michiel Knaapen (HRW) on 07/03/2013.
18 !
19 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 !| X |-->| OPERAND
21 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 !
23 ! USE BIEF
24 !
26  IMPLICIT NONE
27 !
28 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
29 !
30  DOUBLE PRECISION, INTENT(IN) :: X
31 !
32 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
33 !
34  DOUBLE PRECISION BIEF_GAMMP
35  EXTERNAL bief_gammp
36 !
37 !-----------------------------------------------------------------------
38 !
39  IF(x.LT.0.d0) THEN
40  bief_erf = -bief_gammp(0.5d0,x**2)
41  ELSE
42  bief_erf = bief_gammp(0.5d0,x**2)
43  ENDIF
44 !
45 !-----------------------------------------------------------------------
46 !
47  RETURN
48  END
double precision function bief_erf(X)
Definition: bief_erf.f:7