20 , _es((_f < 0 ? -1 : 1) * sqrt(abs(_e2)))
22 , _c( (1 - _f) * exp(
Math::eatanhe(real(1), _es)) )
25 if (!(isfinite(_a) && _a > 0))
27 if (!(isfinite(_f) && _f < 1))
29 if (!(isfinite(_k0) && _k0 > 0))
63 real& gamma, real& k)
const {
65 lat *= northp ? 1 : -1;
68 secphi = hypot(real(1), tau),
70 rho = hypot(real(1), taup) + abs(taup);
71 rho = taup >= 0 ? (lat != 90 ? 1/rho : 0) : rho;
72 rho *= 2 * _k0 * _a / _c;
73 k = lat != 90 ? (rho / _a) * secphi * sqrt(_e2m + _e2 /
Math::sq(secphi)) :
77 y *= (northp ? -rho : rho);
83 real& gamma, real& k)
const {
86 t = rho != 0 ? rho / (2 * _k0 * _a / _c) :
87 Math::sq(numeric_limits<real>::epsilon()),
88 taup = (1 / t - t) / 2,
90 secphi = hypot(real(1), tau);
91 k = rho != 0 ? (rho / _a) * secphi * sqrt(_e2m + _e2 /
Math::sq(secphi)) :
99 if (!(isfinite(k) && k > 0))
101 if (!(-90 < lat && lat <= 90))
103 real x, y, gamma, kold;
105 Forward(
true, lat, 0, x, y, gamma, kold);