
(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 5 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 (- n m)) (+ (pow (- (/ (+ m n) 2.0) M) 2.0) l)))))
double code(double K, double m, double n, double M, double l) {
return cos(M) * exp((fabs((n - m)) - (pow((((m + n) / 2.0) - M), 2.0) + 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_1) * exp((abs((n - m)) - (((((m + n) / 2.0d0) - m_1) ** 2.0d0) + l)))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.cos(M) * Math.exp((Math.abs((n - m)) - (Math.pow((((m + n) / 2.0) - M), 2.0) + l)));
}
def code(K, m, n, M, l): return math.cos(M) * math.exp((math.fabs((n - m)) - (math.pow((((m + n) / 2.0) - M), 2.0) + l)))
function code(K, m, n, M, l) return Float64(cos(M) * exp(Float64(abs(Float64(n - m)) - Float64((Float64(Float64(Float64(m + n) / 2.0) - M) ^ 2.0) + l)))) end
function tmp = code(K, m, n, M, l) tmp = cos(M) * exp((abs((n - m)) - (((((m + n) / 2.0) - M) ^ 2.0) + l))); end
code[K_, m_, n_, M_, l_] := N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] - N[(N[Power[N[(N[(N[(m + n), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision], 2.0], $MachinePrecision] + l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos M \cdot e^{\left|n - m\right| - \left({\left(\frac{m + n}{2} - M\right)}^{2} + \ell\right)}
\end{array}
Initial program 75.1%
+-commutative75.1%
+-commutative75.1%
fabs-sub75.1%
associate-/l*75.0%
+-commutative75.0%
Simplified75.0%
Taylor expanded in K around 0 97.8%
cos-neg97.8%
Simplified97.8%
Final simplification97.8%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (fabs (- n m))))
(if (or (<= M -5.2e+124) (not (<= M 3.1e+137)))
(exp (- t_0 (+ l (* M M))))
(exp (- t_0 (+ l (* (pow (+ m n) 2.0) 0.25)))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = fabs((n - m));
double tmp;
if ((M <= -5.2e+124) || !(M <= 3.1e+137)) {
tmp = exp((t_0 - (l + (M * M))));
} else {
tmp = exp((t_0 - (l + (pow((m + n), 2.0) * 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) :: t_0
real(8) :: tmp
t_0 = abs((n - m))
if ((m_1 <= (-5.2d+124)) .or. (.not. (m_1 <= 3.1d+137))) then
tmp = exp((t_0 - (l + (m_1 * m_1))))
else
tmp = exp((t_0 - (l + (((m + n) ** 2.0d0) * 0.25d0))))
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((n - m));
double tmp;
if ((M <= -5.2e+124) || !(M <= 3.1e+137)) {
tmp = Math.exp((t_0 - (l + (M * M))));
} else {
tmp = Math.exp((t_0 - (l + (Math.pow((m + n), 2.0) * 0.25))));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.fabs((n - m)) tmp = 0 if (M <= -5.2e+124) or not (M <= 3.1e+137): tmp = math.exp((t_0 - (l + (M * M)))) else: tmp = math.exp((t_0 - (l + (math.pow((m + n), 2.0) * 0.25)))) return tmp
function code(K, m, n, M, l) t_0 = abs(Float64(n - m)) tmp = 0.0 if ((M <= -5.2e+124) || !(M <= 3.1e+137)) tmp = exp(Float64(t_0 - Float64(l + Float64(M * M)))); else tmp = exp(Float64(t_0 - Float64(l + Float64((Float64(m + n) ^ 2.0) * 0.25)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = abs((n - m)); tmp = 0.0; if ((M <= -5.2e+124) || ~((M <= 3.1e+137))) tmp = exp((t_0 - (l + (M * M)))); else tmp = exp((t_0 - (l + (((m + n) ^ 2.0) * 0.25)))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[M, -5.2e+124], N[Not[LessEqual[M, 3.1e+137]], $MachinePrecision]], N[Exp[N[(t$95$0 - N[(l + N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[N[(t$95$0 - N[(l + N[(N[Power[N[(m + n), $MachinePrecision], 2.0], $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|n - m\right|\\
\mathbf{if}\;M \leq -5.2 \cdot 10^{+124} \lor \neg \left(M \leq 3.1 \cdot 10^{+137}\right):\\
\;\;\;\;e^{t_0 - \left(\ell + M \cdot M\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{t_0 - \left(\ell + {\left(m + n\right)}^{2} \cdot 0.25\right)}\\
\end{array}
\end{array}
if M < -5.2000000000000001e124 or 3.0999999999999999e137 < M Initial program 71.4%
+-commutative71.4%
+-commutative71.4%
fabs-sub71.4%
associate-/l*71.4%
+-commutative71.4%
Simplified71.4%
Taylor expanded in M around inf 71.4%
unpow271.4%
Simplified71.4%
Taylor expanded in n around inf 84.4%
Taylor expanded in K around 0 100.0%
if -5.2000000000000001e124 < M < 3.0999999999999999e137Initial program 76.7%
+-commutative76.7%
+-commutative76.7%
fabs-sub76.7%
associate-/l*76.6%
+-commutative76.6%
Simplified76.6%
Taylor expanded in K around 0 84.6%
cos-neg84.6%
sin-neg84.6%
Simplified84.6%
Taylor expanded in M around 0 91.4%
*-commutative91.4%
Simplified91.4%
Final simplification94.0%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (fabs (- n m))))
(if (<= n -3e-265)
(exp (- t_0 (+ l (* 0.25 (* m m)))))
(if (<= n 1.0)
(exp (- t_0 (+ l (* M M))))
(exp (- t_0 (+ l (* 0.25 (* n n)))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = fabs((n - m));
double tmp;
if (n <= -3e-265) {
tmp = exp((t_0 - (l + (0.25 * (m * m)))));
} else if (n <= 1.0) {
tmp = exp((t_0 - (l + (M * M))));
} else {
tmp = exp((t_0 - (l + (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 = abs((n - m))
if (n <= (-3d-265)) then
tmp = exp((t_0 - (l + (0.25d0 * (m * m)))))
else if (n <= 1.0d0) then
tmp = exp((t_0 - (l + (m_1 * m_1))))
else
tmp = exp((t_0 - (l + (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.abs((n - m));
double tmp;
if (n <= -3e-265) {
tmp = Math.exp((t_0 - (l + (0.25 * (m * m)))));
} else if (n <= 1.0) {
tmp = Math.exp((t_0 - (l + (M * M))));
} else {
tmp = Math.exp((t_0 - (l + (0.25 * (n * n)))));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.fabs((n - m)) tmp = 0 if n <= -3e-265: tmp = math.exp((t_0 - (l + (0.25 * (m * m))))) elif n <= 1.0: tmp = math.exp((t_0 - (l + (M * M)))) else: tmp = math.exp((t_0 - (l + (0.25 * (n * n))))) return tmp
function code(K, m, n, M, l) t_0 = abs(Float64(n - m)) tmp = 0.0 if (n <= -3e-265) tmp = exp(Float64(t_0 - Float64(l + Float64(0.25 * Float64(m * m))))); elseif (n <= 1.0) tmp = exp(Float64(t_0 - Float64(l + Float64(M * M)))); else tmp = exp(Float64(t_0 - Float64(l + Float64(0.25 * Float64(n * n))))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = abs((n - m)); tmp = 0.0; if (n <= -3e-265) tmp = exp((t_0 - (l + (0.25 * (m * m))))); elseif (n <= 1.0) tmp = exp((t_0 - (l + (M * M)))); else tmp = exp((t_0 - (l + (0.25 * (n * n))))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -3e-265], N[Exp[N[(t$95$0 - N[(l + N[(0.25 * N[(m * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 1.0], N[Exp[N[(t$95$0 - N[(l + N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[N[(t$95$0 - N[(l + N[(0.25 * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|n - m\right|\\
\mathbf{if}\;n \leq -3 \cdot 10^{-265}:\\
\;\;\;\;e^{t_0 - \left(\ell + 0.25 \cdot \left(m \cdot m\right)\right)}\\
\mathbf{elif}\;n \leq 1:\\
\;\;\;\;e^{t_0 - \left(\ell + M \cdot M\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{t_0 - \left(\ell + 0.25 \cdot \left(n \cdot n\right)\right)}\\
\end{array}
\end{array}
if n < -2.9999999999999998e-265Initial program 75.9%
+-commutative75.9%
+-commutative75.9%
fabs-sub75.9%
associate-/l*75.9%
+-commutative75.9%
Simplified75.9%
Taylor expanded in K around 0 80.5%
cos-neg80.5%
sin-neg80.5%
Simplified80.5%
Taylor expanded in M around 0 84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in m around inf 59.7%
unpow259.7%
Simplified59.7%
if -2.9999999999999998e-265 < n < 1Initial program 82.7%
+-commutative82.7%
+-commutative82.7%
fabs-sub82.7%
associate-/l*82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in M around inf 70.2%
unpow270.2%
Simplified70.2%
Taylor expanded in n around inf 80.5%
Taylor expanded in K around 0 80.6%
if 1 < n Initial program 64.1%
+-commutative64.1%
+-commutative64.1%
fabs-sub64.1%
associate-/l*64.1%
+-commutative64.1%
Simplified64.1%
Taylor expanded in K around 0 71.9%
cos-neg71.9%
sin-neg71.9%
Simplified71.9%
Taylor expanded in M around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in m around 0 84.6%
unpow284.6%
Simplified84.6%
Final simplification72.4%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (fabs (- n m))))
(if (<= n 9e+24)
(exp (- t_0 (+ l (* 0.25 (* m m)))))
(exp (- t_0 (+ l (* 0.25 (* n n))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = fabs((n - m));
double tmp;
if (n <= 9e+24) {
tmp = exp((t_0 - (l + (0.25 * (m * m)))));
} else {
tmp = exp((t_0 - (l + (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 = abs((n - m))
if (n <= 9d+24) then
tmp = exp((t_0 - (l + (0.25d0 * (m * m)))))
else
tmp = exp((t_0 - (l + (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.abs((n - m));
double tmp;
if (n <= 9e+24) {
tmp = Math.exp((t_0 - (l + (0.25 * (m * m)))));
} else {
tmp = Math.exp((t_0 - (l + (0.25 * (n * n)))));
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.fabs((n - m)) tmp = 0 if n <= 9e+24: tmp = math.exp((t_0 - (l + (0.25 * (m * m))))) else: tmp = math.exp((t_0 - (l + (0.25 * (n * n))))) return tmp
function code(K, m, n, M, l) t_0 = abs(Float64(n - m)) tmp = 0.0 if (n <= 9e+24) tmp = exp(Float64(t_0 - Float64(l + Float64(0.25 * Float64(m * m))))); else tmp = exp(Float64(t_0 - Float64(l + Float64(0.25 * Float64(n * n))))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = abs((n - m)); tmp = 0.0; if (n <= 9e+24) tmp = exp((t_0 - (l + (0.25 * (m * m))))); else tmp = exp((t_0 - (l + (0.25 * (n * n))))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, 9e+24], N[Exp[N[(t$95$0 - N[(l + N[(0.25 * N[(m * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[N[(t$95$0 - N[(l + N[(0.25 * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|n - m\right|\\
\mathbf{if}\;n \leq 9 \cdot 10^{+24}:\\
\;\;\;\;e^{t_0 - \left(\ell + 0.25 \cdot \left(m \cdot m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{t_0 - \left(\ell + 0.25 \cdot \left(n \cdot n\right)\right)}\\
\end{array}
\end{array}
if n < 9.00000000000000039e24Initial program 79.4%
+-commutative79.4%
+-commutative79.4%
fabs-sub79.4%
associate-/l*79.3%
+-commutative79.3%
Simplified79.3%
Taylor expanded in K around 0 84.0%
cos-neg84.0%
sin-neg84.0%
Simplified84.0%
Taylor expanded in M around 0 82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in m around inf 68.0%
unpow268.0%
Simplified68.0%
if 9.00000000000000039e24 < n Initial program 60.3%
+-commutative60.3%
+-commutative60.3%
fabs-sub60.3%
associate-/l*60.3%
+-commutative60.3%
Simplified60.3%
Taylor expanded in K around 0 69.0%
cos-neg69.0%
sin-neg69.0%
Simplified69.0%
Taylor expanded in M around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in m around 0 89.8%
unpow289.8%
Simplified89.8%
Final simplification72.9%
(FPCore (K m n M l) :precision binary64 (exp (- (fabs (- n m)) (+ l (* 0.25 (* m m))))))
double code(double K, double m, double n, double M, double l) {
return exp((fabs((n - m)) - (l + (0.25 * (m * 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 = exp((abs((n - m)) - (l + (0.25d0 * (m * m)))))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.exp((Math.abs((n - m)) - (l + (0.25 * (m * m)))));
}
def code(K, m, n, M, l): return math.exp((math.fabs((n - m)) - (l + (0.25 * (m * m)))))
function code(K, m, n, M, l) return exp(Float64(abs(Float64(n - m)) - Float64(l + Float64(0.25 * Float64(m * m))))) end
function tmp = code(K, m, n, M, l) tmp = exp((abs((n - m)) - (l + (0.25 * (m * m))))); end
code[K_, m_, n_, M_, l_] := N[Exp[N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] - N[(l + N[(0.25 * N[(m * m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left|n - m\right| - \left(\ell + 0.25 \cdot \left(m \cdot m\right)\right)}
\end{array}
Initial program 75.1%
+-commutative75.1%
+-commutative75.1%
fabs-sub75.1%
associate-/l*75.0%
+-commutative75.0%
Simplified75.0%
Taylor expanded in K around 0 80.6%
cos-neg80.6%
sin-neg80.6%
Simplified80.6%
Taylor expanded in M around 0 86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in m around inf 63.7%
unpow263.7%
Simplified63.7%
Final simplification63.7%
herbie shell --seed 2023292
(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)))))))