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