
(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 10 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 n) 2.0) M) 2.0)))))
double code(double K, double m, double n, double M, double l) {
return cos(M) * 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 = cos(m_1) * 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.cos(M) * 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.cos(M) * math.exp(((math.fabs((m - n)) - l) - math.pow((((m + n) / 2.0) - M), 2.0)))
function code(K, m, n, M, l) return Float64(cos(M) * 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 = cos(M) * exp(((abs((m - n)) - l) - ((((m + n) / 2.0) - M) ^ 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[(N[(N[(m + n), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos M \cdot e^{\left(\left|m - n\right| - \ell\right) - {\left(\frac{m + n}{2} - M\right)}^{2}}
\end{array}
Initial program 74.7%
*-commutative74.7%
associate-*r/75.1%
associate--r-75.1%
+-commutative75.1%
associate-+r-75.1%
unsub-neg75.1%
associate--r+75.1%
+-commutative75.1%
associate--r+75.1%
Simplified75.1%
Taylor expanded in K around 0 96.4%
cos-neg96.4%
Simplified96.4%
Final simplification96.4%
(FPCore (K m n M l)
:precision binary64
(if (<= m -54.0)
(* (cos M) (exp (* (* m m) -0.25)))
(if (or (<= m -2.25e-248) (and (not (<= m 1.8e-297)) (<= m 1.75e-208)))
(* (cos M) (exp (- (- (fabs (- m n)) l) (* M M))))
(* (cos M) (exp (* -0.25 (* n n)))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (m <= -54.0) {
tmp = cos(M) * exp(((m * m) * -0.25));
} else if ((m <= -2.25e-248) || (!(m <= 1.8e-297) && (m <= 1.75e-208))) {
tmp = cos(M) * exp(((fabs((m - n)) - l) - (M * M)));
} else {
tmp = cos(M) * exp((-0.25 * (n * n)));
}
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 = cos(m_1) * exp(((m * m) * (-0.25d0)))
else if ((m <= (-2.25d-248)) .or. (.not. (m <= 1.8d-297)) .and. (m <= 1.75d-208)) then
tmp = cos(m_1) * exp(((abs((m - n)) - l) - (m_1 * m_1)))
else
tmp = cos(m_1) * exp(((-0.25d0) * (n * n)))
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.cos(M) * Math.exp(((m * m) * -0.25));
} else if ((m <= -2.25e-248) || (!(m <= 1.8e-297) && (m <= 1.75e-208))) {
tmp = Math.cos(M) * Math.exp(((Math.abs((m - n)) - l) - (M * M)));
} else {
tmp = Math.cos(M) * Math.exp((-0.25 * (n * n)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if m <= -54.0: tmp = math.cos(M) * math.exp(((m * m) * -0.25)) elif (m <= -2.25e-248) or (not (m <= 1.8e-297) and (m <= 1.75e-208)): tmp = math.cos(M) * math.exp(((math.fabs((m - n)) - l) - (M * M))) else: tmp = math.cos(M) * math.exp((-0.25 * (n * n))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (m <= -54.0) tmp = Float64(cos(M) * exp(Float64(Float64(m * m) * -0.25))); elseif ((m <= -2.25e-248) || (!(m <= 1.8e-297) && (m <= 1.75e-208))) tmp = Float64(cos(M) * exp(Float64(Float64(abs(Float64(m - n)) - l) - Float64(M * M)))); else tmp = Float64(cos(M) * exp(Float64(-0.25 * Float64(n * n)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (m <= -54.0) tmp = cos(M) * exp(((m * m) * -0.25)); elseif ((m <= -2.25e-248) || (~((m <= 1.8e-297)) && (m <= 1.75e-208))) tmp = cos(M) * exp(((abs((m - n)) - l) - (M * M))); else tmp = cos(M) * exp((-0.25 * (n * n))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[m, -54.0], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[(m * m), $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[m, -2.25e-248], And[N[Not[LessEqual[m, 1.8e-297]], $MachinePrecision], LessEqual[m, 1.75e-208]]], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(-0.25 * N[(n * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -54:\\
\;\;\;\;\cos M \cdot e^{\left(m \cdot m\right) \cdot -0.25}\\
\mathbf{elif}\;m \leq -2.25 \cdot 10^{-248} \lor \neg \left(m \leq 1.8 \cdot 10^{-297}\right) \land m \leq 1.75 \cdot 10^{-208}:\\
\;\;\;\;\cos M \cdot e^{\left(\left|m - n\right| - \ell\right) - M \cdot M}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{-0.25 \cdot \left(n \cdot n\right)}\\
\end{array}
\end{array}
if m < -54Initial program 75.3%
*-commutative75.3%
associate-*r/75.3%
associate--r-75.3%
+-commutative75.3%
associate-+r-75.3%
unsub-neg75.3%
associate--r+75.3%
+-commutative75.3%
associate--r+75.3%
Simplified75.3%
Taylor expanded in K around 0 98.7%
cos-neg98.7%
Simplified98.7%
Taylor expanded in m around inf 98.7%
*-commutative98.7%
unpow298.7%
Simplified98.7%
if -54 < m < -2.2499999999999998e-248 or 1.79999999999999997e-297 < m < 1.74999999999999996e-208Initial program 85.5%
*-commutative85.5%
associate-*r/85.5%
associate--r-85.5%
+-commutative85.5%
associate-+r-85.5%
unsub-neg85.5%
associate--r+85.5%
+-commutative85.5%
associate--r+85.5%
Simplified85.5%
Taylor expanded in K around 0 90.9%
cos-neg90.9%
Simplified90.9%
Taylor expanded in M around inf 72.7%
unpow272.7%
Simplified72.7%
if -2.2499999999999998e-248 < m < 1.79999999999999997e-297 or 1.74999999999999996e-208 < m Initial program 67.4%
*-commutative67.4%
associate-*r/68.3%
associate--r-68.3%
+-commutative68.3%
associate-+r-68.3%
unsub-neg68.3%
associate--r+68.3%
+-commutative68.3%
associate--r+68.3%
Simplified68.3%
Taylor expanded in K around 0 98.4%
cos-neg98.4%
Simplified98.4%
Taylor expanded in n around inf 60.8%
*-commutative60.8%
unpow260.8%
Simplified60.8%
Final simplification75.4%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (* (cos M) (exp (- (* M M))))))
(if (<= m -54.0)
(* (cos M) (exp (* (* m m) -0.25)))
(if (<= m -2.6e-56)
t_0
(if (<= m -3.3e-103)
(exp (- l))
(if (<= m -5e-237) t_0 (* (cos M) (exp (* -0.25 (* n n))))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = cos(M) * exp(-(M * M));
double tmp;
if (m <= -54.0) {
tmp = cos(M) * exp(((m * m) * -0.25));
} else if (m <= -2.6e-56) {
tmp = t_0;
} else if (m <= -3.3e-103) {
tmp = exp(-l);
} else if (m <= -5e-237) {
tmp = t_0;
} else {
tmp = cos(M) * exp((-0.25 * (n * n)));
}
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 = cos(m_1) * exp(-(m_1 * m_1))
if (m <= (-54.0d0)) then
tmp = cos(m_1) * exp(((m * m) * (-0.25d0)))
else if (m <= (-2.6d-56)) then
tmp = t_0
else if (m <= (-3.3d-103)) then
tmp = exp(-l)
else if (m <= (-5d-237)) then
tmp = t_0
else
tmp = cos(m_1) * exp(((-0.25d0) * (n * n)))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.cos(M) * Math.exp(-(M * M));
double tmp;
if (m <= -54.0) {
tmp = Math.cos(M) * Math.exp(((m * m) * -0.25));
} else if (m <= -2.6e-56) {
tmp = t_0;
} else if (m <= -3.3e-103) {
tmp = Math.exp(-l);
} else if (m <= -5e-237) {
tmp = t_0;
} else {
tmp = Math.cos(M) * Math.exp((-0.25 * (n * n)));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.cos(M) * math.exp(-(M * M)) tmp = 0 if m <= -54.0: tmp = math.cos(M) * math.exp(((m * m) * -0.25)) elif m <= -2.6e-56: tmp = t_0 elif m <= -3.3e-103: tmp = math.exp(-l) elif m <= -5e-237: tmp = t_0 else: tmp = math.cos(M) * math.exp((-0.25 * (n * n))) return tmp
function code(K, m, n, M, l) t_0 = Float64(cos(M) * exp(Float64(-Float64(M * M)))) tmp = 0.0 if (m <= -54.0) tmp = Float64(cos(M) * exp(Float64(Float64(m * m) * -0.25))); elseif (m <= -2.6e-56) tmp = t_0; elseif (m <= -3.3e-103) tmp = exp(Float64(-l)); elseif (m <= -5e-237) tmp = t_0; else tmp = Float64(cos(M) * exp(Float64(-0.25 * Float64(n * n)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = cos(M) * exp(-(M * M)); tmp = 0.0; if (m <= -54.0) tmp = cos(M) * exp(((m * m) * -0.25)); elseif (m <= -2.6e-56) tmp = t_0; elseif (m <= -3.3e-103) tmp = exp(-l); elseif (m <= -5e-237) tmp = t_0; else tmp = cos(M) * exp((-0.25 * (n * n))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[(N[Cos[M], $MachinePrecision] * N[Exp[(-N[(M * M), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -54.0], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[(m * m), $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[m, -2.6e-56], t$95$0, If[LessEqual[m, -3.3e-103], N[Exp[(-l)], $MachinePrecision], If[LessEqual[m, -5e-237], t$95$0, N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(-0.25 * N[(n * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos M \cdot e^{-M \cdot M}\\
\mathbf{if}\;m \leq -54:\\
\;\;\;\;\cos M \cdot e^{\left(m \cdot m\right) \cdot -0.25}\\
\mathbf{elif}\;m \leq -2.6 \cdot 10^{-56}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;m \leq -3.3 \cdot 10^{-103}:\\
\;\;\;\;e^{-\ell}\\
\mathbf{elif}\;m \leq -5 \cdot 10^{-237}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{-0.25 \cdot \left(n \cdot n\right)}\\
\end{array}
\end{array}
if m < -54Initial program 75.3%
*-commutative75.3%
associate-*r/75.3%
associate--r-75.3%
+-commutative75.3%
associate-+r-75.3%
unsub-neg75.3%
associate--r+75.3%
+-commutative75.3%
associate--r+75.3%
Simplified75.3%
Taylor expanded in K around 0 98.7%
cos-neg98.7%
Simplified98.7%
Taylor expanded in m around inf 98.7%
*-commutative98.7%
unpow298.7%
Simplified98.7%
if -54 < m < -2.59999999999999997e-56 or -3.2999999999999999e-103 < m < -5.0000000000000002e-237Initial program 77.3%
*-commutative77.3%
associate-*r/77.3%
associate--r-77.3%
+-commutative77.3%
associate-+r-77.3%
unsub-neg77.3%
associate--r+77.3%
+-commutative77.3%
associate--r+77.3%
Simplified77.3%
Taylor expanded in K around 0 86.9%
cos-neg86.9%
Simplified86.9%
Taylor expanded in M around inf 60.8%
mul-1-neg60.8%
unpow260.8%
distribute-rgt-neg-in60.8%
Simplified60.8%
if -2.59999999999999997e-56 < m < -3.2999999999999999e-103Initial program 100.0%
*-commutative100.0%
associate-*r/100.0%
associate--r-100.0%
+-commutative100.0%
associate-+r-100.0%
unsub-neg100.0%
associate--r+100.0%
+-commutative100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in l around inf 100.0%
neg-mul-1100.0%
Simplified100.0%
Taylor expanded in K around 0 100.0%
exp-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
cos-neg100.0%
Simplified100.0%
Taylor expanded in M around 0 100.0%
rec-exp100.0%
Simplified100.0%
if -5.0000000000000002e-237 < m Initial program 73.0%
*-commutative73.0%
associate-*r/73.8%
associate--r-73.8%
+-commutative73.8%
associate-+r-73.8%
unsub-neg73.8%
associate--r+73.8%
+-commutative73.8%
associate--r+73.8%
Simplified73.8%
Taylor expanded in K around 0 97.9%
cos-neg97.9%
Simplified97.9%
Taylor expanded in n around inf 60.1%
*-commutative60.1%
unpow260.1%
Simplified60.1%
Final simplification72.3%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (* (cos M) (exp (- (* M M))))))
(if (<= m -54.0)
(* (cos M) (exp (* (* m m) -0.25)))
(if (<= m -4.8e-60)
t_0
(if (<= m -2.85e-103)
(* (cos (* 0.5 (* m K))) (exp (- l)))
(if (<= m -1.04e-235) t_0 (* (cos M) (exp (* -0.25 (* n n))))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = cos(M) * exp(-(M * M));
double tmp;
if (m <= -54.0) {
tmp = cos(M) * exp(((m * m) * -0.25));
} else if (m <= -4.8e-60) {
tmp = t_0;
} else if (m <= -2.85e-103) {
tmp = cos((0.5 * (m * K))) * exp(-l);
} else if (m <= -1.04e-235) {
tmp = t_0;
} else {
tmp = cos(M) * exp((-0.25 * (n * n)));
}
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 = cos(m_1) * exp(-(m_1 * m_1))
if (m <= (-54.0d0)) then
tmp = cos(m_1) * exp(((m * m) * (-0.25d0)))
else if (m <= (-4.8d-60)) then
tmp = t_0
else if (m <= (-2.85d-103)) then
tmp = cos((0.5d0 * (m * k))) * exp(-l)
else if (m <= (-1.04d-235)) then
tmp = t_0
else
tmp = cos(m_1) * exp(((-0.25d0) * (n * n)))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double t_0 = Math.cos(M) * Math.exp(-(M * M));
double tmp;
if (m <= -54.0) {
tmp = Math.cos(M) * Math.exp(((m * m) * -0.25));
} else if (m <= -4.8e-60) {
tmp = t_0;
} else if (m <= -2.85e-103) {
tmp = Math.cos((0.5 * (m * K))) * Math.exp(-l);
} else if (m <= -1.04e-235) {
tmp = t_0;
} else {
tmp = Math.cos(M) * Math.exp((-0.25 * (n * n)));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.cos(M) * math.exp(-(M * M)) tmp = 0 if m <= -54.0: tmp = math.cos(M) * math.exp(((m * m) * -0.25)) elif m <= -4.8e-60: tmp = t_0 elif m <= -2.85e-103: tmp = math.cos((0.5 * (m * K))) * math.exp(-l) elif m <= -1.04e-235: tmp = t_0 else: tmp = math.cos(M) * math.exp((-0.25 * (n * n))) return tmp
function code(K, m, n, M, l) t_0 = Float64(cos(M) * exp(Float64(-Float64(M * M)))) tmp = 0.0 if (m <= -54.0) tmp = Float64(cos(M) * exp(Float64(Float64(m * m) * -0.25))); elseif (m <= -4.8e-60) tmp = t_0; elseif (m <= -2.85e-103) tmp = Float64(cos(Float64(0.5 * Float64(m * K))) * exp(Float64(-l))); elseif (m <= -1.04e-235) tmp = t_0; else tmp = Float64(cos(M) * exp(Float64(-0.25 * Float64(n * n)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = cos(M) * exp(-(M * M)); tmp = 0.0; if (m <= -54.0) tmp = cos(M) * exp(((m * m) * -0.25)); elseif (m <= -4.8e-60) tmp = t_0; elseif (m <= -2.85e-103) tmp = cos((0.5 * (m * K))) * exp(-l); elseif (m <= -1.04e-235) tmp = t_0; else tmp = cos(M) * exp((-0.25 * (n * n))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[(N[Cos[M], $MachinePrecision] * N[Exp[(-N[(M * M), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -54.0], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[(m * m), $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[m, -4.8e-60], t$95$0, If[LessEqual[m, -2.85e-103], N[(N[Cos[N[(0.5 * N[(m * K), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[m, -1.04e-235], t$95$0, N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(-0.25 * N[(n * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos M \cdot e^{-M \cdot M}\\
\mathbf{if}\;m \leq -54:\\
\;\;\;\;\cos M \cdot e^{\left(m \cdot m\right) \cdot -0.25}\\
\mathbf{elif}\;m \leq -4.8 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;m \leq -2.85 \cdot 10^{-103}:\\
\;\;\;\;\cos \left(0.5 \cdot \left(m \cdot K\right)\right) \cdot e^{-\ell}\\
\mathbf{elif}\;m \leq -1.04 \cdot 10^{-235}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{-0.25 \cdot \left(n \cdot n\right)}\\
\end{array}
\end{array}
if m < -54Initial program 75.3%
*-commutative75.3%
associate-*r/75.3%
associate--r-75.3%
+-commutative75.3%
associate-+r-75.3%
unsub-neg75.3%
associate--r+75.3%
+-commutative75.3%
associate--r+75.3%
Simplified75.3%
Taylor expanded in K around 0 98.7%
cos-neg98.7%
Simplified98.7%
Taylor expanded in m around inf 98.7%
*-commutative98.7%
unpow298.7%
Simplified98.7%
if -54 < m < -4.80000000000000019e-60 or -2.8499999999999998e-103 < m < -1.04e-235Initial program 77.3%
*-commutative77.3%
associate-*r/77.3%
associate--r-77.3%
+-commutative77.3%
associate-+r-77.3%
unsub-neg77.3%
associate--r+77.3%
+-commutative77.3%
associate--r+77.3%
Simplified77.3%
Taylor expanded in K around 0 86.9%
cos-neg86.9%
Simplified86.9%
Taylor expanded in M around inf 60.8%
mul-1-neg60.8%
unpow260.8%
distribute-rgt-neg-in60.8%
Simplified60.8%
if -4.80000000000000019e-60 < m < -2.8499999999999998e-103Initial program 100.0%
*-commutative100.0%
associate-*r/100.0%
associate--r-100.0%
+-commutative100.0%
associate-+r-100.0%
unsub-neg100.0%
associate--r+100.0%
+-commutative100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in l around inf 100.0%
neg-mul-1100.0%
Simplified100.0%
Taylor expanded in m around inf 100.0%
if -1.04e-235 < m Initial program 73.0%
*-commutative73.0%
associate-*r/73.8%
associate--r-73.8%
+-commutative73.8%
associate-+r-73.8%
unsub-neg73.8%
associate--r+73.8%
+-commutative73.8%
associate--r+73.8%
Simplified73.8%
Taylor expanded in K around 0 97.9%
cos-neg97.9%
Simplified97.9%
Taylor expanded in n around inf 60.1%
*-commutative60.1%
unpow260.1%
Simplified60.1%
Final simplification72.3%
(FPCore (K m n M l) :precision binary64 (if (or (<= M -170000.0) (not (<= M 6.1e-9))) (* (cos M) (exp (- (* M M)))) (* (cos M) (exp (* (* m m) -0.25)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if ((M <= -170000.0) || !(M <= 6.1e-9)) {
tmp = cos(M) * exp(-(M * M));
} else {
tmp = cos(M) * exp(((m * m) * -0.25));
}
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_1 <= (-170000.0d0)) .or. (.not. (m_1 <= 6.1d-9))) then
tmp = cos(m_1) * exp(-(m_1 * m_1))
else
tmp = cos(m_1) * exp(((m * m) * (-0.25d0)))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if ((M <= -170000.0) || !(M <= 6.1e-9)) {
tmp = Math.cos(M) * Math.exp(-(M * M));
} else {
tmp = Math.cos(M) * Math.exp(((m * m) * -0.25));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if (M <= -170000.0) or not (M <= 6.1e-9): tmp = math.cos(M) * math.exp(-(M * M)) else: tmp = math.cos(M) * math.exp(((m * m) * -0.25)) return tmp
function code(K, m, n, M, l) tmp = 0.0 if ((M <= -170000.0) || !(M <= 6.1e-9)) tmp = Float64(cos(M) * exp(Float64(-Float64(M * M)))); else tmp = Float64(cos(M) * exp(Float64(Float64(m * m) * -0.25))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if ((M <= -170000.0) || ~((M <= 6.1e-9))) tmp = cos(M) * exp(-(M * M)); else tmp = cos(M) * exp(((m * m) * -0.25)); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[Or[LessEqual[M, -170000.0], N[Not[LessEqual[M, 6.1e-9]], $MachinePrecision]], N[(N[Cos[M], $MachinePrecision] * N[Exp[(-N[(M * M), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[(m * m), $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq -170000 \lor \neg \left(M \leq 6.1 \cdot 10^{-9}\right):\\
\;\;\;\;\cos M \cdot e^{-M \cdot M}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{\left(m \cdot m\right) \cdot -0.25}\\
\end{array}
\end{array}
if M < -1.7e5 or 6.1e-9 < M Initial program 76.0%
*-commutative76.0%
associate-*r/76.0%
associate--r-76.0%
+-commutative76.0%
associate-+r-76.0%
unsub-neg76.0%
associate--r+76.0%
+-commutative76.0%
associate--r+76.0%
Simplified76.0%
Taylor expanded in K around 0 99.2%
cos-neg99.2%
Simplified99.2%
Taylor expanded in M around inf 96.9%
mul-1-neg96.9%
unpow296.9%
distribute-rgt-neg-in96.9%
Simplified96.9%
if -1.7e5 < M < 6.1e-9Initial program 73.5%
*-commutative73.5%
associate-*r/74.3%
associate--r-74.3%
+-commutative74.3%
associate-+r-74.3%
unsub-neg74.3%
associate--r+74.3%
+-commutative74.3%
associate--r+74.3%
Simplified74.3%
Taylor expanded in K around 0 93.8%
cos-neg93.8%
Simplified93.8%
Taylor expanded in m around inf 61.0%
*-commutative61.0%
unpow261.0%
Simplified61.0%
Final simplification78.5%
(FPCore (K m n M l) :precision binary64 (if (<= l -2800000000.0) (* (cos M) (exp l)) (if (<= l 700.0) (* (cos M) (exp (- (* M M)))) (exp (- l)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -2800000000.0) {
tmp = cos(M) * exp(l);
} else if (l <= 700.0) {
tmp = cos(M) * exp(-(M * 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 <= (-2800000000.0d0)) then
tmp = cos(m_1) * exp(l)
else if (l <= 700.0d0) then
tmp = cos(m_1) * exp(-(m_1 * m_1))
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 <= -2800000000.0) {
tmp = Math.cos(M) * Math.exp(l);
} else if (l <= 700.0) {
tmp = Math.cos(M) * Math.exp(-(M * M));
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= -2800000000.0: tmp = math.cos(M) * math.exp(l) elif l <= 700.0: tmp = math.cos(M) * math.exp(-(M * M)) else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= -2800000000.0) tmp = Float64(cos(M) * exp(l)); elseif (l <= 700.0) tmp = Float64(cos(M) * exp(Float64(-Float64(M * M)))); else tmp = exp(Float64(-l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (l <= -2800000000.0) tmp = cos(M) * exp(l); elseif (l <= 700.0) tmp = cos(M) * exp(-(M * M)); else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, -2800000000.0], N[(N[Cos[M], $MachinePrecision] * N[Exp[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 700.0], N[(N[Cos[M], $MachinePrecision] * N[Exp[(-N[(M * M), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[Exp[(-l)], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2800000000:\\
\;\;\;\;\cos M \cdot e^{\ell}\\
\mathbf{elif}\;\ell \leq 700:\\
\;\;\;\;\cos M \cdot e^{-M \cdot M}\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < -2.8e9Initial program 62.7%
*-commutative62.7%
associate-*r/64.7%
associate--r-64.7%
+-commutative64.7%
associate-+r-64.7%
unsub-neg64.7%
associate--r+64.7%
+-commutative64.7%
associate--r+64.7%
Simplified64.7%
Taylor expanded in l around inf 20.3%
neg-mul-120.3%
Simplified20.3%
log1p-expm1-u20.3%
log1p-udef20.3%
*-commutative20.3%
add-sqr-sqrt20.3%
sqrt-unprod20.3%
sqr-neg20.3%
sqrt-unprod0.0%
add-sqr-sqrt45.5%
div-inv45.5%
metadata-eval45.5%
Applied egg-rr45.5%
Taylor expanded in K around 0 74.9%
*-commutative74.9%
cos-neg74.9%
Simplified74.9%
if -2.8e9 < l < 700Initial program 74.0%
*-commutative74.0%
associate-*r/74.0%
associate--r-74.0%
+-commutative74.0%
associate-+r-74.0%
unsub-neg74.0%
associate--r+74.0%
+-commutative74.0%
associate--r+74.0%
Simplified74.0%
Taylor expanded in K around 0 95.8%
cos-neg95.8%
Simplified95.8%
Taylor expanded in M around inf 57.4%
mul-1-neg57.4%
unpow257.4%
distribute-rgt-neg-in57.4%
Simplified57.4%
if 700 < l Initial program 86.7%
*-commutative86.7%
associate-*r/86.7%
associate--r-86.7%
+-commutative86.7%
associate-+r-86.7%
unsub-neg86.7%
associate--r+86.7%
+-commutative86.7%
associate--r+86.7%
Simplified86.7%
Taylor expanded in l around inf 86.7%
neg-mul-186.7%
Simplified86.7%
Taylor expanded in K around 0 100.0%
exp-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
cos-neg100.0%
Simplified100.0%
Taylor expanded in M around 0 100.0%
rec-exp100.0%
Simplified100.0%
Final simplification70.9%
(FPCore (K m n M l) :precision binary64 (if (<= l -950000.0) (* (cos M) (exp l)) (* (cos M) (exp (- l)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -950000.0) {
tmp = cos(M) * exp(l);
} else {
tmp = cos(M) * 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 <= (-950000.0d0)) then
tmp = cos(m_1) * exp(l)
else
tmp = cos(m_1) * 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 <= -950000.0) {
tmp = Math.cos(M) * Math.exp(l);
} else {
tmp = Math.cos(M) * Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= -950000.0: tmp = math.cos(M) * math.exp(l) else: tmp = math.cos(M) * math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= -950000.0) tmp = Float64(cos(M) * exp(l)); else tmp = Float64(cos(M) * exp(Float64(-l))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (l <= -950000.0) tmp = cos(M) * exp(l); else tmp = cos(M) * exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, -950000.0], N[(N[Cos[M], $MachinePrecision] * N[Exp[l], $MachinePrecision]), $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -950000:\\
\;\;\;\;\cos M \cdot e^{\ell}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{-\ell}\\
\end{array}
\end{array}
if l < -9.5e5Initial program 63.5%
*-commutative63.5%
associate-*r/65.4%
associate--r-65.4%
+-commutative65.4%
associate-+r-65.4%
unsub-neg65.4%
associate--r+65.4%
+-commutative65.4%
associate--r+65.4%
Simplified65.4%
Taylor expanded in l around inf 20.0%
neg-mul-120.0%
Simplified20.0%
log1p-expm1-u20.0%
log1p-udef20.0%
*-commutative20.0%
add-sqr-sqrt20.0%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-unprod0.0%
add-sqr-sqrt46.5%
div-inv46.5%
metadata-eval46.5%
Applied egg-rr46.5%
Taylor expanded in K around 0 75.4%
*-commutative75.4%
cos-neg75.4%
Simplified75.4%
if -9.5e5 < l Initial program 77.6%
*-commutative77.6%
associate-*r/77.6%
associate--r-77.6%
+-commutative77.6%
associate-+r-77.6%
unsub-neg77.6%
associate--r+77.6%
+-commutative77.6%
associate--r+77.6%
Simplified77.6%
Taylor expanded in l around inf 34.1%
neg-mul-134.1%
Simplified34.1%
Taylor expanded in K around 0 38.3%
cos-neg38.3%
Simplified38.3%
Final simplification45.9%
(FPCore (K m n M l) :precision binary64 (if (<= l -950000.0) (* (cos M) (exp l)) (exp (- l))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= -950000.0) {
tmp = cos(M) * 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 <= (-950000.0d0)) then
tmp = cos(m_1) * 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 <= -950000.0) {
tmp = Math.cos(M) * Math.exp(l);
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= -950000.0: tmp = math.cos(M) * math.exp(l) else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= -950000.0) tmp = Float64(cos(M) * 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 <= -950000.0) tmp = cos(M) * exp(l); else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, -950000.0], N[(N[Cos[M], $MachinePrecision] * N[Exp[l], $MachinePrecision]), $MachinePrecision], N[Exp[(-l)], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -950000:\\
\;\;\;\;\cos M \cdot e^{\ell}\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < -9.5e5Initial program 63.5%
*-commutative63.5%
associate-*r/65.4%
associate--r-65.4%
+-commutative65.4%
associate-+r-65.4%
unsub-neg65.4%
associate--r+65.4%
+-commutative65.4%
associate--r+65.4%
Simplified65.4%
Taylor expanded in l around inf 20.0%
neg-mul-120.0%
Simplified20.0%
log1p-expm1-u20.0%
log1p-udef20.0%
*-commutative20.0%
add-sqr-sqrt20.0%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-unprod0.0%
add-sqr-sqrt46.5%
div-inv46.5%
metadata-eval46.5%
Applied egg-rr46.5%
Taylor expanded in K around 0 75.4%
*-commutative75.4%
cos-neg75.4%
Simplified75.4%
if -9.5e5 < l Initial program 77.6%
*-commutative77.6%
associate-*r/77.6%
associate--r-77.6%
+-commutative77.6%
associate-+r-77.6%
unsub-neg77.6%
associate--r+77.6%
+-commutative77.6%
associate--r+77.6%
Simplified77.6%
Taylor expanded in l around inf 34.1%
neg-mul-134.1%
Simplified34.1%
Taylor expanded in K around 0 38.3%
exp-neg38.3%
associate-*l/38.3%
*-lft-identity38.3%
cos-neg38.3%
Simplified38.3%
Taylor expanded in M around 0 38.3%
rec-exp38.3%
Simplified38.3%
Final simplification45.9%
(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(Float64(-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 \left(-M\right)
\end{array}
Initial program 74.7%
*-commutative74.7%
associate-*r/75.1%
associate--r-75.1%
+-commutative75.1%
associate-+r-75.1%
unsub-neg75.1%
associate--r+75.1%
+-commutative75.1%
associate--r+75.1%
Simplified75.1%
Taylor expanded in l around inf 31.3%
neg-mul-131.3%
Simplified31.3%
Taylor expanded in l around 0 7.4%
Taylor expanded in K around 0 8.0%
neg-mul-18.0%
Simplified8.0%
Final simplification8.0%
(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(Float64(-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 74.7%
*-commutative74.7%
associate-*r/75.1%
associate--r-75.1%
+-commutative75.1%
associate-+r-75.1%
unsub-neg75.1%
associate--r+75.1%
+-commutative75.1%
associate--r+75.1%
Simplified75.1%
Taylor expanded in l around inf 31.3%
neg-mul-131.3%
Simplified31.3%
Taylor expanded in K around 0 34.7%
exp-neg34.7%
associate-*l/34.7%
*-lft-identity34.7%
cos-neg34.7%
Simplified34.7%
Taylor expanded in M around 0 34.7%
rec-exp34.7%
Simplified34.7%
Final simplification34.7%
herbie shell --seed 2023252
(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)))))))