16 public::
gd,
gdi,
hav,
havh,
ahav,
ahavh,
sech,
sechs,
atanh,
sinoxm,
sinox,&
40 function gd_s(x)
result(y)
43 real(sp),
intent(in ):: x
53 function gd_d(x)
result(y)
55 real(dp),
intent(in ):: x
65 function gdi_s(y)
result(x)
67 real(sp),
intent(in ):: y
77 function gdi_d(y)
result(x)
79 real(dp),
intent(in ):: y
89 function hav_s(t)
result(a)
92 real(sp),
intent(in )::
t 102 function hav_d(t)
result(a)
105 real(dp),
intent(in ):: t
117 function havh_s(t)
result(a)
118 use pietc_s,
only:
o2 120 real(sp),
intent(in )::
t 130 function havh_d(t)
result(a)
133 real(dp),
intent(in ):: t
143 function ahav_s(a)
result(t)
144 use pietc_s,
only:
u2 146 real(sp),
intent(in ):: a
156 function ahav_d(a)
result(t)
159 real(dp),
intent(in ):: a
172 use pietc_s,
only:
u2 174 real(sp),
intent(in ):: a
187 real(dp),
intent(in ):: a
200 real(sp),
intent(IN )::
t 202 real(sp),
parameter :: o7=
u1/7_sp,o9=
u1/9_sp
204 if(abs(
t)>=
u1)stop
'In atanh; no solution' 205 if(abs(
t)>1.e-3_sp)then; a=log((
u1+
t)/(
u1-
t))*
o2 206 else; tt=
t*
t; a=
t*(
u1+tt*(o3+tt*(o5+tt*(o7+tt*o9))))
218 real(dp),
intent(IN ):: t
220 real(dp),
parameter :: o7=
u1/7_dp,o9=
u1/9_dp
222 if(abs(t)>=
u1)stop
'In atanh; no solution' 223 if(abs(t)>1.e-3_dp)then; a=log((
u1+t)/(
u1-t))*
o2 224 else; tt=t*t; a=t*(
u1+tt*(
o3+tt*(
o5+tt*(o7+tt*o9))))
233 function sech_s(x)
result(r)
235 use pietc_s,
only:
u1,
u2 237 real(sp),
intent(in ):: x
250 function sech_d(x)
result(r)
253 real(dp),
intent(in ):: x
268 real(sp),
intent(in ):: x
280 real(dp),
intent(in ):: x
293 real(dp),
intent(in ):: x
299 if(xx > .05_dp)then; r=sin(x)/x-
u1 300 else ; r=-xx*(
u1-xx*(
u1-xx*(
u1-xx*(
u1-xx*(
u1-xx/&
301 156._dp)/110._dp)/72._dp)/42._dp)/20._dp)/6._dp
313 real(dp),
intent(in ):: x
327 real(dp),
intent(in ):: x
333 if(xx > .05_dp)then; r=sinh(x)/x-
u1 334 else; r=xx*(
u1+xx*(
u1+xx*(
u1+xx*(
u1+xx*(
u1+xx/&
335 156._dp)/110._dp)/72._dp)/42._dp)/20._dp)/6._dp
347 real(dp),
intent(in ):: x
integer, parameter sp
Single precision real kind.
real(dp) function sinox_d(x)
Evaluate the symmetric real function sin(x)/x.
This module is for evaluating several useful real-valued functions that are not always available in F...
integer, parameter dp
Double precision real kind.
Standard integer, real, and complex single and double precision kinds.
real(sp) function havh_s(t)
Hyperbolic-haversine for single precision real (for pseudosphere geometry).
real(dp) function gd_d(x)
Gudermannian function (related to Mercator map projections)
real(dp), parameter o5
fifth
real(dp) function sinhox_d(x)
Evaluate the symmetric real function sinh(x)/x.
real(sp) function sech_s(x)
Hyperbolic secant for single precision real.
real(dp), parameter u2
two
real(dp) function havh_d(t)
Hyperbolic-haversine for double precision real (for pseudosphere geometry).
real(sp) function gd_s(x)
Gudermannian function (related to Mercator map projections)
real(dp) function sechs_d(x)
Hyperbolic secant-squared function (logistic distribution).
real(dp) function sinhoxm_d(x)
Evaluate the symmetric real function sinh(x)/x-1.
real(dp) function ahavh_d(a)
Hyperbolic arc-haversine for double precision real.
real(dp) function sech_d(x)
Hyperbolic secant for double precision real.
real(dp) function hav_d(t)
Haversine function for double precision real (for geometry on the sphere).
logical, parameter t
for pain-relief in logical ops
real(dp) function sinoxm_d(x)
Evaluate the symmetric real function sin(x)/x-1, still accurate near x=0.
real(dp), parameter u1
one
real(dp) function atanh_d(t)
Hyperbolic arc-tangent for double precision real.
real(sp) function sechs_s(x)
Hyperbolic secant-squared function (logistic distribution).
real(sp) function ahavh_s(a)
Hyperbolic arc-haversine for single precision real.
Some of the commonly used constants (pi etc) mainly for double-precision subroutines.
real(sp) function hav_s(t)
Haversine function for single precision real (for geometry on the sphere).
real(dp), parameter o3
third
real(dp) function gdi_d(y)
Inverse Gudermannian function for double precision real.
real(sp) function ahav_s(a)
Arc-haversine function for single precision real.
real(dp), parameter o2
half
real(sp) function gdi_s(y)
Inverse Gudermannian function for single precision real.
real(sp) function atanh_s(t)
Hyperbolic arc-tangent for single precision real.
real(dp) function ahav_d(a)
Arc-haversine function for double precision real.