13 use pkind, only: sp,dp
16 public::
gd,
gdi,
hav,
havh,
ahav,
ahavh,
sech,
sechs,
atanh,
sinoxm,
sinox,&
40 function gd_s(x) result(y)! [gd]
43 real(sp),
intent(in ):: x
53 function gd_d(x) result(y)! [gd]
55 real(dp),
intent(in ):: x
65 function gdi_s(y) result(x)! [gdi]
67 real(sp),
intent(in ):: y
77 function gdi_d(y) result(x)! [gdi]
79 real(dp),
intent(in ):: y
89 function hav_s(t) result(a)! [hav]
92 real(sp),
intent(in ):: t
105 real(dp),
intent(in ):: t
120 real(sp),
intent(in ):: t
133 real(dp),
intent(in ):: t
146 real(sp),
intent(in ):: a
159 real(dp),
intent(in ):: a
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))))
216 use pietc, only: u1,o2,o3,o5
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))))
237 real(sp),
intent(in ):: x
251 use pietc, only: u1,u2
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
real(sp) function havh_s(t)
Hyperbolic-haversine for single precision real (for pseudosphere geometry).
real(dp) function sinhox_d(x)
Evaluate the symmetric real function sinh(x)/x.
real(dp) function hav_d(t)
Haversine function for double precision real (for geometry on the sphere).
real(dp) function sinox_d(x)
Evaluate the symmetric real function sin(x)/x.
real(dp) function ahav_d(a)
Arc-haversine function for double precision real.
real(dp) function sech_d(x)
Hyperbolic secant for double precision real.
real(sp) function gd_s(x)
Gudermannian function (related to Mercator map projections)
real(sp) function atanh_s(t)
Hyperbolic arc-tangent for single precision real.
real(sp) function hav_s(t)
Haversine function for single precision real (for geometry on the sphere).
real(dp) function atanh_d(t)
Hyperbolic arc-tangent for double precision real.
This module is for evaluating several useful real-valued functions that are not always available in F...
real(dp) function sinhoxm_d(x)
Evaluate the symmetric real function sinh(x)/x-1.
Standard integer, real, and complex single and double precision kinds.
Some of the commonly used constants (pi etc) mainly for double-precision subroutines.
real(sp) function ahavh_s(a)
Hyperbolic arc-haversine for single 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 sechs_s(x)
Hyperbolic secant-squared function (logistic distribution).
real(dp) function sechs_d(x)
Hyperbolic secant-squared function (logistic distribution).
real(dp) function havh_d(t)
Hyperbolic-haversine for double precision real (for pseudosphere geometry).
real(dp) function gdi_d(y)
Inverse Gudermannian function for double precision real.
real(dp) function ahavh_d(a)
Hyperbolic arc-haversine for double precision real.
real(sp) function sech_s(x)
Hyperbolic secant for single precision real.
real(dp) function gd_d(x)
Gudermannian function (related to Mercator map projections)
real(sp) function gdi_s(y)
Inverse Gudermannian function for single precision real.
real(sp) function ahav_s(a)
Arc-haversine function for single precision real.