
(FPCore (K m n M l) :precision binary64 (* (cos (- (/ (* K (+ m n)) 2.0) M)) (exp (- (- (pow (- (/ (+ m n) 2.0) M) 2.0)) (- l (fabs (- m n)))))))
double code(double K, double m, double n, double M, double l) {
return cos((((K * (m + n)) / 2.0) - M)) * exp((-pow((((m + n) / 2.0) - M), 2.0) - (l - fabs((m - n)))));
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = cos((((k * (m + n)) / 2.0d0) - m_1)) * exp((-((((m + n) / 2.0d0) - m_1) ** 2.0d0) - (l - abs((m - n)))))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.cos((((K * (m + n)) / 2.0) - M)) * Math.exp((-Math.pow((((m + n) / 2.0) - M), 2.0) - (l - Math.abs((m - n)))));
}
def code(K, m, n, M, l): return math.cos((((K * (m + n)) / 2.0) - M)) * math.exp((-math.pow((((m + n) / 2.0) - M), 2.0) - (l - math.fabs((m - n)))))
function code(K, m, n, M, l) return Float64(cos(Float64(Float64(Float64(K * Float64(m + n)) / 2.0) - M)) * exp(Float64(Float64(-(Float64(Float64(Float64(m + n) / 2.0) - M) ^ 2.0)) - Float64(l - abs(Float64(m - n)))))) end
function tmp = code(K, m, n, M, l) tmp = cos((((K * (m + n)) / 2.0) - M)) * exp((-((((m + n) / 2.0) - M) ^ 2.0) - (l - abs((m - n))))); end
code[K_, m_, n_, M_, l_] := N[(N[Cos[N[(N[(N[(K * N[(m + n), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-N[Power[N[(N[(N[(m + n), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision], 2.0], $MachinePrecision]) - N[(l - N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos \left(\frac{K \cdot \left(m + n\right)}{2} - M\right) \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (K m n M l) :precision binary64 (* (cos (- (/ (* K (+ m n)) 2.0) M)) (exp (- (- (pow (- (/ (+ m n) 2.0) M) 2.0)) (- l (fabs (- m n)))))))
double code(double K, double m, double n, double M, double l) {
return cos((((K * (m + n)) / 2.0) - M)) * exp((-pow((((m + n) / 2.0) - M), 2.0) - (l - fabs((m - n)))));
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = cos((((k * (m + n)) / 2.0d0) - m_1)) * exp((-((((m + n) / 2.0d0) - m_1) ** 2.0d0) - (l - abs((m - n)))))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.cos((((K * (m + n)) / 2.0) - M)) * Math.exp((-Math.pow((((m + n) / 2.0) - M), 2.0) - (l - Math.abs((m - n)))));
}
def code(K, m, n, M, l): return math.cos((((K * (m + n)) / 2.0) - M)) * math.exp((-math.pow((((m + n) / 2.0) - M), 2.0) - (l - math.fabs((m - n)))))
function code(K, m, n, M, l) return Float64(cos(Float64(Float64(Float64(K * Float64(m + n)) / 2.0) - M)) * exp(Float64(Float64(-(Float64(Float64(Float64(m + n) / 2.0) - M) ^ 2.0)) - Float64(l - abs(Float64(m - n)))))) end
function tmp = code(K, m, n, M, l) tmp = cos((((K * (m + n)) / 2.0) - M)) * exp((-((((m + n) / 2.0) - M) ^ 2.0) - (l - abs((m - n))))); end
code[K_, m_, n_, M_, l_] := N[(N[Cos[N[(N[(N[(K * N[(m + n), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[N[((-N[Power[N[(N[(N[(m + n), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision], 2.0], $MachinePrecision]) - N[(l - N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos \left(\frac{K \cdot \left(m + n\right)}{2} - M\right) \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}
\end{array}
(FPCore (K m n M l) :precision binary64 (* (cos M) (exp (- (- (fabs (- m n)) l) (pow (* M (+ (* 0.5 (/ (+ m n) M)) -1.0)) 2.0)))))
double code(double K, double m, double n, double M, double l) {
return cos(M) * exp(((fabs((m - n)) - l) - pow((M * ((0.5 * ((m + n) / M)) + -1.0)), 2.0)));
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = cos(m_1) * exp(((abs((m - n)) - l) - ((m_1 * ((0.5d0 * ((m + n) / m_1)) + (-1.0d0))) ** 2.0d0)))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.cos(M) * Math.exp(((Math.abs((m - n)) - l) - Math.pow((M * ((0.5 * ((m + n) / M)) + -1.0)), 2.0)));
}
def code(K, m, n, M, l): return math.cos(M) * math.exp(((math.fabs((m - n)) - l) - math.pow((M * ((0.5 * ((m + n) / M)) + -1.0)), 2.0)))
function code(K, m, n, M, l) return Float64(cos(M) * exp(Float64(Float64(abs(Float64(m - n)) - l) - (Float64(M * Float64(Float64(0.5 * Float64(Float64(m + n) / M)) + -1.0)) ^ 2.0)))) end
function tmp = code(K, m, n, M, l) tmp = cos(M) * exp(((abs((m - n)) - l) - ((M * ((0.5 * ((m + n) / M)) + -1.0)) ^ 2.0))); end
code[K_, m_, n_, M_, l_] := N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision] - N[Power[N[(M * N[(N[(0.5 * N[(N[(m + n), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos M \cdot e^{\left(\left|m - n\right| - \ell\right) - {\left(M \cdot \left(0.5 \cdot \frac{m + n}{M} + -1\right)\right)}^{2}}
\end{array}
Initial program 79.1%
Taylor expanded in K around 0 96.5%
cos-neg96.5%
Simplified96.5%
Taylor expanded in M around inf 96.5%
Final simplification96.5%
(FPCore (K m n M l)
:precision binary64
(if (<= m -5.1e+36)
(exp (* (pow m 2.0) -0.25))
(if (or (<= m -7e-44) (not (<= m -1.15e-56)))
(exp (+ (* (- (* 0.5 n) M) (- (- M (* 0.5 n)) m)) (- (fabs (- m n)) l)))
(* (cos (- (/ (* (+ m n) K) 2.0) M)) (exp (- (pow M 2.0)))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (m <= -5.1e+36) {
tmp = exp((pow(m, 2.0) * -0.25));
} else if ((m <= -7e-44) || !(m <= -1.15e-56)) {
tmp = exp(((((0.5 * n) - M) * ((M - (0.5 * n)) - m)) + (fabs((m - n)) - l)));
} else {
tmp = cos(((((m + n) * K) / 2.0) - M)) * exp(-pow(M, 2.0));
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: tmp
if (m <= (-5.1d+36)) then
tmp = exp(((m ** 2.0d0) * (-0.25d0)))
else if ((m <= (-7d-44)) .or. (.not. (m <= (-1.15d-56)))) then
tmp = exp(((((0.5d0 * n) - m_1) * ((m_1 - (0.5d0 * n)) - m)) + (abs((m - n)) - l)))
else
tmp = cos(((((m + n) * k) / 2.0d0) - m_1)) * exp(-(m_1 ** 2.0d0))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (m <= -5.1e+36) {
tmp = Math.exp((Math.pow(m, 2.0) * -0.25));
} else if ((m <= -7e-44) || !(m <= -1.15e-56)) {
tmp = Math.exp(((((0.5 * n) - M) * ((M - (0.5 * n)) - m)) + (Math.abs((m - n)) - l)));
} else {
tmp = Math.cos(((((m + n) * K) / 2.0) - M)) * Math.exp(-Math.pow(M, 2.0));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if m <= -5.1e+36: tmp = math.exp((math.pow(m, 2.0) * -0.25)) elif (m <= -7e-44) or not (m <= -1.15e-56): tmp = math.exp(((((0.5 * n) - M) * ((M - (0.5 * n)) - m)) + (math.fabs((m - n)) - l))) else: tmp = math.cos(((((m + n) * K) / 2.0) - M)) * math.exp(-math.pow(M, 2.0)) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (m <= -5.1e+36) tmp = exp(Float64((m ^ 2.0) * -0.25)); elseif ((m <= -7e-44) || !(m <= -1.15e-56)) tmp = exp(Float64(Float64(Float64(Float64(0.5 * n) - M) * Float64(Float64(M - Float64(0.5 * n)) - m)) + Float64(abs(Float64(m - n)) - l))); else tmp = Float64(cos(Float64(Float64(Float64(Float64(m + n) * K) / 2.0) - M)) * exp(Float64(-(M ^ 2.0)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (m <= -5.1e+36) tmp = exp(((m ^ 2.0) * -0.25)); elseif ((m <= -7e-44) || ~((m <= -1.15e-56))) tmp = exp(((((0.5 * n) - M) * ((M - (0.5 * n)) - m)) + (abs((m - n)) - l))); else tmp = cos(((((m + n) * K) / 2.0) - M)) * exp(-(M ^ 2.0)); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[m, -5.1e+36], N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[m, -7e-44], N[Not[LessEqual[m, -1.15e-56]], $MachinePrecision]], N[Exp[N[(N[(N[(N[(0.5 * n), $MachinePrecision] - M), $MachinePrecision] * N[(N[(M - N[(0.5 * n), $MachinePrecision]), $MachinePrecision] - m), $MachinePrecision]), $MachinePrecision] + N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Cos[N[(N[(N[(N[(m + n), $MachinePrecision] * K), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[(-N[Power[M, 2.0], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -5.1 \cdot 10^{+36}:\\
\;\;\;\;e^{{m}^{2} \cdot -0.25}\\
\mathbf{elif}\;m \leq -7 \cdot 10^{-44} \lor \neg \left(m \leq -1.15 \cdot 10^{-56}\right):\\
\;\;\;\;e^{\left(0.5 \cdot n - M\right) \cdot \left(\left(M - 0.5 \cdot n\right) - m\right) + \left(\left|m - n\right| - \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\frac{\left(m + n\right) \cdot K}{2} - M\right) \cdot e^{-{M}^{2}}\\
\end{array}
\end{array}
if m < -5.09999999999999973e36Initial program 69.4%
Taylor expanded in n around 0 58.1%
+-commutative58.1%
unpow258.1%
distribute-rgt-out64.6%
*-commutative64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in K around 0 72.7%
cos-neg72.7%
associate-*r*72.7%
sin-neg72.7%
Simplified72.7%
Taylor expanded in M around 0 90.4%
associate--r+90.4%
fabs-sub90.4%
associate-*r*90.4%
Simplified90.4%
Taylor expanded in m around inf 98.4%
*-commutative98.4%
Simplified98.4%
if -5.09999999999999973e36 < m < -6.9999999999999995e-44 or -1.15000000000000001e-56 < m Initial program 82.4%
Taylor expanded in m around inf 90.8%
*-commutative90.8%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in K around 0 96.4%
Taylor expanded in m around 0 79.3%
+-commutative79.3%
unpow279.3%
distribute-rgt-out84.6%
*-commutative84.6%
*-commutative84.6%
Simplified84.6%
if -6.9999999999999995e-44 < m < -1.15000000000000001e-56Initial program 59.0%
Taylor expanded in n around 0 59.0%
+-commutative59.0%
unpow259.0%
distribute-rgt-out59.0%
*-commutative59.0%
*-commutative59.0%
Simplified59.0%
Taylor expanded in M around inf 59.0%
mul-1-neg59.0%
Simplified59.0%
Final simplification87.7%
(FPCore (K m n M l) :precision binary64 (exp (- (- (fabs (- m n)) l) (pow (- (/ (+ m n) 2.0) M) 2.0))))
double code(double K, double m, double n, double M, double l) {
return exp(((fabs((m - n)) - l) - pow((((m + n) / 2.0) - M), 2.0)));
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = exp(((abs((m - n)) - l) - ((((m + n) / 2.0d0) - m_1) ** 2.0d0)))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.exp(((Math.abs((m - n)) - l) - Math.pow((((m + n) / 2.0) - M), 2.0)));
}
def code(K, m, n, M, l): return math.exp(((math.fabs((m - n)) - l) - math.pow((((m + n) / 2.0) - M), 2.0)))
function code(K, m, n, M, l) return exp(Float64(Float64(abs(Float64(m - n)) - l) - (Float64(Float64(Float64(m + n) / 2.0) - M) ^ 2.0))) end
function tmp = code(K, m, n, M, l) tmp = exp(((abs((m - n)) - l) - ((((m + n) / 2.0) - M) ^ 2.0))); end
code[K_, m_, n_, M_, l_] := N[Exp[N[(N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision] - N[Power[N[(N[(N[(m + n), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(\left|m - n\right| - \ell\right) - {\left(\frac{m + n}{2} - M\right)}^{2}}
\end{array}
Initial program 79.1%
Taylor expanded in m around inf 85.7%
*-commutative85.7%
associate-*l*85.7%
Simplified85.7%
Taylor expanded in K around 0 96.5%
Final simplification96.5%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* (pow m 2.0) -0.25)))
(t_1 (exp (- (- (fabs (- m n)) l) (* (* 0.5 m) (+ n (* 0.5 m))))))
(t_2 (exp (- (pow M 2.0)))))
(if (<= M -42000000.0)
t_2
(if (<= M -1.6e-9)
t_0
(if (<= M -6.3e-49)
t_1
(if (<= M -1.3e-73)
(* (* 0.5 K) (* (* m (exp (* n (- M (* 0.5 m))))) (sin M)))
(if (<= M -7.2e-180) t_0 (if (<= M 9.2e-10) t_1 t_2))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((pow(m, 2.0) * -0.25));
double t_1 = exp(((fabs((m - n)) - l) - ((0.5 * m) * (n + (0.5 * m)))));
double t_2 = exp(-pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_2;
} else if (M <= -1.6e-9) {
tmp = t_0;
} else if (M <= -6.3e-49) {
tmp = t_1;
} else if (M <= -1.3e-73) {
tmp = (0.5 * K) * ((m * exp((n * (M - (0.5 * m))))) * sin(M));
} else if (M <= -7.2e-180) {
tmp = t_0;
} else if (M <= 9.2e-10) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = exp(((m ** 2.0d0) * (-0.25d0)))
t_1 = exp(((abs((m - n)) - l) - ((0.5d0 * m) * (n + (0.5d0 * m)))))
t_2 = exp(-(m_1 ** 2.0d0))
if (m_1 <= (-42000000.0d0)) then
tmp = t_2
else if (m_1 <= (-1.6d-9)) then
tmp = t_0
else if (m_1 <= (-6.3d-49)) then
tmp = t_1
else if (m_1 <= (-1.3d-73)) then
tmp = (0.5d0 * k) * ((m * exp((n * (m_1 - (0.5d0 * m))))) * sin(m_1))
else if (m_1 <= (-7.2d-180)) then
tmp = t_0
else if (m_1 <= 9.2d-10) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((Math.pow(m, 2.0) * -0.25));
double t_1 = Math.exp(((Math.abs((m - n)) - l) - ((0.5 * m) * (n + (0.5 * m)))));
double t_2 = Math.exp(-Math.pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_2;
} else if (M <= -1.6e-9) {
tmp = t_0;
} else if (M <= -6.3e-49) {
tmp = t_1;
} else if (M <= -1.3e-73) {
tmp = (0.5 * K) * ((m * Math.exp((n * (M - (0.5 * m))))) * Math.sin(M));
} else if (M <= -7.2e-180) {
tmp = t_0;
} else if (M <= 9.2e-10) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((math.pow(m, 2.0) * -0.25)) t_1 = math.exp(((math.fabs((m - n)) - l) - ((0.5 * m) * (n + (0.5 * m))))) t_2 = math.exp(-math.pow(M, 2.0)) tmp = 0 if M <= -42000000.0: tmp = t_2 elif M <= -1.6e-9: tmp = t_0 elif M <= -6.3e-49: tmp = t_1 elif M <= -1.3e-73: tmp = (0.5 * K) * ((m * math.exp((n * (M - (0.5 * m))))) * math.sin(M)) elif M <= -7.2e-180: tmp = t_0 elif M <= 9.2e-10: tmp = t_1 else: tmp = t_2 return tmp
function code(K, m, n, M, l) t_0 = exp(Float64((m ^ 2.0) * -0.25)) t_1 = exp(Float64(Float64(abs(Float64(m - n)) - l) - Float64(Float64(0.5 * m) * Float64(n + Float64(0.5 * m))))) t_2 = exp(Float64(-(M ^ 2.0))) tmp = 0.0 if (M <= -42000000.0) tmp = t_2; elseif (M <= -1.6e-9) tmp = t_0; elseif (M <= -6.3e-49) tmp = t_1; elseif (M <= -1.3e-73) tmp = Float64(Float64(0.5 * K) * Float64(Float64(m * exp(Float64(n * Float64(M - Float64(0.5 * m))))) * sin(M))); elseif (M <= -7.2e-180) tmp = t_0; elseif (M <= 9.2e-10) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp(((m ^ 2.0) * -0.25)); t_1 = exp(((abs((m - n)) - l) - ((0.5 * m) * (n + (0.5 * m))))); t_2 = exp(-(M ^ 2.0)); tmp = 0.0; if (M <= -42000000.0) tmp = t_2; elseif (M <= -1.6e-9) tmp = t_0; elseif (M <= -6.3e-49) tmp = t_1; elseif (M <= -1.3e-73) tmp = (0.5 * K) * ((m * exp((n * (M - (0.5 * m))))) * sin(M)); elseif (M <= -7.2e-180) tmp = t_0; elseif (M <= 9.2e-10) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision] - N[(N[(0.5 * m), $MachinePrecision] * N[(n + N[(0.5 * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[(-N[Power[M, 2.0], $MachinePrecision])], $MachinePrecision]}, If[LessEqual[M, -42000000.0], t$95$2, If[LessEqual[M, -1.6e-9], t$95$0, If[LessEqual[M, -6.3e-49], t$95$1, If[LessEqual[M, -1.3e-73], N[(N[(0.5 * K), $MachinePrecision] * N[(N[(m * N[Exp[N[(n * N[(M - N[(0.5 * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[M], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, -7.2e-180], t$95$0, If[LessEqual[M, 9.2e-10], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{{m}^{2} \cdot -0.25}\\
t_1 := e^{\left(\left|m - n\right| - \ell\right) - \left(0.5 \cdot m\right) \cdot \left(n + 0.5 \cdot m\right)}\\
t_2 := e^{-{M}^{2}}\\
\mathbf{if}\;M \leq -42000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;M \leq -1.6 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq -6.3 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;M \leq -1.3 \cdot 10^{-73}:\\
\;\;\;\;\left(0.5 \cdot K\right) \cdot \left(\left(m \cdot e^{n \cdot \left(M - 0.5 \cdot m\right)}\right) \cdot \sin M\right)\\
\mathbf{elif}\;M \leq -7.2 \cdot 10^{-180}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq 9.2 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if M < -4.2e7 or 9.20000000000000028e-10 < M Initial program 77.0%
Taylor expanded in n around 0 65.3%
+-commutative65.3%
unpow265.3%
distribute-rgt-out69.7%
*-commutative69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in K around 0 69.8%
cos-neg69.8%
associate-*r*69.8%
sin-neg69.8%
Simplified69.8%
Taylor expanded in M around 0 86.9%
Taylor expanded in M around inf 98.6%
mul-1-neg77.0%
Simplified98.6%
if -4.2e7 < M < -1.60000000000000006e-9 or -1.3e-73 < M < -7.1999999999999998e-180Initial program 64.7%
Taylor expanded in n around 0 48.8%
+-commutative48.8%
unpow248.8%
distribute-rgt-out56.8%
*-commutative56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in K around 0 64.3%
cos-neg64.3%
associate-*r*64.3%
sin-neg64.3%
Simplified64.3%
Taylor expanded in M around 0 80.3%
associate--r+80.3%
fabs-sub80.3%
associate-*r*80.3%
Simplified80.3%
Taylor expanded in m around inf 84.4%
*-commutative84.4%
Simplified84.4%
if -1.60000000000000006e-9 < M < -6.2999999999999997e-49 or -7.1999999999999998e-180 < M < 9.20000000000000028e-10Initial program 86.5%
Taylor expanded in n around 0 61.5%
+-commutative61.5%
unpow261.5%
distribute-rgt-out66.1%
*-commutative66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in K around 0 69.4%
cos-neg69.4%
associate-*r*69.4%
sin-neg69.4%
Simplified69.4%
Taylor expanded in M around 0 69.4%
associate--r+69.4%
fabs-sub69.4%
associate-*r*69.4%
Simplified69.4%
if -6.2999999999999997e-49 < M < -1.3e-73Initial program 77.8%
Taylor expanded in n around 0 77.8%
+-commutative77.8%
unpow277.8%
distribute-rgt-out77.8%
*-commutative77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in K around 0 88.9%
cos-neg88.9%
associate-*r*88.9%
sin-neg88.9%
Simplified88.9%
Taylor expanded in m around inf 77.8%
associate-*r*77.8%
associate-*r*77.8%
Simplified77.8%
Taylor expanded in n around inf 45.2%
Final simplification85.4%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* (pow m 2.0) -0.25)))
(t_1 (exp (- (- (fabs (- m n)) l) (* (* 0.5 m) (+ n (* 0.5 m))))))
(t_2 (exp (- (pow M 2.0)))))
(if (<= M -42000000.0)
t_2
(if (<= M -1e-9)
t_0
(if (<= M -8.5e-47)
t_1
(if (<= M -4.1e-180) t_0 (if (<= M 9.2e-10) t_1 t_2)))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((pow(m, 2.0) * -0.25));
double t_1 = exp(((fabs((m - n)) - l) - ((0.5 * m) * (n + (0.5 * m)))));
double t_2 = exp(-pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_2;
} else if (M <= -1e-9) {
tmp = t_0;
} else if (M <= -8.5e-47) {
tmp = t_1;
} else if (M <= -4.1e-180) {
tmp = t_0;
} else if (M <= 9.2e-10) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = exp(((m ** 2.0d0) * (-0.25d0)))
t_1 = exp(((abs((m - n)) - l) - ((0.5d0 * m) * (n + (0.5d0 * m)))))
t_2 = exp(-(m_1 ** 2.0d0))
if (m_1 <= (-42000000.0d0)) then
tmp = t_2
else if (m_1 <= (-1d-9)) then
tmp = t_0
else if (m_1 <= (-8.5d-47)) then
tmp = t_1
else if (m_1 <= (-4.1d-180)) then
tmp = t_0
else if (m_1 <= 9.2d-10) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((Math.pow(m, 2.0) * -0.25));
double t_1 = Math.exp(((Math.abs((m - n)) - l) - ((0.5 * m) * (n + (0.5 * m)))));
double t_2 = Math.exp(-Math.pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_2;
} else if (M <= -1e-9) {
tmp = t_0;
} else if (M <= -8.5e-47) {
tmp = t_1;
} else if (M <= -4.1e-180) {
tmp = t_0;
} else if (M <= 9.2e-10) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((math.pow(m, 2.0) * -0.25)) t_1 = math.exp(((math.fabs((m - n)) - l) - ((0.5 * m) * (n + (0.5 * m))))) t_2 = math.exp(-math.pow(M, 2.0)) tmp = 0 if M <= -42000000.0: tmp = t_2 elif M <= -1e-9: tmp = t_0 elif M <= -8.5e-47: tmp = t_1 elif M <= -4.1e-180: tmp = t_0 elif M <= 9.2e-10: tmp = t_1 else: tmp = t_2 return tmp
function code(K, m, n, M, l) t_0 = exp(Float64((m ^ 2.0) * -0.25)) t_1 = exp(Float64(Float64(abs(Float64(m - n)) - l) - Float64(Float64(0.5 * m) * Float64(n + Float64(0.5 * m))))) t_2 = exp(Float64(-(M ^ 2.0))) tmp = 0.0 if (M <= -42000000.0) tmp = t_2; elseif (M <= -1e-9) tmp = t_0; elseif (M <= -8.5e-47) tmp = t_1; elseif (M <= -4.1e-180) tmp = t_0; elseif (M <= 9.2e-10) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp(((m ^ 2.0) * -0.25)); t_1 = exp(((abs((m - n)) - l) - ((0.5 * m) * (n + (0.5 * m))))); t_2 = exp(-(M ^ 2.0)); tmp = 0.0; if (M <= -42000000.0) tmp = t_2; elseif (M <= -1e-9) tmp = t_0; elseif (M <= -8.5e-47) tmp = t_1; elseif (M <= -4.1e-180) tmp = t_0; elseif (M <= 9.2e-10) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision] - N[(N[(0.5 * m), $MachinePrecision] * N[(n + N[(0.5 * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[(-N[Power[M, 2.0], $MachinePrecision])], $MachinePrecision]}, If[LessEqual[M, -42000000.0], t$95$2, If[LessEqual[M, -1e-9], t$95$0, If[LessEqual[M, -8.5e-47], t$95$1, If[LessEqual[M, -4.1e-180], t$95$0, If[LessEqual[M, 9.2e-10], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{{m}^{2} \cdot -0.25}\\
t_1 := e^{\left(\left|m - n\right| - \ell\right) - \left(0.5 \cdot m\right) \cdot \left(n + 0.5 \cdot m\right)}\\
t_2 := e^{-{M}^{2}}\\
\mathbf{if}\;M \leq -42000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;M \leq -1 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq -8.5 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;M \leq -4.1 \cdot 10^{-180}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq 9.2 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if M < -4.2e7 or 9.20000000000000028e-10 < M Initial program 77.0%
Taylor expanded in n around 0 65.3%
+-commutative65.3%
unpow265.3%
distribute-rgt-out69.7%
*-commutative69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in K around 0 69.8%
cos-neg69.8%
associate-*r*69.8%
sin-neg69.8%
Simplified69.8%
Taylor expanded in M around 0 86.9%
Taylor expanded in M around inf 98.6%
mul-1-neg77.0%
Simplified98.6%
if -4.2e7 < M < -1.00000000000000006e-9 or -8.4999999999999999e-47 < M < -4.1e-180Initial program 69.1%
Taylor expanded in n around 0 54.9%
+-commutative54.9%
unpow254.9%
distribute-rgt-out60.7%
*-commutative60.7%
*-commutative60.7%
Simplified60.7%
Taylor expanded in K around 0 68.8%
cos-neg68.8%
associate-*r*68.8%
sin-neg68.8%
Simplified68.8%
Taylor expanded in M around 0 77.4%
associate--r+77.4%
fabs-sub77.4%
associate-*r*77.4%
Simplified77.4%
Taylor expanded in m around inf 77.7%
*-commutative77.7%
Simplified77.7%
if -1.00000000000000006e-9 < M < -8.4999999999999999e-47 or -4.1e-180 < M < 9.20000000000000028e-10Initial program 86.3%
Taylor expanded in n around 0 62.2%
+-commutative62.2%
unpow262.2%
distribute-rgt-out66.9%
*-commutative66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in K around 0 70.2%
cos-neg70.2%
associate-*r*70.2%
sin-neg70.2%
Simplified70.2%
Taylor expanded in M around 0 70.2%
associate--r+70.2%
fabs-sub70.2%
associate-*r*70.2%
Simplified70.2%
Final simplification86.2%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* (pow m 2.0) -0.25))) (t_1 (exp (- (pow M 2.0)))))
(if (<= M -42000000.0)
t_1
(if (<= M -1.45e-134)
t_0
(if (<= M -6.5e-157)
(exp (* (pow M 2.0) (+ (+ (/ m M) (/ n M)) -1.0)))
(if (<= M -8.5e-237)
t_0
(if (<= M 1.55e-295)
(* (cos (* (* 0.5 n) K)) (exp (- l)))
(if (<= M 2.3e-11) t_0 t_1))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((pow(m, 2.0) * -0.25));
double t_1 = exp(-pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_1;
} else if (M <= -1.45e-134) {
tmp = t_0;
} else if (M <= -6.5e-157) {
tmp = exp((pow(M, 2.0) * (((m / M) + (n / M)) + -1.0)));
} else if (M <= -8.5e-237) {
tmp = t_0;
} else if (M <= 1.55e-295) {
tmp = cos(((0.5 * n) * K)) * exp(-l);
} else if (M <= 2.3e-11) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp(((m ** 2.0d0) * (-0.25d0)))
t_1 = exp(-(m_1 ** 2.0d0))
if (m_1 <= (-42000000.0d0)) then
tmp = t_1
else if (m_1 <= (-1.45d-134)) then
tmp = t_0
else if (m_1 <= (-6.5d-157)) then
tmp = exp(((m_1 ** 2.0d0) * (((m / m_1) + (n / m_1)) + (-1.0d0))))
else if (m_1 <= (-8.5d-237)) then
tmp = t_0
else if (m_1 <= 1.55d-295) then
tmp = cos(((0.5d0 * n) * k)) * exp(-l)
else if (m_1 <= 2.3d-11) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((Math.pow(m, 2.0) * -0.25));
double t_1 = Math.exp(-Math.pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_1;
} else if (M <= -1.45e-134) {
tmp = t_0;
} else if (M <= -6.5e-157) {
tmp = Math.exp((Math.pow(M, 2.0) * (((m / M) + (n / M)) + -1.0)));
} else if (M <= -8.5e-237) {
tmp = t_0;
} else if (M <= 1.55e-295) {
tmp = Math.cos(((0.5 * n) * K)) * Math.exp(-l);
} else if (M <= 2.3e-11) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((math.pow(m, 2.0) * -0.25)) t_1 = math.exp(-math.pow(M, 2.0)) tmp = 0 if M <= -42000000.0: tmp = t_1 elif M <= -1.45e-134: tmp = t_0 elif M <= -6.5e-157: tmp = math.exp((math.pow(M, 2.0) * (((m / M) + (n / M)) + -1.0))) elif M <= -8.5e-237: tmp = t_0 elif M <= 1.55e-295: tmp = math.cos(((0.5 * n) * K)) * math.exp(-l) elif M <= 2.3e-11: tmp = t_0 else: tmp = t_1 return tmp
function code(K, m, n, M, l) t_0 = exp(Float64((m ^ 2.0) * -0.25)) t_1 = exp(Float64(-(M ^ 2.0))) tmp = 0.0 if (M <= -42000000.0) tmp = t_1; elseif (M <= -1.45e-134) tmp = t_0; elseif (M <= -6.5e-157) tmp = exp(Float64((M ^ 2.0) * Float64(Float64(Float64(m / M) + Float64(n / M)) + -1.0))); elseif (M <= -8.5e-237) tmp = t_0; elseif (M <= 1.55e-295) tmp = Float64(cos(Float64(Float64(0.5 * n) * K)) * exp(Float64(-l))); elseif (M <= 2.3e-11) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp(((m ^ 2.0) * -0.25)); t_1 = exp(-(M ^ 2.0)); tmp = 0.0; if (M <= -42000000.0) tmp = t_1; elseif (M <= -1.45e-134) tmp = t_0; elseif (M <= -6.5e-157) tmp = exp(((M ^ 2.0) * (((m / M) + (n / M)) + -1.0))); elseif (M <= -8.5e-237) tmp = t_0; elseif (M <= 1.55e-295) tmp = cos(((0.5 * n) * K)) * exp(-l); elseif (M <= 2.3e-11) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[(-N[Power[M, 2.0], $MachinePrecision])], $MachinePrecision]}, If[LessEqual[M, -42000000.0], t$95$1, If[LessEqual[M, -1.45e-134], t$95$0, If[LessEqual[M, -6.5e-157], N[Exp[N[(N[Power[M, 2.0], $MachinePrecision] * N[(N[(N[(m / M), $MachinePrecision] + N[(n / M), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[M, -8.5e-237], t$95$0, If[LessEqual[M, 1.55e-295], N[(N[Cos[N[(N[(0.5 * n), $MachinePrecision] * K), $MachinePrecision]], $MachinePrecision] * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 2.3e-11], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{{m}^{2} \cdot -0.25}\\
t_1 := e^{-{M}^{2}}\\
\mathbf{if}\;M \leq -42000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;M \leq -1.45 \cdot 10^{-134}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq -6.5 \cdot 10^{-157}:\\
\;\;\;\;e^{{M}^{2} \cdot \left(\left(\frac{m}{M} + \frac{n}{M}\right) + -1\right)}\\
\mathbf{elif}\;M \leq -8.5 \cdot 10^{-237}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq 1.55 \cdot 10^{-295}:\\
\;\;\;\;\cos \left(\left(0.5 \cdot n\right) \cdot K\right) \cdot e^{-\ell}\\
\mathbf{elif}\;M \leq 2.3 \cdot 10^{-11}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if M < -4.2e7 or 2.30000000000000014e-11 < M Initial program 76.5%
Taylor expanded in n around 0 64.8%
+-commutative64.8%
unpow264.8%
distribute-rgt-out69.2%
*-commutative69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in K around 0 69.3%
cos-neg69.3%
associate-*r*69.3%
sin-neg69.3%
Simplified69.3%
Taylor expanded in M around 0 87.0%
Taylor expanded in M around inf 97.9%
mul-1-neg76.5%
Simplified97.9%
if -4.2e7 < M < -1.44999999999999997e-134 or -6.5000000000000002e-157 < M < -8.49999999999999951e-237 or 1.5500000000000001e-295 < M < 2.30000000000000014e-11Initial program 81.6%
Taylor expanded in n around 0 59.5%
+-commutative59.5%
unpow259.5%
distribute-rgt-out64.6%
*-commutative64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in K around 0 69.8%
cos-neg69.8%
associate-*r*69.8%
sin-neg69.8%
Simplified69.8%
Taylor expanded in M around 0 71.8%
associate--r+71.8%
fabs-sub71.8%
associate-*r*71.8%
Simplified71.8%
Taylor expanded in m around inf 64.3%
*-commutative64.3%
Simplified64.3%
if -1.44999999999999997e-134 < M < -6.5000000000000002e-157Initial program 74.0%
Taylor expanded in n around 0 31.6%
+-commutative31.6%
unpow231.6%
distribute-rgt-out45.9%
*-commutative45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in K around 0 57.8%
cos-neg57.8%
associate-*r*57.8%
sin-neg57.8%
Simplified57.8%
Taylor expanded in M around 0 57.8%
Taylor expanded in M around -inf 71.9%
if -8.49999999999999951e-237 < M < 1.5500000000000001e-295Initial program 88.3%
Taylor expanded in n around 0 81.7%
+-commutative81.7%
unpow281.7%
distribute-rgt-out81.7%
*-commutative81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in l around inf 62.4%
mul-1-neg62.4%
Simplified62.4%
Taylor expanded in n around inf 68.8%
*-commutative68.8%
associate-*l*68.8%
Simplified68.8%
Final simplification82.6%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* (pow m 2.0) -0.25))))
(if (<= l -720.0)
(exp l)
(if (<= l -8.5e-47)
(exp (* n (* m -0.5)))
(if (<= l -3.2e-152)
t_0
(if (<= l -8e-183)
(exp (* n (- M (* 0.5 m))))
(if (<= l 0.000112) t_0 (exp (- l)))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((pow(m, 2.0) * -0.25));
double tmp;
if (l <= -720.0) {
tmp = exp(l);
} else if (l <= -8.5e-47) {
tmp = exp((n * (m * -0.5)));
} else if (l <= -3.2e-152) {
tmp = t_0;
} else if (l <= -8e-183) {
tmp = exp((n * (M - (0.5 * m))));
} else if (l <= 0.000112) {
tmp = t_0;
} else {
tmp = exp(-l);
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = exp(((m ** 2.0d0) * (-0.25d0)))
if (l <= (-720.0d0)) then
tmp = exp(l)
else if (l <= (-8.5d-47)) then
tmp = exp((n * (m * (-0.5d0))))
else if (l <= (-3.2d-152)) then
tmp = t_0
else if (l <= (-8d-183)) then
tmp = exp((n * (m_1 - (0.5d0 * m))))
else if (l <= 0.000112d0) then
tmp = t_0
else
tmp = exp(-l)
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((Math.pow(m, 2.0) * -0.25));
double tmp;
if (l <= -720.0) {
tmp = Math.exp(l);
} else if (l <= -8.5e-47) {
tmp = Math.exp((n * (m * -0.5)));
} else if (l <= -3.2e-152) {
tmp = t_0;
} else if (l <= -8e-183) {
tmp = Math.exp((n * (M - (0.5 * m))));
} else if (l <= 0.000112) {
tmp = t_0;
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((math.pow(m, 2.0) * -0.25)) tmp = 0 if l <= -720.0: tmp = math.exp(l) elif l <= -8.5e-47: tmp = math.exp((n * (m * -0.5))) elif l <= -3.2e-152: tmp = t_0 elif l <= -8e-183: tmp = math.exp((n * (M - (0.5 * m)))) elif l <= 0.000112: tmp = t_0 else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) t_0 = exp(Float64((m ^ 2.0) * -0.25)) tmp = 0.0 if (l <= -720.0) tmp = exp(l); elseif (l <= -8.5e-47) tmp = exp(Float64(n * Float64(m * -0.5))); elseif (l <= -3.2e-152) tmp = t_0; elseif (l <= -8e-183) tmp = exp(Float64(n * Float64(M - Float64(0.5 * m)))); elseif (l <= 0.000112) tmp = t_0; else tmp = exp(Float64(-l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp(((m ^ 2.0) * -0.25)); tmp = 0.0; if (l <= -720.0) tmp = exp(l); elseif (l <= -8.5e-47) tmp = exp((n * (m * -0.5))); elseif (l <= -3.2e-152) tmp = t_0; elseif (l <= -8e-183) tmp = exp((n * (M - (0.5 * m)))); elseif (l <= 0.000112) tmp = t_0; else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -720.0], N[Exp[l], $MachinePrecision], If[LessEqual[l, -8.5e-47], N[Exp[N[(n * N[(m * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -3.2e-152], t$95$0, If[LessEqual[l, -8e-183], N[Exp[N[(n * N[(M - N[(0.5 * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 0.000112], t$95$0, N[Exp[(-l)], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{{m}^{2} \cdot -0.25}\\
\mathbf{if}\;\ell \leq -720:\\
\;\;\;\;e^{\ell}\\
\mathbf{elif}\;\ell \leq -8.5 \cdot 10^{-47}:\\
\;\;\;\;e^{n \cdot \left(m \cdot -0.5\right)}\\
\mathbf{elif}\;\ell \leq -3.2 \cdot 10^{-152}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq -8 \cdot 10^{-183}:\\
\;\;\;\;e^{n \cdot \left(M - 0.5 \cdot m\right)}\\
\mathbf{elif}\;\ell \leq 0.000112:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < -720Initial program 75.4%
Taylor expanded in n around 0 63.2%
+-commutative63.2%
unpow263.2%
distribute-rgt-out72.0%
*-commutative72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in l around inf 15.0%
mul-1-neg15.0%
Simplified15.0%
Taylor expanded in K around 0 10.0%
cos-neg10.0%
*-commutative10.0%
Simplified10.0%
pow110.0%
add-sqr-sqrt10.0%
sqrt-unprod10.0%
sqr-neg10.0%
sqrt-unprod0.0%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
unpow181.0%
cos-neg81.0%
*-commutative81.0%
cos-neg81.0%
Simplified81.0%
Taylor expanded in M around 0 81.0%
if -720 < l < -8.4999999999999999e-47Initial program 70.0%
Taylor expanded in n around 0 30.6%
+-commutative30.6%
unpow230.6%
distribute-rgt-out30.6%
*-commutative30.6%
*-commutative30.6%
Simplified30.6%
Taylor expanded in K around 0 30.6%
cos-neg30.6%
associate-*r*30.6%
sin-neg30.6%
Simplified30.6%
Taylor expanded in M around 0 60.6%
associate--r+60.6%
fabs-sub60.6%
associate-*r*60.6%
Simplified60.6%
Taylor expanded in n around inf 70.6%
associate-*r*70.6%
metadata-eval70.6%
distribute-lft-neg-in70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
distribute-rgt-neg-out70.6%
distribute-lft-neg-in70.6%
metadata-eval70.6%
Simplified70.6%
if -8.4999999999999999e-47 < l < -3.20000000000000013e-152 or -8.00000000000000004e-183 < l < 1.11999999999999998e-4Initial program 82.8%
Taylor expanded in n around 0 62.9%
+-commutative62.9%
unpow262.9%
distribute-rgt-out67.3%
*-commutative67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in K around 0 69.7%
cos-neg69.7%
associate-*r*69.7%
sin-neg69.7%
Simplified69.7%
Taylor expanded in M around 0 54.5%
associate--r+54.5%
fabs-sub54.5%
associate-*r*54.5%
Simplified54.5%
Taylor expanded in m around inf 60.9%
*-commutative60.9%
Simplified60.9%
if -3.20000000000000013e-152 < l < -8.00000000000000004e-183Initial program 50.0%
Taylor expanded in n around 0 50.0%
+-commutative50.0%
unpow250.0%
distribute-rgt-out50.0%
*-commutative50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in K around 0 66.9%
cos-neg66.9%
associate-*r*66.9%
sin-neg66.9%
Simplified66.9%
Taylor expanded in M around 0 83.6%
Taylor expanded in n around inf 51.3%
if 1.11999999999999998e-4 < l Initial program 79.7%
Taylor expanded in n around 0 68.2%
+-commutative68.2%
unpow268.2%
distribute-rgt-out71.2%
*-commutative71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in K around 0 74.2%
cos-neg74.2%
associate-*r*74.2%
sin-neg74.2%
Simplified74.2%
Taylor expanded in M around 0 82.9%
associate--r+82.9%
fabs-sub82.9%
associate-*r*82.9%
Simplified82.9%
Taylor expanded in l around inf 98.6%
mul-1-neg98.6%
Simplified98.6%
Final simplification75.7%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* (pow m 2.0) -0.25))) (t_1 (exp (- (pow M 2.0)))))
(if (<= M -42000000.0)
t_1
(if (<= M -6.8e-204)
t_0
(if (<= M -4.4e-258)
(* (cos (* (* 0.5 n) K)) (exp (- l)))
(if (<= M 2.3e-11) t_0 t_1))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((pow(m, 2.0) * -0.25));
double t_1 = exp(-pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_1;
} else if (M <= -6.8e-204) {
tmp = t_0;
} else if (M <= -4.4e-258) {
tmp = cos(((0.5 * n) * K)) * exp(-l);
} else if (M <= 2.3e-11) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp(((m ** 2.0d0) * (-0.25d0)))
t_1 = exp(-(m_1 ** 2.0d0))
if (m_1 <= (-42000000.0d0)) then
tmp = t_1
else if (m_1 <= (-6.8d-204)) then
tmp = t_0
else if (m_1 <= (-4.4d-258)) then
tmp = cos(((0.5d0 * n) * k)) * exp(-l)
else if (m_1 <= 2.3d-11) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((Math.pow(m, 2.0) * -0.25));
double t_1 = Math.exp(-Math.pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_1;
} else if (M <= -6.8e-204) {
tmp = t_0;
} else if (M <= -4.4e-258) {
tmp = Math.cos(((0.5 * n) * K)) * Math.exp(-l);
} else if (M <= 2.3e-11) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((math.pow(m, 2.0) * -0.25)) t_1 = math.exp(-math.pow(M, 2.0)) tmp = 0 if M <= -42000000.0: tmp = t_1 elif M <= -6.8e-204: tmp = t_0 elif M <= -4.4e-258: tmp = math.cos(((0.5 * n) * K)) * math.exp(-l) elif M <= 2.3e-11: tmp = t_0 else: tmp = t_1 return tmp
function code(K, m, n, M, l) t_0 = exp(Float64((m ^ 2.0) * -0.25)) t_1 = exp(Float64(-(M ^ 2.0))) tmp = 0.0 if (M <= -42000000.0) tmp = t_1; elseif (M <= -6.8e-204) tmp = t_0; elseif (M <= -4.4e-258) tmp = Float64(cos(Float64(Float64(0.5 * n) * K)) * exp(Float64(-l))); elseif (M <= 2.3e-11) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp(((m ^ 2.0) * -0.25)); t_1 = exp(-(M ^ 2.0)); tmp = 0.0; if (M <= -42000000.0) tmp = t_1; elseif (M <= -6.8e-204) tmp = t_0; elseif (M <= -4.4e-258) tmp = cos(((0.5 * n) * K)) * exp(-l); elseif (M <= 2.3e-11) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[(-N[Power[M, 2.0], $MachinePrecision])], $MachinePrecision]}, If[LessEqual[M, -42000000.0], t$95$1, If[LessEqual[M, -6.8e-204], t$95$0, If[LessEqual[M, -4.4e-258], N[(N[Cos[N[(N[(0.5 * n), $MachinePrecision] * K), $MachinePrecision]], $MachinePrecision] * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 2.3e-11], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{{m}^{2} \cdot -0.25}\\
t_1 := e^{-{M}^{2}}\\
\mathbf{if}\;M \leq -42000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;M \leq -6.8 \cdot 10^{-204}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq -4.4 \cdot 10^{-258}:\\
\;\;\;\;\cos \left(\left(0.5 \cdot n\right) \cdot K\right) \cdot e^{-\ell}\\
\mathbf{elif}\;M \leq 2.3 \cdot 10^{-11}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if M < -4.2e7 or 2.30000000000000014e-11 < M Initial program 76.5%
Taylor expanded in n around 0 64.8%
+-commutative64.8%
unpow264.8%
distribute-rgt-out69.2%
*-commutative69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in K around 0 69.3%
cos-neg69.3%
associate-*r*69.3%
sin-neg69.3%
Simplified69.3%
Taylor expanded in M around 0 87.0%
Taylor expanded in M around inf 97.9%
mul-1-neg76.5%
Simplified97.9%
if -4.2e7 < M < -6.8000000000000004e-204 or -4.40000000000000031e-258 < M < 2.30000000000000014e-11Initial program 81.0%
Taylor expanded in n around 0 58.1%
+-commutative58.1%
unpow258.1%
distribute-rgt-out63.6%
*-commutative63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in K around 0 68.9%
cos-neg68.9%
associate-*r*68.9%
sin-neg68.9%
Simplified68.9%
Taylor expanded in M around 0 70.8%
associate--r+70.8%
fabs-sub70.8%
associate-*r*70.8%
Simplified70.8%
Taylor expanded in m around inf 63.1%
*-commutative63.1%
Simplified63.1%
if -6.8000000000000004e-204 < M < -4.40000000000000031e-258Initial program 91.7%
Taylor expanded in n around 0 83.5%
+-commutative83.5%
unpow283.5%
distribute-rgt-out83.5%
*-commutative83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in l around inf 59.4%
mul-1-neg59.4%
Simplified59.4%
Taylor expanded in n around inf 59.4%
*-commutative59.4%
associate-*l*59.4%
Simplified59.4%
Final simplification81.4%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* (pow m 2.0) -0.25))) (t_1 (exp (- (pow M 2.0)))))
(if (<= M -42000000.0)
t_1
(if (<= M -6.8e-204)
t_0
(if (<= M -5e-258)
(* (exp (- l)) (cos (* K (* 0.5 m))))
(if (<= M 9.2e-10) t_0 t_1))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((pow(m, 2.0) * -0.25));
double t_1 = exp(-pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_1;
} else if (M <= -6.8e-204) {
tmp = t_0;
} else if (M <= -5e-258) {
tmp = exp(-l) * cos((K * (0.5 * m)));
} else if (M <= 9.2e-10) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp(((m ** 2.0d0) * (-0.25d0)))
t_1 = exp(-(m_1 ** 2.0d0))
if (m_1 <= (-42000000.0d0)) then
tmp = t_1
else if (m_1 <= (-6.8d-204)) then
tmp = t_0
else if (m_1 <= (-5d-258)) then
tmp = exp(-l) * cos((k * (0.5d0 * m)))
else if (m_1 <= 9.2d-10) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((Math.pow(m, 2.0) * -0.25));
double t_1 = Math.exp(-Math.pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_1;
} else if (M <= -6.8e-204) {
tmp = t_0;
} else if (M <= -5e-258) {
tmp = Math.exp(-l) * Math.cos((K * (0.5 * m)));
} else if (M <= 9.2e-10) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((math.pow(m, 2.0) * -0.25)) t_1 = math.exp(-math.pow(M, 2.0)) tmp = 0 if M <= -42000000.0: tmp = t_1 elif M <= -6.8e-204: tmp = t_0 elif M <= -5e-258: tmp = math.exp(-l) * math.cos((K * (0.5 * m))) elif M <= 9.2e-10: tmp = t_0 else: tmp = t_1 return tmp
function code(K, m, n, M, l) t_0 = exp(Float64((m ^ 2.0) * -0.25)) t_1 = exp(Float64(-(M ^ 2.0))) tmp = 0.0 if (M <= -42000000.0) tmp = t_1; elseif (M <= -6.8e-204) tmp = t_0; elseif (M <= -5e-258) tmp = Float64(exp(Float64(-l)) * cos(Float64(K * Float64(0.5 * m)))); elseif (M <= 9.2e-10) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp(((m ^ 2.0) * -0.25)); t_1 = exp(-(M ^ 2.0)); tmp = 0.0; if (M <= -42000000.0) tmp = t_1; elseif (M <= -6.8e-204) tmp = t_0; elseif (M <= -5e-258) tmp = exp(-l) * cos((K * (0.5 * m))); elseif (M <= 9.2e-10) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[(-N[Power[M, 2.0], $MachinePrecision])], $MachinePrecision]}, If[LessEqual[M, -42000000.0], t$95$1, If[LessEqual[M, -6.8e-204], t$95$0, If[LessEqual[M, -5e-258], N[(N[Exp[(-l)], $MachinePrecision] * N[Cos[N[(K * N[(0.5 * m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 9.2e-10], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{{m}^{2} \cdot -0.25}\\
t_1 := e^{-{M}^{2}}\\
\mathbf{if}\;M \leq -42000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;M \leq -6.8 \cdot 10^{-204}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq -5 \cdot 10^{-258}:\\
\;\;\;\;e^{-\ell} \cdot \cos \left(K \cdot \left(0.5 \cdot m\right)\right)\\
\mathbf{elif}\;M \leq 9.2 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if M < -4.2e7 or 9.20000000000000028e-10 < M Initial program 77.0%
Taylor expanded in n around 0 65.3%
+-commutative65.3%
unpow265.3%
distribute-rgt-out69.7%
*-commutative69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in K around 0 69.8%
cos-neg69.8%
associate-*r*69.8%
sin-neg69.8%
Simplified69.8%
Taylor expanded in M around 0 86.9%
Taylor expanded in M around inf 98.6%
mul-1-neg77.0%
Simplified98.6%
if -4.2e7 < M < -6.8000000000000004e-204 or -4.9999999999999999e-258 < M < 9.20000000000000028e-10Initial program 80.2%
Taylor expanded in n around 0 57.5%
+-commutative57.5%
unpow257.5%
distribute-rgt-out63.1%
*-commutative63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in K around 0 68.3%
cos-neg68.3%
associate-*r*68.3%
sin-neg68.3%
Simplified68.3%
Taylor expanded in M around 0 71.0%
associate--r+71.0%
fabs-sub71.0%
associate-*r*71.0%
Simplified71.0%
Taylor expanded in m around inf 63.4%
*-commutative63.4%
Simplified63.4%
if -6.8000000000000004e-204 < M < -4.9999999999999999e-258Initial program 91.7%
Taylor expanded in n around 0 83.5%
+-commutative83.5%
unpow283.5%
distribute-rgt-out83.5%
*-commutative83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in l around inf 59.4%
mul-1-neg59.4%
Simplified59.4%
Taylor expanded in m around inf 59.4%
*-commutative91.7%
associate-*l*91.7%
Simplified59.4%
Final simplification81.8%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* (pow m 2.0) -0.25))) (t_1 (exp (- (pow M 2.0)))))
(if (<= M -42000000.0)
t_1
(if (<= M -6.5e-208)
t_0
(if (<= M -8.5e-268)
(* K (* 0.5 (* m (sin M))))
(if (<= M 0.0011) t_0 t_1))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((pow(m, 2.0) * -0.25));
double t_1 = exp(-pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_1;
} else if (M <= -6.5e-208) {
tmp = t_0;
} else if (M <= -8.5e-268) {
tmp = K * (0.5 * (m * sin(M)));
} else if (M <= 0.0011) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp(((m ** 2.0d0) * (-0.25d0)))
t_1 = exp(-(m_1 ** 2.0d0))
if (m_1 <= (-42000000.0d0)) then
tmp = t_1
else if (m_1 <= (-6.5d-208)) then
tmp = t_0
else if (m_1 <= (-8.5d-268)) then
tmp = k * (0.5d0 * (m * sin(m_1)))
else if (m_1 <= 0.0011d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((Math.pow(m, 2.0) * -0.25));
double t_1 = Math.exp(-Math.pow(M, 2.0));
double tmp;
if (M <= -42000000.0) {
tmp = t_1;
} else if (M <= -6.5e-208) {
tmp = t_0;
} else if (M <= -8.5e-268) {
tmp = K * (0.5 * (m * Math.sin(M)));
} else if (M <= 0.0011) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((math.pow(m, 2.0) * -0.25)) t_1 = math.exp(-math.pow(M, 2.0)) tmp = 0 if M <= -42000000.0: tmp = t_1 elif M <= -6.5e-208: tmp = t_0 elif M <= -8.5e-268: tmp = K * (0.5 * (m * math.sin(M))) elif M <= 0.0011: tmp = t_0 else: tmp = t_1 return tmp
function code(K, m, n, M, l) t_0 = exp(Float64((m ^ 2.0) * -0.25)) t_1 = exp(Float64(-(M ^ 2.0))) tmp = 0.0 if (M <= -42000000.0) tmp = t_1; elseif (M <= -6.5e-208) tmp = t_0; elseif (M <= -8.5e-268) tmp = Float64(K * Float64(0.5 * Float64(m * sin(M)))); elseif (M <= 0.0011) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp(((m ^ 2.0) * -0.25)); t_1 = exp(-(M ^ 2.0)); tmp = 0.0; if (M <= -42000000.0) tmp = t_1; elseif (M <= -6.5e-208) tmp = t_0; elseif (M <= -8.5e-268) tmp = K * (0.5 * (m * sin(M))); elseif (M <= 0.0011) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[(-N[Power[M, 2.0], $MachinePrecision])], $MachinePrecision]}, If[LessEqual[M, -42000000.0], t$95$1, If[LessEqual[M, -6.5e-208], t$95$0, If[LessEqual[M, -8.5e-268], N[(K * N[(0.5 * N[(m * N[Sin[M], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 0.0011], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{{m}^{2} \cdot -0.25}\\
t_1 := e^{-{M}^{2}}\\
\mathbf{if}\;M \leq -42000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;M \leq -6.5 \cdot 10^{-208}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq -8.5 \cdot 10^{-268}:\\
\;\;\;\;K \cdot \left(0.5 \cdot \left(m \cdot \sin M\right)\right)\\
\mathbf{elif}\;M \leq 0.0011:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if M < -4.2e7 or 0.00110000000000000007 < M Initial program 77.6%
Taylor expanded in n around 0 65.8%
+-commutative65.8%
unpow265.8%
distribute-rgt-out70.3%
*-commutative70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in K around 0 70.4%
cos-neg70.4%
associate-*r*70.4%
sin-neg70.4%
Simplified70.4%
Taylor expanded in M around 0 86.8%
Taylor expanded in M around inf 99.3%
mul-1-neg77.6%
Simplified99.3%
if -4.2e7 < M < -6.4999999999999998e-208 or -8.50000000000000052e-268 < M < 0.00110000000000000007Initial program 79.3%
Taylor expanded in n around 0 56.6%
+-commutative56.6%
unpow256.6%
distribute-rgt-out62.1%
*-commutative62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in K around 0 67.4%
cos-neg67.4%
associate-*r*67.4%
sin-neg67.4%
Simplified67.4%
Taylor expanded in M around 0 71.0%
associate--r+71.0%
fabs-sub71.0%
associate-*r*71.0%
Simplified71.0%
Taylor expanded in m around inf 63.4%
*-commutative63.4%
Simplified63.4%
if -6.4999999999999998e-208 < M < -8.50000000000000052e-268Initial program 92.3%
Taylor expanded in n around 0 84.7%
+-commutative84.7%
unpow284.7%
distribute-rgt-out84.7%
*-commutative84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in l around inf 55.0%
mul-1-neg55.0%
Simplified55.0%
Taylor expanded in l around 0 10.3%
Taylor expanded in m around 0 9.9%
Taylor expanded in K around 0 9.9%
cos-neg9.9%
Simplified9.9%
Taylor expanded in K around 0 10.2%
associate-*r*10.2%
sin-neg10.2%
Simplified10.2%
Taylor expanded in K around inf 47.5%
associate-*r*47.5%
*-commutative47.5%
associate-*l*47.5%
Simplified47.5%
Final simplification81.4%
(FPCore (K m n M l) :precision binary64 (if (<= m -2.6e+127) (exp (* (pow m 2.0) -0.25)) (exp (+ (* (- (* 0.5 n) M) (- (- M (* 0.5 n)) m)) (- (fabs (- m n)) l)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (m <= -2.6e+127) {
tmp = exp((pow(m, 2.0) * -0.25));
} else {
tmp = exp(((((0.5 * n) - M) * ((M - (0.5 * n)) - m)) + (fabs((m - n)) - l)));
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: tmp
if (m <= (-2.6d+127)) then
tmp = exp(((m ** 2.0d0) * (-0.25d0)))
else
tmp = exp(((((0.5d0 * n) - m_1) * ((m_1 - (0.5d0 * n)) - m)) + (abs((m - n)) - l)))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (m <= -2.6e+127) {
tmp = Math.exp((Math.pow(m, 2.0) * -0.25));
} else {
tmp = Math.exp(((((0.5 * n) - M) * ((M - (0.5 * n)) - m)) + (Math.abs((m - n)) - l)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if m <= -2.6e+127: tmp = math.exp((math.pow(m, 2.0) * -0.25)) else: tmp = math.exp(((((0.5 * n) - M) * ((M - (0.5 * n)) - m)) + (math.fabs((m - n)) - l))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (m <= -2.6e+127) tmp = exp(Float64((m ^ 2.0) * -0.25)); else tmp = exp(Float64(Float64(Float64(Float64(0.5 * n) - M) * Float64(Float64(M - Float64(0.5 * n)) - m)) + Float64(abs(Float64(m - n)) - l))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (m <= -2.6e+127) tmp = exp(((m ^ 2.0) * -0.25)); else tmp = exp(((((0.5 * n) - M) * ((M - (0.5 * n)) - m)) + (abs((m - n)) - l))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[m, -2.6e+127], N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(N[(N[(0.5 * n), $MachinePrecision] - M), $MachinePrecision] * N[(N[(M - N[(0.5 * n), $MachinePrecision]), $MachinePrecision] - m), $MachinePrecision]), $MachinePrecision] + N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2.6 \cdot 10^{+127}:\\
\;\;\;\;e^{{m}^{2} \cdot -0.25}\\
\mathbf{else}:\\
\;\;\;\;e^{\left(0.5 \cdot n - M\right) \cdot \left(\left(M - 0.5 \cdot n\right) - m\right) + \left(\left|m - n\right| - \ell\right)}\\
\end{array}
\end{array}
if m < -2.6000000000000002e127Initial program 64.3%
Taylor expanded in n around 0 52.4%
+-commutative52.4%
unpow252.4%
distribute-rgt-out61.9%
*-commutative61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in K around 0 71.5%
cos-neg71.5%
associate-*r*71.5%
sin-neg71.5%
Simplified71.5%
Taylor expanded in M around 0 97.7%
associate--r+97.7%
fabs-sub97.7%
associate-*r*97.7%
Simplified97.7%
Taylor expanded in m around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -2.6000000000000002e127 < m Initial program 82.0%
Taylor expanded in m around inf 89.9%
*-commutative89.9%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in K around 0 95.8%
Taylor expanded in m around 0 77.3%
+-commutative77.3%
unpow277.3%
distribute-rgt-out82.9%
*-commutative82.9%
*-commutative82.9%
Simplified82.9%
Final simplification85.7%
(FPCore (K m n M l) :precision binary64 (if (<= m -54.0) (exp (* (pow m 2.0) -0.25)) (exp (+ (* (- (* 0.5 m) M) (- (- M (* 0.5 m)) n)) (- (fabs (- m n)) l)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (m <= -54.0) {
tmp = exp((pow(m, 2.0) * -0.25));
} else {
tmp = exp(((((0.5 * m) - M) * ((M - (0.5 * m)) - n)) + (fabs((m - n)) - l)));
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: tmp
if (m <= (-54.0d0)) then
tmp = exp(((m ** 2.0d0) * (-0.25d0)))
else
tmp = exp(((((0.5d0 * m) - m_1) * ((m_1 - (0.5d0 * m)) - n)) + (abs((m - n)) - l)))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (m <= -54.0) {
tmp = Math.exp((Math.pow(m, 2.0) * -0.25));
} else {
tmp = Math.exp(((((0.5 * m) - M) * ((M - (0.5 * m)) - n)) + (Math.abs((m - n)) - l)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if m <= -54.0: tmp = math.exp((math.pow(m, 2.0) * -0.25)) else: tmp = math.exp(((((0.5 * m) - M) * ((M - (0.5 * m)) - n)) + (math.fabs((m - n)) - l))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (m <= -54.0) tmp = exp(Float64((m ^ 2.0) * -0.25)); else tmp = exp(Float64(Float64(Float64(Float64(0.5 * m) - M) * Float64(Float64(M - Float64(0.5 * m)) - n)) + Float64(abs(Float64(m - n)) - l))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (m <= -54.0) tmp = exp(((m ^ 2.0) * -0.25)); else tmp = exp(((((0.5 * m) - M) * ((M - (0.5 * m)) - n)) + (abs((m - n)) - l))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[m, -54.0], N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(N[(N[(0.5 * m), $MachinePrecision] - M), $MachinePrecision] * N[(N[(M - N[(0.5 * m), $MachinePrecision]), $MachinePrecision] - n), $MachinePrecision]), $MachinePrecision] + N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -54:\\
\;\;\;\;e^{{m}^{2} \cdot -0.25}\\
\mathbf{else}:\\
\;\;\;\;e^{\left(0.5 \cdot m - M\right) \cdot \left(\left(M - 0.5 \cdot m\right) - n\right) + \left(\left|m - n\right| - \ell\right)}\\
\end{array}
\end{array}
if m < -54Initial program 70.4%
Taylor expanded in n around 0 57.8%
+-commutative57.8%
unpow257.8%
distribute-rgt-out63.5%
*-commutative63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in K around 0 70.6%
cos-neg70.6%
associate-*r*70.6%
sin-neg70.6%
Simplified70.6%
Taylor expanded in M around 0 90.3%
associate--r+90.3%
fabs-sub90.3%
associate-*r*90.3%
Simplified90.3%
Taylor expanded in m around inf 98.6%
*-commutative98.6%
Simplified98.6%
if -54 < m Initial program 82.4%
Taylor expanded in n around 0 64.8%
+-commutative64.8%
unpow264.8%
distribute-rgt-out69.1%
*-commutative69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in K around 0 69.5%
cos-neg69.5%
associate-*r*69.5%
sin-neg69.5%
Simplified69.5%
Taylor expanded in M around 0 76.5%
Final simplification82.7%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* n (- M (* 0.5 m))))) (t_1 (exp (* n (* m -0.5)))))
(if (<= l -720.0)
(exp l)
(if (<= l -8.6e-51)
t_1
(if (<= l -3.9e-84)
(* K (* 0.5 (* m (sin M))))
(if (<= l -3.3e-93)
t_0
(if (<= l -2e-169)
t_1
(if (<= l -9e-218)
t_0
(if (<= l 3.35e-301)
(* (* K -0.5) (* m (sin (* n (* 0.5 K)))))
(if (<= l 5.8e-15) t_0 (exp (- l))))))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((n * (M - (0.5 * m))));
double t_1 = exp((n * (m * -0.5)));
double tmp;
if (l <= -720.0) {
tmp = exp(l);
} else if (l <= -8.6e-51) {
tmp = t_1;
} else if (l <= -3.9e-84) {
tmp = K * (0.5 * (m * sin(M)));
} else if (l <= -3.3e-93) {
tmp = t_0;
} else if (l <= -2e-169) {
tmp = t_1;
} else if (l <= -9e-218) {
tmp = t_0;
} else if (l <= 3.35e-301) {
tmp = (K * -0.5) * (m * sin((n * (0.5 * K))));
} else if (l <= 5.8e-15) {
tmp = t_0;
} else {
tmp = exp(-l);
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp((n * (m_1 - (0.5d0 * m))))
t_1 = exp((n * (m * (-0.5d0))))
if (l <= (-720.0d0)) then
tmp = exp(l)
else if (l <= (-8.6d-51)) then
tmp = t_1
else if (l <= (-3.9d-84)) then
tmp = k * (0.5d0 * (m * sin(m_1)))
else if (l <= (-3.3d-93)) then
tmp = t_0
else if (l <= (-2d-169)) then
tmp = t_1
else if (l <= (-9d-218)) then
tmp = t_0
else if (l <= 3.35d-301) then
tmp = (k * (-0.5d0)) * (m * sin((n * (0.5d0 * k))))
else if (l <= 5.8d-15) then
tmp = t_0
else
tmp = exp(-l)
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((n * (M - (0.5 * m))));
double t_1 = Math.exp((n * (m * -0.5)));
double tmp;
if (l <= -720.0) {
tmp = Math.exp(l);
} else if (l <= -8.6e-51) {
tmp = t_1;
} else if (l <= -3.9e-84) {
tmp = K * (0.5 * (m * Math.sin(M)));
} else if (l <= -3.3e-93) {
tmp = t_0;
} else if (l <= -2e-169) {
tmp = t_1;
} else if (l <= -9e-218) {
tmp = t_0;
} else if (l <= 3.35e-301) {
tmp = (K * -0.5) * (m * Math.sin((n * (0.5 * K))));
} else if (l <= 5.8e-15) {
tmp = t_0;
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((n * (M - (0.5 * m)))) t_1 = math.exp((n * (m * -0.5))) tmp = 0 if l <= -720.0: tmp = math.exp(l) elif l <= -8.6e-51: tmp = t_1 elif l <= -3.9e-84: tmp = K * (0.5 * (m * math.sin(M))) elif l <= -3.3e-93: tmp = t_0 elif l <= -2e-169: tmp = t_1 elif l <= -9e-218: tmp = t_0 elif l <= 3.35e-301: tmp = (K * -0.5) * (m * math.sin((n * (0.5 * K)))) elif l <= 5.8e-15: tmp = t_0 else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) t_0 = exp(Float64(n * Float64(M - Float64(0.5 * m)))) t_1 = exp(Float64(n * Float64(m * -0.5))) tmp = 0.0 if (l <= -720.0) tmp = exp(l); elseif (l <= -8.6e-51) tmp = t_1; elseif (l <= -3.9e-84) tmp = Float64(K * Float64(0.5 * Float64(m * sin(M)))); elseif (l <= -3.3e-93) tmp = t_0; elseif (l <= -2e-169) tmp = t_1; elseif (l <= -9e-218) tmp = t_0; elseif (l <= 3.35e-301) tmp = Float64(Float64(K * -0.5) * Float64(m * sin(Float64(n * Float64(0.5 * K))))); elseif (l <= 5.8e-15) tmp = t_0; else tmp = exp(Float64(-l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp((n * (M - (0.5 * m)))); t_1 = exp((n * (m * -0.5))); tmp = 0.0; if (l <= -720.0) tmp = exp(l); elseif (l <= -8.6e-51) tmp = t_1; elseif (l <= -3.9e-84) tmp = K * (0.5 * (m * sin(M))); elseif (l <= -3.3e-93) tmp = t_0; elseif (l <= -2e-169) tmp = t_1; elseif (l <= -9e-218) tmp = t_0; elseif (l <= 3.35e-301) tmp = (K * -0.5) * (m * sin((n * (0.5 * K)))); elseif (l <= 5.8e-15) tmp = t_0; else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(n * N[(M - N[(0.5 * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(n * N[(m * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -720.0], N[Exp[l], $MachinePrecision], If[LessEqual[l, -8.6e-51], t$95$1, If[LessEqual[l, -3.9e-84], N[(K * N[(0.5 * N[(m * N[Sin[M], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -3.3e-93], t$95$0, If[LessEqual[l, -2e-169], t$95$1, If[LessEqual[l, -9e-218], t$95$0, If[LessEqual[l, 3.35e-301], N[(N[(K * -0.5), $MachinePrecision] * N[(m * N[Sin[N[(n * N[(0.5 * K), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5.8e-15], t$95$0, N[Exp[(-l)], $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{n \cdot \left(M - 0.5 \cdot m\right)}\\
t_1 := e^{n \cdot \left(m \cdot -0.5\right)}\\
\mathbf{if}\;\ell \leq -720:\\
\;\;\;\;e^{\ell}\\
\mathbf{elif}\;\ell \leq -8.6 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\ell \leq -3.9 \cdot 10^{-84}:\\
\;\;\;\;K \cdot \left(0.5 \cdot \left(m \cdot \sin M\right)\right)\\
\mathbf{elif}\;\ell \leq -3.3 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq -2 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\ell \leq -9 \cdot 10^{-218}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 3.35 \cdot 10^{-301}:\\
\;\;\;\;\left(K \cdot -0.5\right) \cdot \left(m \cdot \sin \left(n \cdot \left(0.5 \cdot K\right)\right)\right)\\
\mathbf{elif}\;\ell \leq 5.8 \cdot 10^{-15}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < -720Initial program 75.4%
Taylor expanded in n around 0 63.2%
+-commutative63.2%
unpow263.2%
distribute-rgt-out72.0%
*-commutative72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in l around inf 15.0%
mul-1-neg15.0%
Simplified15.0%
Taylor expanded in K around 0 10.0%
cos-neg10.0%
*-commutative10.0%
Simplified10.0%
pow110.0%
add-sqr-sqrt10.0%
sqrt-unprod10.0%
sqr-neg10.0%
sqrt-unprod0.0%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
unpow181.0%
cos-neg81.0%
*-commutative81.0%
cos-neg81.0%
Simplified81.0%
Taylor expanded in M around 0 81.0%
if -720 < l < -8.5999999999999995e-51 or -3.3000000000000001e-93 < l < -2.00000000000000004e-169Initial program 73.7%
Taylor expanded in n around 0 42.6%
+-commutative42.6%
unpow242.6%
distribute-rgt-out42.6%
*-commutative42.6%
*-commutative42.6%
Simplified42.6%
Taylor expanded in K around 0 42.7%
cos-neg42.7%
associate-*r*42.7%
sin-neg42.7%
Simplified42.7%
Taylor expanded in M around 0 63.8%
associate--r+63.8%
fabs-sub63.8%
associate-*r*63.8%
Simplified63.8%
Taylor expanded in n around inf 69.2%
associate-*r*69.2%
metadata-eval69.2%
distribute-lft-neg-in69.2%
distribute-lft-neg-out69.2%
*-commutative69.2%
distribute-rgt-neg-out69.2%
distribute-lft-neg-in69.2%
metadata-eval69.2%
Simplified69.2%
if -8.5999999999999995e-51 < l < -3.90000000000000023e-84Initial program 87.9%
Taylor expanded in n around 0 81.3%
+-commutative81.3%
unpow281.3%
distribute-rgt-out81.3%
*-commutative81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in l around inf 10.4%
mul-1-neg10.4%
Simplified10.4%
Taylor expanded in l around 0 10.4%
Taylor expanded in m around 0 9.1%
Taylor expanded in K around 0 9.1%
cos-neg9.1%
Simplified9.1%
Taylor expanded in K around 0 9.2%
associate-*r*9.2%
sin-neg9.2%
Simplified9.2%
Taylor expanded in K around inf 29.1%
associate-*r*29.1%
*-commutative29.1%
associate-*l*29.1%
Simplified29.1%
if -3.90000000000000023e-84 < l < -3.3000000000000001e-93 or -2.00000000000000004e-169 < l < -8.99999999999999953e-218 or 3.35000000000000011e-301 < l < 5.80000000000000037e-15Initial program 82.9%
Taylor expanded in n around 0 61.7%
+-commutative61.7%
unpow261.7%
distribute-rgt-out67.4%
*-commutative67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in K around 0 71.8%
cos-neg71.8%
associate-*r*71.8%
sin-neg71.8%
Simplified71.8%
Taylor expanded in M around 0 78.9%
Taylor expanded in n around inf 45.4%
if -8.99999999999999953e-218 < l < 3.35000000000000011e-301Initial program 67.9%
Taylor expanded in n around 0 49.2%
+-commutative49.2%
unpow249.2%
distribute-rgt-out49.2%
*-commutative49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in l around inf 3.3%
mul-1-neg3.3%
Simplified3.3%
Taylor expanded in l around 0 3.3%
Taylor expanded in m around 0 2.4%
Taylor expanded in K around 0 2.4%
cos-neg2.4%
Simplified2.4%
Taylor expanded in K around inf 16.6%
associate-*r*16.6%
associate-*r*16.6%
*-commutative16.6%
*-commutative16.6%
*-commutative16.6%
Simplified16.6%
Taylor expanded in M around 0 30.8%
associate-*r*30.8%
*-commutative30.8%
*-commutative30.8%
Simplified30.8%
if 5.80000000000000037e-15 < l Initial program 81.1%
Taylor expanded in n around 0 69.0%
+-commutative69.0%
unpow269.0%
distribute-rgt-out73.1%
*-commutative73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in K around 0 75.9%
cos-neg75.9%
associate-*r*75.9%
sin-neg75.9%
Simplified75.9%
Taylor expanded in M around 0 82.7%
associate--r+82.7%
fabs-sub82.7%
associate-*r*82.7%
Simplified82.7%
Taylor expanded in l around inf 92.1%
mul-1-neg92.1%
Simplified92.1%
Final simplification66.5%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* n (- M (* 0.5 m))))) (t_1 (exp (* n (* m -0.5)))))
(if (<= l -720.0)
(exp l)
(if (<= l -1.5e-48)
t_1
(if (<= l -3.3e-84)
(* K (* 0.5 (* m (sin M))))
(if (<= l -1.45e-93)
t_0
(if (<= l -2e-169)
t_1
(if (<= l -9e-218)
t_0
(if (<= l 4.6e-304)
(* -0.5 (* (sin (* n (* 0.5 K))) (* m K)))
(if (<= l 5.8e-15) t_0 (exp (- l))))))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((n * (M - (0.5 * m))));
double t_1 = exp((n * (m * -0.5)));
double tmp;
if (l <= -720.0) {
tmp = exp(l);
} else if (l <= -1.5e-48) {
tmp = t_1;
} else if (l <= -3.3e-84) {
tmp = K * (0.5 * (m * sin(M)));
} else if (l <= -1.45e-93) {
tmp = t_0;
} else if (l <= -2e-169) {
tmp = t_1;
} else if (l <= -9e-218) {
tmp = t_0;
} else if (l <= 4.6e-304) {
tmp = -0.5 * (sin((n * (0.5 * K))) * (m * K));
} else if (l <= 5.8e-15) {
tmp = t_0;
} else {
tmp = exp(-l);
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp((n * (m_1 - (0.5d0 * m))))
t_1 = exp((n * (m * (-0.5d0))))
if (l <= (-720.0d0)) then
tmp = exp(l)
else if (l <= (-1.5d-48)) then
tmp = t_1
else if (l <= (-3.3d-84)) then
tmp = k * (0.5d0 * (m * sin(m_1)))
else if (l <= (-1.45d-93)) then
tmp = t_0
else if (l <= (-2d-169)) then
tmp = t_1
else if (l <= (-9d-218)) then
tmp = t_0
else if (l <= 4.6d-304) then
tmp = (-0.5d0) * (sin((n * (0.5d0 * k))) * (m * k))
else if (l <= 5.8d-15) then
tmp = t_0
else
tmp = exp(-l)
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.exp((n * (M - (0.5 * m))));
double t_1 = Math.exp((n * (m * -0.5)));
double tmp;
if (l <= -720.0) {
tmp = Math.exp(l);
} else if (l <= -1.5e-48) {
tmp = t_1;
} else if (l <= -3.3e-84) {
tmp = K * (0.5 * (m * Math.sin(M)));
} else if (l <= -1.45e-93) {
tmp = t_0;
} else if (l <= -2e-169) {
tmp = t_1;
} else if (l <= -9e-218) {
tmp = t_0;
} else if (l <= 4.6e-304) {
tmp = -0.5 * (Math.sin((n * (0.5 * K))) * (m * K));
} else if (l <= 5.8e-15) {
tmp = t_0;
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((n * (M - (0.5 * m)))) t_1 = math.exp((n * (m * -0.5))) tmp = 0 if l <= -720.0: tmp = math.exp(l) elif l <= -1.5e-48: tmp = t_1 elif l <= -3.3e-84: tmp = K * (0.5 * (m * math.sin(M))) elif l <= -1.45e-93: tmp = t_0 elif l <= -2e-169: tmp = t_1 elif l <= -9e-218: tmp = t_0 elif l <= 4.6e-304: tmp = -0.5 * (math.sin((n * (0.5 * K))) * (m * K)) elif l <= 5.8e-15: tmp = t_0 else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) t_0 = exp(Float64(n * Float64(M - Float64(0.5 * m)))) t_1 = exp(Float64(n * Float64(m * -0.5))) tmp = 0.0 if (l <= -720.0) tmp = exp(l); elseif (l <= -1.5e-48) tmp = t_1; elseif (l <= -3.3e-84) tmp = Float64(K * Float64(0.5 * Float64(m * sin(M)))); elseif (l <= -1.45e-93) tmp = t_0; elseif (l <= -2e-169) tmp = t_1; elseif (l <= -9e-218) tmp = t_0; elseif (l <= 4.6e-304) tmp = Float64(-0.5 * Float64(sin(Float64(n * Float64(0.5 * K))) * Float64(m * K))); elseif (l <= 5.8e-15) tmp = t_0; else tmp = exp(Float64(-l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp((n * (M - (0.5 * m)))); t_1 = exp((n * (m * -0.5))); tmp = 0.0; if (l <= -720.0) tmp = exp(l); elseif (l <= -1.5e-48) tmp = t_1; elseif (l <= -3.3e-84) tmp = K * (0.5 * (m * sin(M))); elseif (l <= -1.45e-93) tmp = t_0; elseif (l <= -2e-169) tmp = t_1; elseif (l <= -9e-218) tmp = t_0; elseif (l <= 4.6e-304) tmp = -0.5 * (sin((n * (0.5 * K))) * (m * K)); elseif (l <= 5.8e-15) tmp = t_0; else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(n * N[(M - N[(0.5 * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(n * N[(m * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -720.0], N[Exp[l], $MachinePrecision], If[LessEqual[l, -1.5e-48], t$95$1, If[LessEqual[l, -3.3e-84], N[(K * N[(0.5 * N[(m * N[Sin[M], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1.45e-93], t$95$0, If[LessEqual[l, -2e-169], t$95$1, If[LessEqual[l, -9e-218], t$95$0, If[LessEqual[l, 4.6e-304], N[(-0.5 * N[(N[Sin[N[(n * N[(0.5 * K), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(m * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5.8e-15], t$95$0, N[Exp[(-l)], $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{n \cdot \left(M - 0.5 \cdot m\right)}\\
t_1 := e^{n \cdot \left(m \cdot -0.5\right)}\\
\mathbf{if}\;\ell \leq -720:\\
\;\;\;\;e^{\ell}\\
\mathbf{elif}\;\ell \leq -1.5 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\ell \leq -3.3 \cdot 10^{-84}:\\
\;\;\;\;K \cdot \left(0.5 \cdot \left(m \cdot \sin M\right)\right)\\
\mathbf{elif}\;\ell \leq -1.45 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq -2 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\ell \leq -9 \cdot 10^{-218}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 4.6 \cdot 10^{-304}:\\
\;\;\;\;-0.5 \cdot \left(\sin \left(n \cdot \left(0.5 \cdot K\right)\right) \cdot \left(m \cdot K\right)\right)\\
\mathbf{elif}\;\ell \leq 5.8 \cdot 10^{-15}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < -720Initial program 75.4%
Taylor expanded in n around 0 63.2%
+-commutative63.2%
unpow263.2%
distribute-rgt-out72.0%
*-commutative72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in l around inf 15.0%
mul-1-neg15.0%
Simplified15.0%
Taylor expanded in K around 0 10.0%
cos-neg10.0%
*-commutative10.0%
Simplified10.0%
pow110.0%
add-sqr-sqrt10.0%
sqrt-unprod10.0%
sqr-neg10.0%
sqrt-unprod0.0%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
unpow181.0%
cos-neg81.0%
*-commutative81.0%
cos-neg81.0%
Simplified81.0%
Taylor expanded in M around 0 81.0%
if -720 < l < -1.5e-48 or -1.4499999999999999e-93 < l < -2.00000000000000004e-169Initial program 73.7%
Taylor expanded in n around 0 42.6%
+-commutative42.6%
unpow242.6%
distribute-rgt-out42.6%
*-commutative42.6%
*-commutative42.6%
Simplified42.6%
Taylor expanded in K around 0 42.7%
cos-neg42.7%
associate-*r*42.7%
sin-neg42.7%
Simplified42.7%
Taylor expanded in M around 0 63.8%
associate--r+63.8%
fabs-sub63.8%
associate-*r*63.8%
Simplified63.8%
Taylor expanded in n around inf 69.2%
associate-*r*69.2%
metadata-eval69.2%
distribute-lft-neg-in69.2%
distribute-lft-neg-out69.2%
*-commutative69.2%
distribute-rgt-neg-out69.2%
distribute-lft-neg-in69.2%
metadata-eval69.2%
Simplified69.2%
if -1.5e-48 < l < -3.29999999999999984e-84Initial program 87.9%
Taylor expanded in n around 0 81.3%
+-commutative81.3%
unpow281.3%
distribute-rgt-out81.3%
*-commutative81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in l around inf 10.4%
mul-1-neg10.4%
Simplified10.4%
Taylor expanded in l around 0 10.4%
Taylor expanded in m around 0 9.1%
Taylor expanded in K around 0 9.1%
cos-neg9.1%
Simplified9.1%
Taylor expanded in K around 0 9.2%
associate-*r*9.2%
sin-neg9.2%
Simplified9.2%
Taylor expanded in K around inf 29.1%
associate-*r*29.1%
*-commutative29.1%
associate-*l*29.1%
Simplified29.1%
if -3.29999999999999984e-84 < l < -1.4499999999999999e-93 or -2.00000000000000004e-169 < l < -8.99999999999999953e-218 or 4.5999999999999999e-304 < l < 5.80000000000000037e-15Initial program 82.9%
Taylor expanded in n around 0 61.7%
+-commutative61.7%
unpow261.7%
distribute-rgt-out67.4%
*-commutative67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in K around 0 71.8%
cos-neg71.8%
associate-*r*71.8%
sin-neg71.8%
Simplified71.8%
Taylor expanded in M around 0 78.9%
Taylor expanded in n around inf 45.4%
if -8.99999999999999953e-218 < l < 4.5999999999999999e-304Initial program 67.9%
Taylor expanded in n around 0 49.2%
+-commutative49.2%
unpow249.2%
distribute-rgt-out49.2%
*-commutative49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in l around inf 3.3%
mul-1-neg3.3%
Simplified3.3%
Taylor expanded in l around 0 3.3%
Taylor expanded in m around 0 2.4%
Taylor expanded in K around 0 2.4%
cos-neg2.4%
Simplified2.4%
Taylor expanded in K around inf 16.6%
associate-*r*16.6%
associate-*r*16.6%
*-commutative16.6%
*-commutative16.6%
*-commutative16.6%
Simplified16.6%
Taylor expanded in M around 0 30.8%
associate-*r*30.8%
associate-*r*30.8%
*-commutative30.8%
*-commutative30.8%
Simplified30.8%
if 5.80000000000000037e-15 < l Initial program 81.1%
Taylor expanded in n around 0 69.0%
+-commutative69.0%
unpow269.0%
distribute-rgt-out73.1%
*-commutative73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in K around 0 75.9%
cos-neg75.9%
associate-*r*75.9%
sin-neg75.9%
Simplified75.9%
Taylor expanded in M around 0 82.7%
associate--r+82.7%
fabs-sub82.7%
associate-*r*82.7%
Simplified82.7%
Taylor expanded in l around inf 92.1%
mul-1-neg92.1%
Simplified92.1%
Final simplification66.5%
(FPCore (K m n M l)
:precision binary64
(if (<= l -720.0)
(exp l)
(if (<= l -8e-51)
(exp (* n (* m -0.5)))
(if (<= l -6.2e-84)
(* K (* 0.5 (* m (sin M))))
(if (<= l 3.6e-18) (exp (* n (- M (* 0.5 m)))) (exp (- l)))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -720.0) {
tmp = exp(l);
} else if (l <= -8e-51) {
tmp = exp((n * (m * -0.5)));
} else if (l <= -6.2e-84) {
tmp = K * (0.5 * (m * sin(M)));
} else if (l <= 3.6e-18) {
tmp = exp((n * (M - (0.5 * m))));
} else {
tmp = exp(-l);
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-720.0d0)) then
tmp = exp(l)
else if (l <= (-8d-51)) then
tmp = exp((n * (m * (-0.5d0))))
else if (l <= (-6.2d-84)) then
tmp = k * (0.5d0 * (m * sin(m_1)))
else if (l <= 3.6d-18) then
tmp = exp((n * (m_1 - (0.5d0 * m))))
else
tmp = exp(-l)
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -720.0) {
tmp = Math.exp(l);
} else if (l <= -8e-51) {
tmp = Math.exp((n * (m * -0.5)));
} else if (l <= -6.2e-84) {
tmp = K * (0.5 * (m * Math.sin(M)));
} else if (l <= 3.6e-18) {
tmp = Math.exp((n * (M - (0.5 * m))));
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= -720.0: tmp = math.exp(l) elif l <= -8e-51: tmp = math.exp((n * (m * -0.5))) elif l <= -6.2e-84: tmp = K * (0.5 * (m * math.sin(M))) elif l <= 3.6e-18: tmp = math.exp((n * (M - (0.5 * m)))) else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= -720.0) tmp = exp(l); elseif (l <= -8e-51) tmp = exp(Float64(n * Float64(m * -0.5))); elseif (l <= -6.2e-84) tmp = Float64(K * Float64(0.5 * Float64(m * sin(M)))); elseif (l <= 3.6e-18) tmp = exp(Float64(n * Float64(M - Float64(0.5 * m)))); else tmp = exp(Float64(-l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (l <= -720.0) tmp = exp(l); elseif (l <= -8e-51) tmp = exp((n * (m * -0.5))); elseif (l <= -6.2e-84) tmp = K * (0.5 * (m * sin(M))); elseif (l <= 3.6e-18) tmp = exp((n * (M - (0.5 * m)))); else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, -720.0], N[Exp[l], $MachinePrecision], If[LessEqual[l, -8e-51], N[Exp[N[(n * N[(m * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -6.2e-84], N[(K * N[(0.5 * N[(m * N[Sin[M], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.6e-18], N[Exp[N[(n * N[(M - N[(0.5 * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[(-l)], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -720:\\
\;\;\;\;e^{\ell}\\
\mathbf{elif}\;\ell \leq -8 \cdot 10^{-51}:\\
\;\;\;\;e^{n \cdot \left(m \cdot -0.5\right)}\\
\mathbf{elif}\;\ell \leq -6.2 \cdot 10^{-84}:\\
\;\;\;\;K \cdot \left(0.5 \cdot \left(m \cdot \sin M\right)\right)\\
\mathbf{elif}\;\ell \leq 3.6 \cdot 10^{-18}:\\
\;\;\;\;e^{n \cdot \left(M - 0.5 \cdot m\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < -720Initial program 75.4%
Taylor expanded in n around 0 63.2%
+-commutative63.2%
unpow263.2%
distribute-rgt-out72.0%
*-commutative72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in l around inf 15.0%
mul-1-neg15.0%
Simplified15.0%
Taylor expanded in K around 0 10.0%
cos-neg10.0%
*-commutative10.0%
Simplified10.0%
pow110.0%
add-sqr-sqrt10.0%
sqrt-unprod10.0%
sqr-neg10.0%
sqrt-unprod0.0%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
unpow181.0%
cos-neg81.0%
*-commutative81.0%
cos-neg81.0%
Simplified81.0%
Taylor expanded in M around 0 81.0%
if -720 < l < -8.0000000000000001e-51Initial program 70.0%
Taylor expanded in n around 0 30.6%
+-commutative30.6%
unpow230.6%
distribute-rgt-out30.6%
*-commutative30.6%
*-commutative30.6%
Simplified30.6%
Taylor expanded in K around 0 30.6%
cos-neg30.6%
associate-*r*30.6%
sin-neg30.6%
Simplified30.6%
Taylor expanded in M around 0 60.6%
associate--r+60.6%
fabs-sub60.6%
associate-*r*60.6%
Simplified60.6%
Taylor expanded in n around inf 70.6%
associate-*r*70.6%
metadata-eval70.6%
distribute-lft-neg-in70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
distribute-rgt-neg-out70.6%
distribute-lft-neg-in70.6%
metadata-eval70.6%
Simplified70.6%
if -8.0000000000000001e-51 < l < -6.20000000000000003e-84Initial program 87.9%
Taylor expanded in n around 0 81.3%
+-commutative81.3%
unpow281.3%
distribute-rgt-out81.3%
*-commutative81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in l around inf 10.4%
mul-1-neg10.4%
Simplified10.4%
Taylor expanded in l around 0 10.4%
Taylor expanded in m around 0 9.1%
Taylor expanded in K around 0 9.1%
cos-neg9.1%
Simplified9.1%
Taylor expanded in K around 0 9.2%
associate-*r*9.2%
sin-neg9.2%
Simplified9.2%
Taylor expanded in K around inf 29.1%
associate-*r*29.1%
*-commutative29.1%
associate-*l*29.1%
Simplified29.1%
if -6.20000000000000003e-84 < l < 3.6000000000000001e-18Initial program 79.1%
Taylor expanded in n around 0 58.1%
+-commutative58.1%
unpow258.1%
distribute-rgt-out62.1%
*-commutative62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in K around 0 65.1%
cos-neg65.1%
associate-*r*65.1%
sin-neg65.1%
Simplified65.1%
Taylor expanded in M around 0 74.1%
Taylor expanded in n around inf 41.6%
if 3.6000000000000001e-18 < l Initial program 81.3%
Taylor expanded in n around 0 69.4%
+-commutative69.4%
unpow269.4%
distribute-rgt-out73.5%
*-commutative73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in K around 0 76.2%
cos-neg76.2%
associate-*r*76.2%
sin-neg76.2%
Simplified76.2%
Taylor expanded in M around 0 82.9%
associate--r+82.9%
fabs-sub82.9%
associate-*r*82.9%
Simplified82.9%
Taylor expanded in l around inf 91.0%
mul-1-neg91.0%
Simplified91.0%
Final simplification65.2%
(FPCore (K m n M l) :precision binary64 (if (<= l -720.0) (exp l) (if (<= l 3.5e-13) (exp (* n (* m -0.5))) (exp (- l)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -720.0) {
tmp = exp(l);
} else if (l <= 3.5e-13) {
tmp = exp((n * (m * -0.5)));
} else {
tmp = exp(-l);
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-720.0d0)) then
tmp = exp(l)
else if (l <= 3.5d-13) then
tmp = exp((n * (m * (-0.5d0))))
else
tmp = exp(-l)
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -720.0) {
tmp = Math.exp(l);
} else if (l <= 3.5e-13) {
tmp = Math.exp((n * (m * -0.5)));
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= -720.0: tmp = math.exp(l) elif l <= 3.5e-13: tmp = math.exp((n * (m * -0.5))) else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= -720.0) tmp = exp(l); elseif (l <= 3.5e-13) tmp = exp(Float64(n * Float64(m * -0.5))); else tmp = exp(Float64(-l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (l <= -720.0) tmp = exp(l); elseif (l <= 3.5e-13) tmp = exp((n * (m * -0.5))); else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, -720.0], N[Exp[l], $MachinePrecision], If[LessEqual[l, 3.5e-13], N[Exp[N[(n * N[(m * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[(-l)], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -720:\\
\;\;\;\;e^{\ell}\\
\mathbf{elif}\;\ell \leq 3.5 \cdot 10^{-13}:\\
\;\;\;\;e^{n \cdot \left(m \cdot -0.5\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < -720Initial program 75.4%
Taylor expanded in n around 0 63.2%
+-commutative63.2%
unpow263.2%
distribute-rgt-out72.0%
*-commutative72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in l around inf 15.0%
mul-1-neg15.0%
Simplified15.0%
Taylor expanded in K around 0 10.0%
cos-neg10.0%
*-commutative10.0%
Simplified10.0%
pow110.0%
add-sqr-sqrt10.0%
sqrt-unprod10.0%
sqr-neg10.0%
sqrt-unprod0.0%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
unpow181.0%
cos-neg81.0%
*-commutative81.0%
cos-neg81.0%
Simplified81.0%
Taylor expanded in M around 0 81.0%
if -720 < l < 3.5000000000000002e-13Initial program 79.7%
Taylor expanded in n around 0 59.4%
+-commutative59.4%
unpow259.4%
distribute-rgt-out62.5%
*-commutative62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in K around 0 65.5%
cos-neg65.5%
associate-*r*65.5%
sin-neg65.5%
Simplified65.5%
Taylor expanded in M around 0 54.9%
associate--r+54.9%
fabs-sub54.9%
associate-*r*54.9%
Simplified54.9%
Taylor expanded in n around inf 36.5%
associate-*r*36.5%
metadata-eval36.5%
distribute-lft-neg-in36.5%
distribute-lft-neg-out36.5%
*-commutative36.5%
distribute-rgt-neg-out36.5%
distribute-lft-neg-in36.5%
metadata-eval36.5%
Simplified36.5%
if 3.5000000000000002e-13 < l Initial program 80.8%
Taylor expanded in n around 0 68.6%
+-commutative68.6%
unpow268.6%
distribute-rgt-out72.7%
*-commutative72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in K around 0 75.6%
cos-neg75.6%
associate-*r*75.6%
sin-neg75.6%
Simplified75.6%
Taylor expanded in M around 0 82.5%
associate--r+82.5%
fabs-sub82.5%
associate-*r*82.5%
Simplified82.5%
Taylor expanded in l around inf 93.4%
mul-1-neg93.4%
Simplified93.4%
Final simplification62.6%
(FPCore (K m n M l) :precision binary64 (if (<= l -1720.0) (exp l) (exp (- l))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -1720.0) {
tmp = exp(l);
} else {
tmp = exp(-l);
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-1720.0d0)) then
tmp = exp(l)
else
tmp = exp(-l)
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -1720.0) {
tmp = Math.exp(l);
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= -1720.0: tmp = math.exp(l) else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= -1720.0) tmp = exp(l); else tmp = exp(Float64(-l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (l <= -1720.0) tmp = exp(l); else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, -1720.0], N[Exp[l], $MachinePrecision], N[Exp[(-l)], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1720:\\
\;\;\;\;e^{\ell}\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < -1720Initial program 76.8%
Taylor expanded in n around 0 64.3%
+-commutative64.3%
unpow264.3%
distribute-rgt-out73.3%
*-commutative73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in l around inf 15.3%
mul-1-neg15.3%
Simplified15.3%
Taylor expanded in K around 0 10.2%
cos-neg10.2%
*-commutative10.2%
Simplified10.2%
pow110.2%
add-sqr-sqrt10.2%
sqrt-unprod10.2%
sqr-neg10.2%
sqrt-unprod0.0%
add-sqr-sqrt80.7%
Applied egg-rr80.7%
unpow180.7%
cos-neg80.7%
*-commutative80.7%
cos-neg80.7%
Simplified80.7%
Taylor expanded in M around 0 80.7%
if -1720 < l Initial program 79.7%
Taylor expanded in n around 0 62.4%
+-commutative62.4%
unpow262.4%
distribute-rgt-out65.9%
*-commutative65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in K around 0 68.8%
cos-neg68.8%
associate-*r*68.8%
sin-neg68.8%
Simplified68.8%
Taylor expanded in M around 0 65.2%
associate--r+65.2%
fabs-sub65.2%
associate-*r*65.2%
Simplified65.2%
Taylor expanded in l around inf 40.4%
mul-1-neg40.4%
Simplified40.4%
(FPCore (K m n M l) :precision binary64 (exp l))
double code(double K, double m, double n, double M, double l) {
return exp(l);
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = exp(l)
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.exp(l);
}
def code(K, m, n, M, l): return math.exp(l)
function code(K, m, n, M, l) return exp(l) end
function tmp = code(K, m, n, M, l) tmp = exp(l); end
code[K_, m_, n_, M_, l_] := N[Exp[l], $MachinePrecision]
\begin{array}{l}
\\
e^{\ell}
\end{array}
Initial program 79.1%
Taylor expanded in n around 0 62.8%
+-commutative62.8%
unpow262.8%
distribute-rgt-out67.5%
*-commutative67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in l around inf 29.7%
mul-1-neg29.7%
Simplified29.7%
Taylor expanded in K around 0 33.8%
cos-neg33.8%
*-commutative33.8%
Simplified33.8%
pow133.8%
add-sqr-sqrt4.9%
sqrt-unprod7.6%
sqr-neg7.6%
sqrt-unprod2.7%
add-sqr-sqrt23.4%
Applied egg-rr23.4%
unpow123.4%
cos-neg23.4%
*-commutative23.4%
cos-neg23.4%
Simplified23.4%
Taylor expanded in M around 0 23.4%
(FPCore (K m n M l) :precision binary64 (cos M))
double code(double K, double m, double n, double M, double l) {
return cos(M);
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = cos(m_1)
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.cos(M);
}
def code(K, m, n, M, l): return math.cos(M)
function code(K, m, n, M, l) return cos(M) end
function tmp = code(K, m, n, M, l) tmp = cos(M); end
code[K_, m_, n_, M_, l_] := N[Cos[M], $MachinePrecision]
\begin{array}{l}
\\
\cos M
\end{array}
Initial program 79.1%
Taylor expanded in n around 0 62.8%
+-commutative62.8%
unpow262.8%
distribute-rgt-out67.5%
*-commutative67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in l around inf 29.7%
mul-1-neg29.7%
Simplified29.7%
Taylor expanded in l around 0 6.1%
Taylor expanded in K around 0 6.5%
cos-neg6.5%
Simplified6.5%
(FPCore (K m n M l) :precision binary64 1.0)
double code(double K, double m, double n, double M, double l) {
return 1.0;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = 1.0d0
end function
public static double code(double K, double m, double n, double M, double l) {
return 1.0;
}
def code(K, m, n, M, l): return 1.0
function code(K, m, n, M, l) return 1.0 end
function tmp = code(K, m, n, M, l) tmp = 1.0; end
code[K_, m_, n_, M_, l_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 79.1%
Taylor expanded in n around 0 62.8%
+-commutative62.8%
unpow262.8%
distribute-rgt-out67.5%
*-commutative67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in l around inf 29.7%
mul-1-neg29.7%
Simplified29.7%
Taylor expanded in l around 0 6.1%
Taylor expanded in M around inf 5.6%
Taylor expanded in M around 0 6.1%
associate-*r*6.1%
*-commutative6.1%
+-commutative6.1%
Simplified6.1%
Taylor expanded in n around inf 5.6%
distribute-lft-out5.6%
associate-/l*5.5%
Simplified5.5%
Taylor expanded in K around 0 6.5%
herbie shell --seed 2024107
(FPCore (K m n M l)
:name "Maksimov and Kolovsky, Equation (32)"
:precision binary64
(* (cos (- (/ (* K (+ m n)) 2.0) M)) (exp (- (- (pow (- (/ (+ m n) 2.0) M) 2.0)) (- l (fabs (- m n)))))))