
(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) 0.5) 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) * 0.5) - 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) * 0.5d0) - 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) * 0.5) - 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) * 0.5) - M), 2.0))))
function code(K, m, n, M, l) return Float64(cos(M) * exp(Float64(abs(Float64(m - n)) - Float64(l + (Float64(Float64(Float64(m + n) * 0.5) - M) ^ 2.0))))) end
function tmp = code(K, m, n, M, l) tmp = cos(M) * exp((abs((m - n)) - (l + ((((m + n) * 0.5) - M) ^ 2.0)))); end
code[K_, m_, n_, M_, l_] := N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - N[(l + N[Power[N[(N[(N[(m + n), $MachinePrecision] * 0.5), $MachinePrecision] - M), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos M \cdot e^{\left|m - n\right| - \left(\ell + {\left(\left(m + n\right) \cdot 0.5 - M\right)}^{2}\right)}
\end{array}
Initial program 75.7%
Taylor expanded in K around 0 94.9%
cos-neg94.9%
associate--r+94.9%
*-commutative94.9%
associate--r+94.9%
Simplified94.9%
Final simplification94.9%
(FPCore (K m n M l) :precision binary64 (exp (- (fabs (- m n)) (+ l (pow (- (* (+ m n) 0.5) M) 2.0)))))
double code(double K, double m, double n, double M, double l) {
return exp((fabs((m - n)) - (l + pow((((m + n) * 0.5) - 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) * 0.5d0) - 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) * 0.5) - M), 2.0))));
}
def code(K, m, n, M, l): return math.exp((math.fabs((m - n)) - (l + math.pow((((m + n) * 0.5) - M), 2.0))))
function code(K, m, n, M, l) return exp(Float64(abs(Float64(m - n)) - Float64(l + (Float64(Float64(Float64(m + n) * 0.5) - M) ^ 2.0)))) end
function tmp = code(K, m, n, M, l) tmp = exp((abs((m - n)) - (l + ((((m + n) * 0.5) - M) ^ 2.0)))); end
code[K_, m_, n_, M_, l_] := N[Exp[N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - N[(l + N[Power[N[(N[(N[(m + n), $MachinePrecision] * 0.5), $MachinePrecision] - M), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left|m - n\right| - \left(\ell + {\left(\left(m + n\right) \cdot 0.5 - M\right)}^{2}\right)}
\end{array}
Initial program 75.7%
Taylor expanded in K around 0 94.9%
cos-neg94.9%
associate--r+94.9%
*-commutative94.9%
associate--r+94.9%
Simplified94.9%
Taylor expanded in M around 0 94.5%
Final simplification94.5%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (fabs (- m n))))
(if (<= m -3.25e+106)
(exp (- t_0 (* 0.25 (pow m 2.0))))
(exp (+ t_0 (- (* (- (* n 0.5) M) (- (- M (* n 0.5)) m)) l))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = fabs((m - n));
double tmp;
if (m <= -3.25e+106) {
tmp = exp((t_0 - (0.25 * pow(m, 2.0))));
} else {
tmp = exp((t_0 + ((((n * 0.5) - M) * ((M - (n * 0.5)) - m)) - 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 = abs((m - n))
if (m <= (-3.25d+106)) then
tmp = exp((t_0 - (0.25d0 * (m ** 2.0d0))))
else
tmp = exp((t_0 + ((((n * 0.5d0) - m_1) * ((m_1 - (n * 0.5d0)) - m)) - 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.abs((m - n));
double tmp;
if (m <= -3.25e+106) {
tmp = Math.exp((t_0 - (0.25 * Math.pow(m, 2.0))));
} else {
tmp = Math.exp((t_0 + ((((n * 0.5) - M) * ((M - (n * 0.5)) - m)) - l)));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.fabs((m - n)) tmp = 0 if m <= -3.25e+106: tmp = math.exp((t_0 - (0.25 * math.pow(m, 2.0)))) else: tmp = math.exp((t_0 + ((((n * 0.5) - M) * ((M - (n * 0.5)) - m)) - l))) return tmp
function code(K, m, n, M, l) t_0 = abs(Float64(m - n)) tmp = 0.0 if (m <= -3.25e+106) tmp = exp(Float64(t_0 - Float64(0.25 * (m ^ 2.0)))); else tmp = exp(Float64(t_0 + Float64(Float64(Float64(Float64(n * 0.5) - M) * Float64(Float64(M - Float64(n * 0.5)) - m)) - l))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = abs((m - n)); tmp = 0.0; if (m <= -3.25e+106) tmp = exp((t_0 - (0.25 * (m ^ 2.0)))); else tmp = exp((t_0 + ((((n * 0.5) - M) * ((M - (n * 0.5)) - m)) - l))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[m, -3.25e+106], N[Exp[N[(t$95$0 - N[(0.25 * N[Power[m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[N[(t$95$0 + N[(N[(N[(N[(n * 0.5), $MachinePrecision] - M), $MachinePrecision] * N[(N[(M - N[(n * 0.5), $MachinePrecision]), $MachinePrecision] - m), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|m - n\right|\\
\mathbf{if}\;m \leq -3.25 \cdot 10^{+106}:\\
\;\;\;\;e^{t\_0 - 0.25 \cdot {m}^{2}}\\
\mathbf{else}:\\
\;\;\;\;e^{t\_0 + \left(\left(n \cdot 0.5 - M\right) \cdot \left(\left(M - n \cdot 0.5\right) - m\right) - \ell\right)}\\
\end{array}
\end{array}
if m < -3.2500000000000001e106Initial program 72.1%
Taylor expanded in K around 0 100.0%
cos-neg100.0%
associate--r+100.0%
*-commutative100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in M around 0 100.0%
Taylor expanded in m around inf 100.0%
if -3.2500000000000001e106 < m Initial program 76.4%
Taylor expanded in K around 0 93.8%
cos-neg93.8%
associate--r+93.8%
*-commutative93.8%
associate--r+93.8%
Simplified93.8%
Taylor expanded in M around 0 93.4%
Taylor expanded in m around 0 78.8%
unpow278.8%
distribute-rgt-out82.6%
Simplified82.6%
Final simplification85.5%
(FPCore (K m n M l) :precision binary64 (if (or (<= M -0.86) (not (<= M 6.5e-31))) (exp (+ (fabs (- m n)) (- (* (- (+ n (* m 0.5)) M) (- M (* m 0.5))) l))) (* (cos (- (* (* n 0.5) K) M)) (exp (+ (* M (- M n)) (- (- m l) n))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if ((M <= -0.86) || !(M <= 6.5e-31)) {
tmp = exp((fabs((m - n)) + ((((n + (m * 0.5)) - M) * (M - (m * 0.5))) - l)));
} else {
tmp = cos((((n * 0.5) * K) - M)) * exp(((M * (M - n)) + ((m - l) - 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_1 <= (-0.86d0)) .or. (.not. (m_1 <= 6.5d-31))) then
tmp = exp((abs((m - n)) + ((((n + (m * 0.5d0)) - m_1) * (m_1 - (m * 0.5d0))) - l)))
else
tmp = cos((((n * 0.5d0) * k) - m_1)) * exp(((m_1 * (m_1 - n)) + ((m - l) - 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 <= -0.86) || !(M <= 6.5e-31)) {
tmp = Math.exp((Math.abs((m - n)) + ((((n + (m * 0.5)) - M) * (M - (m * 0.5))) - l)));
} else {
tmp = Math.cos((((n * 0.5) * K) - M)) * Math.exp(((M * (M - n)) + ((m - l) - n)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if (M <= -0.86) or not (M <= 6.5e-31): tmp = math.exp((math.fabs((m - n)) + ((((n + (m * 0.5)) - M) * (M - (m * 0.5))) - l))) else: tmp = math.cos((((n * 0.5) * K) - M)) * math.exp(((M * (M - n)) + ((m - l) - n))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if ((M <= -0.86) || !(M <= 6.5e-31)) tmp = exp(Float64(abs(Float64(m - n)) + Float64(Float64(Float64(Float64(n + Float64(m * 0.5)) - M) * Float64(M - Float64(m * 0.5))) - l))); else tmp = Float64(cos(Float64(Float64(Float64(n * 0.5) * K) - M)) * exp(Float64(Float64(M * Float64(M - n)) + Float64(Float64(m - l) - n)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if ((M <= -0.86) || ~((M <= 6.5e-31))) tmp = exp((abs((m - n)) + ((((n + (m * 0.5)) - M) * (M - (m * 0.5))) - l))); else tmp = cos((((n * 0.5) * K) - M)) * exp(((M * (M - n)) + ((m - l) - n))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[Or[LessEqual[M, -0.86], N[Not[LessEqual[M, 6.5e-31]], $MachinePrecision]], N[Exp[N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] + N[(N[(N[(N[(n + N[(m * 0.5), $MachinePrecision]), $MachinePrecision] - M), $MachinePrecision] * N[(M - N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Cos[N[(N[(N[(n * 0.5), $MachinePrecision] * K), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(M * N[(M - n), $MachinePrecision]), $MachinePrecision] + N[(N[(m - l), $MachinePrecision] - n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq -0.86 \lor \neg \left(M \leq 6.5 \cdot 10^{-31}\right):\\
\;\;\;\;e^{\left|m - n\right| + \left(\left(\left(n + m \cdot 0.5\right) - M\right) \cdot \left(M - m \cdot 0.5\right) - \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\left(n \cdot 0.5\right) \cdot K - M\right) \cdot e^{M \cdot \left(M - n\right) + \left(\left(m - \ell\right) - n\right)}\\
\end{array}
\end{array}
if M < -0.859999999999999987 or 6.49999999999999967e-31 < M Initial program 75.0%
Taylor expanded in K around 0 98.2%
cos-neg98.2%
associate--r+98.2%
*-commutative98.2%
associate--r+98.2%
Simplified98.2%
Taylor expanded in M around 0 97.6%
Taylor expanded in n around 0 79.0%
*-commutative79.0%
*-commutative79.0%
*-commutative79.0%
unpow279.0%
distribute-lft-in90.0%
*-commutative90.0%
associate-+r-90.0%
*-commutative90.0%
Simplified90.0%
if -0.859999999999999987 < M < 6.49999999999999967e-31Initial program 76.7%
Applied egg-rr24.8%
expm1-def24.8%
expm1-log1p28.2%
associate-+l-28.2%
associate--r-28.2%
Simplified28.2%
Taylor expanded in n around 0 38.9%
+-commutative38.9%
unpow238.9%
distribute-rgt-out40.0%
Simplified40.0%
Taylor expanded in m around 0 40.1%
*-commutative40.1%
associate-*r*40.1%
*-commutative40.1%
Simplified40.1%
Taylor expanded in m around 0 52.9%
associate-*r*52.9%
neg-mul-152.9%
Simplified52.9%
Final simplification75.5%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (cos (- (* (* (+ m n) 0.5) K) M))))
(if (<= M -8.6e+39)
(* t_0 (exp (- l)))
(if (<= M 1.22e+69)
(* (cos (- (* (* n 0.5) K) M)) (exp (- (* M (- M n)) (+ n l))))
(* t_0 (exp (* n (+ (* m 0.5) (- -1.0 M)))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = cos(((((m + n) * 0.5) * K) - M));
double tmp;
if (M <= -8.6e+39) {
tmp = t_0 * exp(-l);
} else if (M <= 1.22e+69) {
tmp = cos((((n * 0.5) * K) - M)) * exp(((M * (M - n)) - (n + l)));
} else {
tmp = t_0 * exp((n * ((m * 0.5) + (-1.0 - M))));
}
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 + n) * 0.5d0) * k) - m_1))
if (m_1 <= (-8.6d+39)) then
tmp = t_0 * exp(-l)
else if (m_1 <= 1.22d+69) then
tmp = cos((((n * 0.5d0) * k) - m_1)) * exp(((m_1 * (m_1 - n)) - (n + l)))
else
tmp = t_0 * exp((n * ((m * 0.5d0) + ((-1.0d0) - m_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.cos(((((m + n) * 0.5) * K) - M));
double tmp;
if (M <= -8.6e+39) {
tmp = t_0 * Math.exp(-l);
} else if (M <= 1.22e+69) {
tmp = Math.cos((((n * 0.5) * K) - M)) * Math.exp(((M * (M - n)) - (n + l)));
} else {
tmp = t_0 * Math.exp((n * ((m * 0.5) + (-1.0 - M))));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.cos(((((m + n) * 0.5) * K) - M)) tmp = 0 if M <= -8.6e+39: tmp = t_0 * math.exp(-l) elif M <= 1.22e+69: tmp = math.cos((((n * 0.5) * K) - M)) * math.exp(((M * (M - n)) - (n + l))) else: tmp = t_0 * math.exp((n * ((m * 0.5) + (-1.0 - M)))) return tmp
function code(K, m, n, M, l) t_0 = cos(Float64(Float64(Float64(Float64(m + n) * 0.5) * K) - M)) tmp = 0.0 if (M <= -8.6e+39) tmp = Float64(t_0 * exp(Float64(-l))); elseif (M <= 1.22e+69) tmp = Float64(cos(Float64(Float64(Float64(n * 0.5) * K) - M)) * exp(Float64(Float64(M * Float64(M - n)) - Float64(n + l)))); else tmp = Float64(t_0 * exp(Float64(n * Float64(Float64(m * 0.5) + Float64(-1.0 - M))))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = cos(((((m + n) * 0.5) * K) - M)); tmp = 0.0; if (M <= -8.6e+39) tmp = t_0 * exp(-l); elseif (M <= 1.22e+69) tmp = cos((((n * 0.5) * K) - M)) * exp(((M * (M - n)) - (n + l))); else tmp = t_0 * exp((n * ((m * 0.5) + (-1.0 - M)))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Cos[N[(N[(N[(N[(m + n), $MachinePrecision] * 0.5), $MachinePrecision] * K), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[M, -8.6e+39], N[(t$95$0 * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 1.22e+69], N[(N[Cos[N[(N[(N[(n * 0.5), $MachinePrecision] * K), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(M * N[(M - n), $MachinePrecision]), $MachinePrecision] - N[(n + l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(n * N[(N[(m * 0.5), $MachinePrecision] + N[(-1.0 - M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\left(\left(m + n\right) \cdot 0.5\right) \cdot K - M\right)\\
\mathbf{if}\;M \leq -8.6 \cdot 10^{+39}:\\
\;\;\;\;t\_0 \cdot e^{-\ell}\\
\mathbf{elif}\;M \leq 1.22 \cdot 10^{+69}:\\
\;\;\;\;\cos \left(\left(n \cdot 0.5\right) \cdot K - M\right) \cdot e^{M \cdot \left(M - n\right) - \left(n + \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{n \cdot \left(m \cdot 0.5 + \left(-1 - M\right)\right)}\\
\end{array}
\end{array}
if M < -8.6e39Initial program 69.6%
Applied egg-rr2.3%
expm1-def2.3%
expm1-log1p2.8%
associate-+l-2.8%
associate--r-2.8%
Simplified2.8%
Taylor expanded in n around 0 4.4%
+-commutative4.4%
unpow24.4%
distribute-rgt-out6.4%
Simplified6.4%
Taylor expanded in l around inf 22.5%
mul-1-neg22.5%
Simplified22.5%
if -8.6e39 < M < 1.22e69Initial program 73.9%
Applied egg-rr23.0%
expm1-def23.0%
expm1-log1p26.9%
associate-+l-26.9%
associate--r-26.9%
Simplified26.9%
Taylor expanded in n around 0 35.4%
+-commutative35.4%
unpow235.4%
distribute-rgt-out36.2%
Simplified36.2%
Taylor expanded in m around 0 37.0%
*-commutative37.0%
associate-*r*37.0%
*-commutative37.0%
Simplified37.0%
Taylor expanded in m around 0 44.7%
fma-neg44.7%
*-lft-identity44.7%
pow-base-144.7%
fma-neg44.7%
pow-base-144.7%
*-lft-identity44.7%
associate-*r*44.7%
*-commutative44.7%
associate-*l*44.7%
associate-*r*44.7%
neg-mul-144.7%
+-commutative44.7%
Simplified44.7%
if 1.22e69 < M Initial program 85.2%
Applied egg-rr2.5%
expm1-def2.5%
expm1-log1p2.9%
associate-+l-2.9%
associate--r-2.9%
Simplified2.9%
Taylor expanded in n around 0 2.8%
+-commutative2.8%
unpow22.8%
distribute-rgt-out4.6%
Simplified4.6%
Taylor expanded in n around inf 27.4%
+-commutative27.4%
Simplified27.4%
Final simplification35.7%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (cos (- (* (* (+ m n) 0.5) K) M))))
(if (<= M -1.85e+43)
(* t_0 (exp (- l)))
(if (<= M 6e+74)
(* (cos (- (* (* n 0.5) K) M)) (exp (+ (* M (- M n)) (- (- m l) n))))
(* t_0 (exp (* n (+ (* m 0.5) (- -1.0 M)))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = cos(((((m + n) * 0.5) * K) - M));
double tmp;
if (M <= -1.85e+43) {
tmp = t_0 * exp(-l);
} else if (M <= 6e+74) {
tmp = cos((((n * 0.5) * K) - M)) * exp(((M * (M - n)) + ((m - l) - n)));
} else {
tmp = t_0 * exp((n * ((m * 0.5) + (-1.0 - M))));
}
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 + n) * 0.5d0) * k) - m_1))
if (m_1 <= (-1.85d+43)) then
tmp = t_0 * exp(-l)
else if (m_1 <= 6d+74) then
tmp = cos((((n * 0.5d0) * k) - m_1)) * exp(((m_1 * (m_1 - n)) + ((m - l) - n)))
else
tmp = t_0 * exp((n * ((m * 0.5d0) + ((-1.0d0) - m_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.cos(((((m + n) * 0.5) * K) - M));
double tmp;
if (M <= -1.85e+43) {
tmp = t_0 * Math.exp(-l);
} else if (M <= 6e+74) {
tmp = Math.cos((((n * 0.5) * K) - M)) * Math.exp(((M * (M - n)) + ((m - l) - n)));
} else {
tmp = t_0 * Math.exp((n * ((m * 0.5) + (-1.0 - M))));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.cos(((((m + n) * 0.5) * K) - M)) tmp = 0 if M <= -1.85e+43: tmp = t_0 * math.exp(-l) elif M <= 6e+74: tmp = math.cos((((n * 0.5) * K) - M)) * math.exp(((M * (M - n)) + ((m - l) - n))) else: tmp = t_0 * math.exp((n * ((m * 0.5) + (-1.0 - M)))) return tmp
function code(K, m, n, M, l) t_0 = cos(Float64(Float64(Float64(Float64(m + n) * 0.5) * K) - M)) tmp = 0.0 if (M <= -1.85e+43) tmp = Float64(t_0 * exp(Float64(-l))); elseif (M <= 6e+74) tmp = Float64(cos(Float64(Float64(Float64(n * 0.5) * K) - M)) * exp(Float64(Float64(M * Float64(M - n)) + Float64(Float64(m - l) - n)))); else tmp = Float64(t_0 * exp(Float64(n * Float64(Float64(m * 0.5) + Float64(-1.0 - M))))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = cos(((((m + n) * 0.5) * K) - M)); tmp = 0.0; if (M <= -1.85e+43) tmp = t_0 * exp(-l); elseif (M <= 6e+74) tmp = cos((((n * 0.5) * K) - M)) * exp(((M * (M - n)) + ((m - l) - n))); else tmp = t_0 * exp((n * ((m * 0.5) + (-1.0 - M)))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Cos[N[(N[(N[(N[(m + n), $MachinePrecision] * 0.5), $MachinePrecision] * K), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[M, -1.85e+43], N[(t$95$0 * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 6e+74], N[(N[Cos[N[(N[(N[(n * 0.5), $MachinePrecision] * K), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(M * N[(M - n), $MachinePrecision]), $MachinePrecision] + N[(N[(m - l), $MachinePrecision] - n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(n * N[(N[(m * 0.5), $MachinePrecision] + N[(-1.0 - M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\left(\left(m + n\right) \cdot 0.5\right) \cdot K - M\right)\\
\mathbf{if}\;M \leq -1.85 \cdot 10^{+43}:\\
\;\;\;\;t\_0 \cdot e^{-\ell}\\
\mathbf{elif}\;M \leq 6 \cdot 10^{+74}:\\
\;\;\;\;\cos \left(\left(n \cdot 0.5\right) \cdot K - M\right) \cdot e^{M \cdot \left(M - n\right) + \left(\left(m - \ell\right) - n\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{n \cdot \left(m \cdot 0.5 + \left(-1 - M\right)\right)}\\
\end{array}
\end{array}
if M < -1.85e43Initial program 69.6%
Applied egg-rr2.3%
expm1-def2.3%
expm1-log1p2.8%
associate-+l-2.8%
associate--r-2.8%
Simplified2.8%
Taylor expanded in n around 0 4.4%
+-commutative4.4%
unpow24.4%
distribute-rgt-out6.4%
Simplified6.4%
Taylor expanded in l around inf 22.5%
mul-1-neg22.5%
Simplified22.5%
if -1.85e43 < M < 6e74Initial program 73.9%
Applied egg-rr23.0%
expm1-def23.0%
expm1-log1p26.9%
associate-+l-26.9%
associate--r-26.9%
Simplified26.9%
Taylor expanded in n around 0 35.4%
+-commutative35.4%
unpow235.4%
distribute-rgt-out36.2%
Simplified36.2%
Taylor expanded in m around 0 37.0%
*-commutative37.0%
associate-*r*37.0%
*-commutative37.0%
Simplified37.0%
Taylor expanded in m around 0 51.2%
associate-*r*51.2%
neg-mul-151.2%
Simplified51.2%
if 6e74 < M Initial program 85.2%
Applied egg-rr2.5%
expm1-def2.5%
expm1-log1p2.9%
associate-+l-2.9%
associate--r-2.9%
Simplified2.9%
Taylor expanded in n around 0 2.8%
+-commutative2.8%
unpow22.8%
distribute-rgt-out4.6%
Simplified4.6%
Taylor expanded in n around inf 27.4%
+-commutative27.4%
Simplified27.4%
Final simplification39.2%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (fabs (- m n))) (t_1 (- (* n 0.5) M)))
(if (<= n 2.1e+93)
(exp (+ t_0 (- (* (- (+ n (* m 0.5)) M) (- M (* m 0.5))) l)))
(exp (- t_0 (+ l (* t_1 (+ m t_1))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = fabs((m - n));
double t_1 = (n * 0.5) - M;
double tmp;
if (n <= 2.1e+93) {
tmp = exp((t_0 + ((((n + (m * 0.5)) - M) * (M - (m * 0.5))) - l)));
} else {
tmp = exp((t_0 - (l + (t_1 * (m + 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 = abs((m - n))
t_1 = (n * 0.5d0) - m_1
if (n <= 2.1d+93) then
tmp = exp((t_0 + ((((n + (m * 0.5d0)) - m_1) * (m_1 - (m * 0.5d0))) - l)))
else
tmp = exp((t_0 - (l + (t_1 * (m + 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.abs((m - n));
double t_1 = (n * 0.5) - M;
double tmp;
if (n <= 2.1e+93) {
tmp = Math.exp((t_0 + ((((n + (m * 0.5)) - M) * (M - (m * 0.5))) - l)));
} else {
tmp = Math.exp((t_0 - (l + (t_1 * (m + t_1)))));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.fabs((m - n)) t_1 = (n * 0.5) - M tmp = 0 if n <= 2.1e+93: tmp = math.exp((t_0 + ((((n + (m * 0.5)) - M) * (M - (m * 0.5))) - l))) else: tmp = math.exp((t_0 - (l + (t_1 * (m + t_1))))) return tmp
function code(K, m, n, M, l) t_0 = abs(Float64(m - n)) t_1 = Float64(Float64(n * 0.5) - M) tmp = 0.0 if (n <= 2.1e+93) tmp = exp(Float64(t_0 + Float64(Float64(Float64(Float64(n + Float64(m * 0.5)) - M) * Float64(M - Float64(m * 0.5))) - l))); else tmp = exp(Float64(t_0 - Float64(l + Float64(t_1 * Float64(m + t_1))))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = abs((m - n)); t_1 = (n * 0.5) - M; tmp = 0.0; if (n <= 2.1e+93) tmp = exp((t_0 + ((((n + (m * 0.5)) - M) * (M - (m * 0.5))) - l))); else tmp = exp((t_0 - (l + (t_1 * (m + t_1))))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(n * 0.5), $MachinePrecision] - M), $MachinePrecision]}, If[LessEqual[n, 2.1e+93], N[Exp[N[(t$95$0 + N[(N[(N[(N[(n + N[(m * 0.5), $MachinePrecision]), $MachinePrecision] - M), $MachinePrecision] * N[(M - N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[N[(t$95$0 - N[(l + N[(t$95$1 * N[(m + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|m - n\right|\\
t_1 := n \cdot 0.5 - M\\
\mathbf{if}\;n \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;e^{t\_0 + \left(\left(\left(n + m \cdot 0.5\right) - M\right) \cdot \left(M - m \cdot 0.5\right) - \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{t\_0 - \left(\ell + t\_1 \cdot \left(m + t\_1\right)\right)}\\
\end{array}
\end{array}
if n < 2.0999999999999998e93Initial program 76.7%
Taylor expanded in K around 0 93.8%
cos-neg93.8%
associate--r+93.8%
*-commutative93.8%
associate--r+93.8%
Simplified93.8%
Taylor expanded in M around 0 93.3%
Taylor expanded in n around 0 76.5%
*-commutative76.5%
*-commutative76.5%
*-commutative76.5%
unpow276.5%
distribute-lft-in84.5%
*-commutative84.5%
associate-+r-84.5%
*-commutative84.5%
Simplified84.5%
if 2.0999999999999998e93 < n Initial program 70.5%
Taylor expanded in K around 0 100.0%
cos-neg100.0%
associate--r+100.0%
*-commutative100.0%
associate--r+100.0%
Simplified100.0%
Taylor expanded in M around 0 100.0%
Taylor expanded in m around 0 84.2%
unpow284.2%
distribute-rgt-out93.3%
Simplified93.3%
Final simplification86.0%
(FPCore (K m n M l) :precision binary64 (if (<= l 3.2e-34) (* (cos (- (* (* n 0.5) K) M)) (exp (- (* M (- M n)) (+ n l)))) (* (cos (- (* (* (+ m n) 0.5) K) M)) (exp (- l)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= 3.2e-34) {
tmp = cos((((n * 0.5) * K) - M)) * exp(((M * (M - n)) - (n + l)));
} else {
tmp = cos(((((m + n) * 0.5) * K) - 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 <= 3.2d-34) then
tmp = cos((((n * 0.5d0) * k) - m_1)) * exp(((m_1 * (m_1 - n)) - (n + l)))
else
tmp = cos(((((m + n) * 0.5d0) * k) - 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 <= 3.2e-34) {
tmp = Math.cos((((n * 0.5) * K) - M)) * Math.exp(((M * (M - n)) - (n + l)));
} else {
tmp = Math.cos(((((m + n) * 0.5) * K) - M)) * Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= 3.2e-34: tmp = math.cos((((n * 0.5) * K) - M)) * math.exp(((M * (M - n)) - (n + l))) else: tmp = math.cos(((((m + n) * 0.5) * K) - M)) * math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= 3.2e-34) tmp = Float64(cos(Float64(Float64(Float64(n * 0.5) * K) - M)) * exp(Float64(Float64(M * Float64(M - n)) - Float64(n + l)))); else tmp = Float64(cos(Float64(Float64(Float64(Float64(m + n) * 0.5) * K) - M)) * exp(Float64(-l))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (l <= 3.2e-34) tmp = cos((((n * 0.5) * K) - M)) * exp(((M * (M - n)) - (n + l))); else tmp = cos(((((m + n) * 0.5) * K) - M)) * exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, 3.2e-34], N[(N[Cos[N[(N[(N[(n * 0.5), $MachinePrecision] * K), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(M * N[(M - n), $MachinePrecision]), $MachinePrecision] - N[(n + l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(N[(N[(N[(m + n), $MachinePrecision] * 0.5), $MachinePrecision] * K), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;\cos \left(\left(n \cdot 0.5\right) \cdot K - M\right) \cdot e^{M \cdot \left(M - n\right) - \left(n + \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\left(\left(m + n\right) \cdot 0.5\right) \cdot K - M\right) \cdot e^{-\ell}\\
\end{array}
\end{array}
if l < 3.20000000000000003e-34Initial program 73.7%
Applied egg-rr11.0%
expm1-def11.0%
expm1-log1p14.1%
associate-+l-14.1%
associate--r-14.1%
Simplified14.1%
Taylor expanded in n around 0 19.1%
+-commutative19.1%
unpow219.1%
distribute-rgt-out20.2%
Simplified20.2%
Taylor expanded in m around 0 20.4%
*-commutative20.4%
associate-*r*20.4%
*-commutative20.4%
Simplified20.4%
Taylor expanded in m around 0 22.9%
fma-neg22.9%
*-lft-identity22.9%
pow-base-122.9%
fma-neg22.9%
pow-base-122.9%
*-lft-identity22.9%
associate-*r*22.9%
*-commutative22.9%
associate-*l*22.9%
associate-*r*22.9%
neg-mul-122.9%
+-commutative22.9%
Simplified22.9%
if 3.20000000000000003e-34 < l Initial program 81.6%
Applied egg-rr21.2%
expm1-def21.2%
expm1-log1p21.6%
associate-+l-21.6%
associate--r-21.6%
Simplified21.6%
Taylor expanded in n around 0 26.1%
+-commutative26.1%
unpow226.1%
distribute-rgt-out27.7%
Simplified27.7%
Taylor expanded in l around inf 77.0%
mul-1-neg77.0%
Simplified77.0%
Final simplification36.4%
(FPCore (K m n M l) :precision binary64 (* (cos (- (* (* (+ m n) 0.5) K) M)) (exp (- l))))
double code(double K, double m, double n, double M, double l) {
return cos(((((m + n) * 0.5) * K) - M)) * 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 = cos(((((m + n) * 0.5d0) * k) - m_1)) * exp(-l)
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.cos(((((m + n) * 0.5) * K) - M)) * Math.exp(-l);
}
def code(K, m, n, M, l): return math.cos(((((m + n) * 0.5) * K) - M)) * math.exp(-l)
function code(K, m, n, M, l) return Float64(cos(Float64(Float64(Float64(Float64(m + n) * 0.5) * K) - M)) * exp(Float64(-l))) end
function tmp = code(K, m, n, M, l) tmp = cos(((((m + n) * 0.5) * K) - M)) * exp(-l); end
code[K_, m_, n_, M_, l_] := N[(N[Cos[N[(N[(N[(N[(m + n), $MachinePrecision] * 0.5), $MachinePrecision] * K), $MachinePrecision] - M), $MachinePrecision]], $MachinePrecision] * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos \left(\left(\left(m + n\right) \cdot 0.5\right) \cdot K - M\right) \cdot e^{-\ell}
\end{array}
Initial program 75.7%
Applied egg-rr13.6%
expm1-def13.6%
expm1-log1p16.0%
associate-+l-16.0%
associate--r-16.0%
Simplified16.0%
Taylor expanded in n around 0 20.8%
+-commutative20.8%
unpow220.8%
distribute-rgt-out22.1%
Simplified22.1%
Taylor expanded in l around inf 30.1%
mul-1-neg30.1%
Simplified30.1%
Final simplification30.1%
(FPCore (K m n M l) :precision binary64 (exp (- (fabs (- m n)) l)))
double code(double K, double m, double n, double M, double l) {
return exp((fabs((m - n)) - 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((abs((m - n)) - l))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.exp((Math.abs((m - n)) - l));
}
def code(K, m, n, M, l): return math.exp((math.fabs((m - n)) - l))
function code(K, m, n, M, l) return exp(Float64(abs(Float64(m - n)) - l)) end
function tmp = code(K, m, n, M, l) tmp = exp((abs((m - n)) - l)); end
code[K_, m_, n_, M_, l_] := N[Exp[N[(N[Abs[N[(m - n), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left|m - n\right| - \ell}
\end{array}
Initial program 75.7%
Taylor expanded in K around 0 94.9%
cos-neg94.9%
associate--r+94.9%
*-commutative94.9%
associate--r+94.9%
Simplified94.9%
Taylor expanded in M around 0 94.5%
Taylor expanded in l around inf 20.6%
Final simplification20.6%
herbie shell --seed 2024041
(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)))))))