
(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 11 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 (* (exp (+ (fabs (- n m)) (- (* (+ M (* -0.5 (+ n m))) (- (* 0.5 (+ n m)) M)) l))) (cos M)))
double code(double K, double m, double n, double M, double l) {
return exp((fabs((n - m)) + (((M + (-0.5 * (n + m))) * ((0.5 * (n + m)) - M)) - l))) * 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 = exp((abs((n - m)) + (((m_1 + ((-0.5d0) * (n + m))) * ((0.5d0 * (n + m)) - m_1)) - l))) * cos(m_1)
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.exp((Math.abs((n - m)) + (((M + (-0.5 * (n + m))) * ((0.5 * (n + m)) - M)) - l))) * Math.cos(M);
}
def code(K, m, n, M, l): return math.exp((math.fabs((n - m)) + (((M + (-0.5 * (n + m))) * ((0.5 * (n + m)) - M)) - l))) * math.cos(M)
function code(K, m, n, M, l) return Float64(exp(Float64(abs(Float64(n - m)) + Float64(Float64(Float64(M + Float64(-0.5 * Float64(n + m))) * Float64(Float64(0.5 * Float64(n + m)) - M)) - l))) * cos(M)) end
function tmp = code(K, m, n, M, l) tmp = exp((abs((n - m)) + (((M + (-0.5 * (n + m))) * ((0.5 * (n + m)) - M)) - l))) * cos(M); end
code[K_, m_, n_, M_, l_] := N[(N[Exp[N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] + N[(N[(N[(M + N[(-0.5 * N[(n + m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 * N[(n + m), $MachinePrecision]), $MachinePrecision] - M), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[M], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\left|n - m\right| + \left(\left(M + -0.5 \cdot \left(n + m\right)\right) \cdot \left(0.5 \cdot \left(n + m\right) - M\right) - \ell\right)} \cdot \cos M
\end{array}
Initial program 75.9%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified75.9%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.2%
Final simplification96.2%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (* (cos M) (exp (- 0.0 (* M M))))))
(if (<= M -3600000000000.0)
t_0
(if (<= M 27.0)
(exp (+ (fabs (- n m)) (- (* -0.25 (* (+ n m) (+ n m))) l)))
t_0))))
double code(double K, double m, double n, double M, double l) {
double t_0 = cos(M) * exp((0.0 - (M * M)));
double tmp;
if (M <= -3600000000000.0) {
tmp = t_0;
} else if (M <= 27.0) {
tmp = exp((fabs((n - m)) + ((-0.25 * ((n + m) * (n + m))) - l)));
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = cos(m_1) * exp((0.0d0 - (m_1 * m_1)))
if (m_1 <= (-3600000000000.0d0)) then
tmp = t_0
else if (m_1 <= 27.0d0) then
tmp = exp((abs((n - m)) + (((-0.25d0) * ((n + m) * (n + m))) - l)))
else
tmp = t_0
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((0.0 - (M * M)));
double tmp;
if (M <= -3600000000000.0) {
tmp = t_0;
} else if (M <= 27.0) {
tmp = Math.exp((Math.abs((n - m)) + ((-0.25 * ((n + m) * (n + m))) - l)));
} else {
tmp = t_0;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.cos(M) * math.exp((0.0 - (M * M))) tmp = 0 if M <= -3600000000000.0: tmp = t_0 elif M <= 27.0: tmp = math.exp((math.fabs((n - m)) + ((-0.25 * ((n + m) * (n + m))) - l))) else: tmp = t_0 return tmp
function code(K, m, n, M, l) t_0 = Float64(cos(M) * exp(Float64(0.0 - Float64(M * M)))) tmp = 0.0 if (M <= -3600000000000.0) tmp = t_0; elseif (M <= 27.0) tmp = exp(Float64(abs(Float64(n - m)) + Float64(Float64(-0.25 * Float64(Float64(n + m) * Float64(n + m))) - l))); else tmp = t_0; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = cos(M) * exp((0.0 - (M * M))); tmp = 0.0; if (M <= -3600000000000.0) tmp = t_0; elseif (M <= 27.0) tmp = exp((abs((n - m)) + ((-0.25 * ((n + m) * (n + m))) - l))); else tmp = t_0; end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(0.0 - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M, -3600000000000.0], t$95$0, If[LessEqual[M, 27.0], N[Exp[N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] + N[(N[(-0.25 * N[(N[(n + m), $MachinePrecision] * N[(n + m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos M \cdot e^{0 - M \cdot M}\\
\mathbf{if}\;M \leq -3600000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M \leq 27:\\
\;\;\;\;e^{\left|n - m\right| + \left(-0.25 \cdot \left(\left(n + m\right) \cdot \left(n + m\right)\right) - \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if M < -3.6e12 or 27 < M Initial program 80.0%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified80.0%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in M around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6497.6%
Simplified97.6%
if -3.6e12 < M < 27Initial program 72.1%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified72.1%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified92.7%
Taylor expanded in M around 0
exp-lowering-exp.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
fabs-subN/A
sub-negN/A
mul-1-negN/A
fabs-lowering-fabs.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f6492.5%
Simplified92.5%
Final simplification95.0%
(FPCore (K m n M l) :precision binary64 (if (<= n 7.8e-28) (* (cos M) (exp (* -0.25 (* m m)))) (if (<= n 54.0) (* (cos M) (exp (- 0.0 (* M M)))) (exp (* -0.25 (* n n))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (n <= 7.8e-28) {
tmp = cos(M) * exp((-0.25 * (m * m)));
} else if (n <= 54.0) {
tmp = cos(M) * exp((0.0 - (M * M)));
} else {
tmp = 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 (n <= 7.8d-28) then
tmp = cos(m_1) * exp(((-0.25d0) * (m * m)))
else if (n <= 54.0d0) then
tmp = cos(m_1) * exp((0.0d0 - (m_1 * m_1)))
else
tmp = 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 (n <= 7.8e-28) {
tmp = Math.cos(M) * Math.exp((-0.25 * (m * m)));
} else if (n <= 54.0) {
tmp = Math.cos(M) * Math.exp((0.0 - (M * M)));
} else {
tmp = Math.exp((-0.25 * (n * n)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if n <= 7.8e-28: tmp = math.cos(M) * math.exp((-0.25 * (m * m))) elif n <= 54.0: tmp = math.cos(M) * math.exp((0.0 - (M * M))) else: tmp = math.exp((-0.25 * (n * n))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (n <= 7.8e-28) tmp = Float64(cos(M) * exp(Float64(-0.25 * Float64(m * m)))); elseif (n <= 54.0) tmp = Float64(cos(M) * exp(Float64(0.0 - Float64(M * M)))); else tmp = exp(Float64(-0.25 * Float64(n * n))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (n <= 7.8e-28) tmp = cos(M) * exp((-0.25 * (m * m))); elseif (n <= 54.0) tmp = cos(M) * exp((0.0 - (M * M))); else tmp = exp((-0.25 * (n * n))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[n, 7.8e-28], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(-0.25 * N[(m * m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 54.0], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(0.0 - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Exp[N[(-0.25 * N[(n * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 7.8 \cdot 10^{-28}:\\
\;\;\;\;\cos M \cdot e^{-0.25 \cdot \left(m \cdot m\right)}\\
\mathbf{elif}\;n \leq 54:\\
\;\;\;\;\cos M \cdot e^{0 - M \cdot M}\\
\mathbf{else}:\\
\;\;\;\;e^{-0.25 \cdot \left(n \cdot n\right)}\\
\end{array}
\end{array}
if n < 7.79999999999999998e-28Initial program 76.5%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified76.5%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.1%
Taylor expanded in m around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.8%
Simplified58.8%
if 7.79999999999999998e-28 < n < 54Initial program 80.0%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified80.0%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified80.0%
Taylor expanded in M around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6480.1%
Simplified80.1%
if 54 < n Initial program 73.7%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified73.7%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified98.2%
Taylor expanded in M around 0
exp-lowering-exp.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
fabs-subN/A
sub-negN/A
mul-1-negN/A
fabs-lowering-fabs.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f6496.5%
Simplified96.5%
Taylor expanded in n around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.1%
Simplified93.1%
Final simplification66.9%
(FPCore (K m n M l) :precision binary64 (if (<= n 8.2e-15) (* (cos M) (exp (* -0.25 (* m m)))) (* (cos M) (exp (* -0.25 (* n n))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (n <= 8.2e-15) {
tmp = cos(M) * exp((-0.25 * (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 (n <= 8.2d-15) then
tmp = cos(m_1) * exp(((-0.25d0) * (m * m)))
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 (n <= 8.2e-15) {
tmp = Math.cos(M) * Math.exp((-0.25 * (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 n <= 8.2e-15: tmp = math.cos(M) * math.exp((-0.25 * (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 (n <= 8.2e-15) tmp = Float64(cos(M) * exp(Float64(-0.25 * 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 (n <= 8.2e-15) tmp = cos(M) * exp((-0.25 * (m * m))); else tmp = cos(M) * exp((-0.25 * (n * n))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[n, 8.2e-15], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(-0.25 * 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}\;n \leq 8.2 \cdot 10^{-15}:\\
\;\;\;\;\cos M \cdot e^{-0.25 \cdot \left(m \cdot m\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{-0.25 \cdot \left(n \cdot n\right)}\\
\end{array}
\end{array}
if n < 8.20000000000000072e-15Initial program 76.6%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified76.6%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.1%
Taylor expanded in m around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.1%
Simplified59.1%
if 8.20000000000000072e-15 < n Initial program 73.8%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified73.8%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.7%
Taylor expanded in n around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.2%
Simplified87.2%
Final simplification65.8%
(FPCore (K m n M l) :precision binary64 (if (<= n 0.48) (* (cos M) (exp (* -0.25 (* m m)))) (exp (* -0.25 (* n n)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (n <= 0.48) {
tmp = cos(M) * exp((-0.25 * (m * m)));
} else {
tmp = 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 (n <= 0.48d0) then
tmp = cos(m_1) * exp(((-0.25d0) * (m * m)))
else
tmp = 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 (n <= 0.48) {
tmp = Math.cos(M) * Math.exp((-0.25 * (m * m)));
} else {
tmp = Math.exp((-0.25 * (n * n)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if n <= 0.48: tmp = math.cos(M) * math.exp((-0.25 * (m * m))) else: tmp = math.exp((-0.25 * (n * n))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (n <= 0.48) tmp = Float64(cos(M) * exp(Float64(-0.25 * Float64(m * m)))); else tmp = exp(Float64(-0.25 * Float64(n * n))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (n <= 0.48) tmp = cos(M) * exp((-0.25 * (m * m))); else tmp = exp((-0.25 * (n * n))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[n, 0.48], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(-0.25 * N[(m * m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Exp[N[(-0.25 * N[(n * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 0.48:\\
\;\;\;\;\cos M \cdot e^{-0.25 \cdot \left(m \cdot m\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{-0.25 \cdot \left(n \cdot n\right)}\\
\end{array}
\end{array}
if n < 0.47999999999999998Initial program 76.5%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified76.5%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified95.6%
Taylor expanded in m around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.2%
Simplified58.2%
if 0.47999999999999998 < n Initial program 74.1%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified74.1%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified98.3%
Taylor expanded in M around 0
exp-lowering-exp.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
fabs-subN/A
sub-negN/A
mul-1-negN/A
fabs-lowering-fabs.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f6494.9%
Simplified94.9%
Taylor expanded in n around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.5%
Simplified91.5%
Final simplification65.8%
(FPCore (K m n M l) :precision binary64 (if (<= n 8.2e-15) (exp (* -0.25 (* m m))) (exp (* -0.25 (* n n)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (n <= 8.2e-15) {
tmp = exp((-0.25 * (m * m)));
} else {
tmp = 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 (n <= 8.2d-15) then
tmp = exp(((-0.25d0) * (m * m)))
else
tmp = 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 (n <= 8.2e-15) {
tmp = Math.exp((-0.25 * (m * m)));
} else {
tmp = Math.exp((-0.25 * (n * n)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if n <= 8.2e-15: tmp = math.exp((-0.25 * (m * m))) else: tmp = math.exp((-0.25 * (n * n))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (n <= 8.2e-15) tmp = exp(Float64(-0.25 * Float64(m * m))); else tmp = exp(Float64(-0.25 * Float64(n * n))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (n <= 8.2e-15) tmp = exp((-0.25 * (m * m))); else tmp = exp((-0.25 * (n * n))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[n, 8.2e-15], N[Exp[N[(-0.25 * N[(m * m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[N[(-0.25 * N[(n * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 8.2 \cdot 10^{-15}:\\
\;\;\;\;e^{-0.25 \cdot \left(m \cdot m\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{-0.25 \cdot \left(n \cdot n\right)}\\
\end{array}
\end{array}
if n < 8.20000000000000072e-15Initial program 76.6%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified76.6%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.1%
Taylor expanded in M around 0
exp-lowering-exp.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
fabs-subN/A
sub-negN/A
mul-1-negN/A
fabs-lowering-fabs.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f6483.0%
Simplified83.0%
Taylor expanded in m around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.0%
Simplified59.0%
if 8.20000000000000072e-15 < n Initial program 73.8%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified73.8%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.7%
Taylor expanded in M around 0
exp-lowering-exp.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
fabs-subN/A
sub-negN/A
mul-1-negN/A
fabs-lowering-fabs.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f6490.3%
Simplified90.3%
Taylor expanded in n around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.2%
Simplified87.2%
(FPCore (K m n M l) :precision binary64 (if (<= l 720.0) (exp (* -0.25 (* m m))) (exp (- 0.0 l))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= 720.0) {
tmp = exp((-0.25 * (m * m)));
} else {
tmp = exp((0.0 - 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(((-0.25d0) * (m * m)))
else
tmp = exp((0.0d0 - 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((-0.25 * (m * m)));
} else {
tmp = Math.exp((0.0 - l));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= 720.0: tmp = math.exp((-0.25 * (m * m))) else: tmp = math.exp((0.0 - l)) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= 720.0) tmp = exp(Float64(-0.25 * Float64(m * m))); else tmp = exp(Float64(0.0 - l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (l <= 720.0) tmp = exp((-0.25 * (m * m))); else tmp = exp((0.0 - l)); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, 720.0], N[Exp[N[(-0.25 * N[(m * m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[N[(0.0 - l), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 720:\\
\;\;\;\;e^{-0.25 \cdot \left(m \cdot m\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{0 - \ell}\\
\end{array}
\end{array}
if l < 720Initial program 76.7%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified76.7%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified94.7%
Taylor expanded in M around 0
exp-lowering-exp.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
fabs-subN/A
sub-negN/A
mul-1-negN/A
fabs-lowering-fabs.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f6478.6%
Simplified78.6%
Taylor expanded in m around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.7%
Simplified53.7%
if 720 < l Initial program 74.0%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified74.0%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in M around 0
exp-lowering-exp.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
fabs-subN/A
sub-negN/A
mul-1-negN/A
fabs-lowering-fabs.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64100.0%
Simplified100.0%
Taylor expanded in l around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f64100.0%
Simplified100.0%
(FPCore (K m n M l) :precision binary64 (exp (- 0.0 l)))
double code(double K, double m, double n, double M, double l) {
return exp((0.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 = exp((0.0d0 - l))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.exp((0.0 - l));
}
def code(K, m, n, M, l): return math.exp((0.0 - l))
function code(K, m, n, M, l) return exp(Float64(0.0 - l)) end
function tmp = code(K, m, n, M, l) tmp = exp((0.0 - l)); end
code[K_, m_, n_, M_, l_] := N[Exp[N[(0.0 - l), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{0 - \ell}
\end{array}
Initial program 75.9%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified75.9%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.2%
Taylor expanded in M around 0
exp-lowering-exp.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
fabs-subN/A
sub-negN/A
mul-1-negN/A
fabs-lowering-fabs.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f6484.7%
Simplified84.7%
Taylor expanded in l around inf
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6437.1%
Simplified37.1%
(FPCore (K m n M l) :precision binary64 (* (+ 1.0 (* l (+ (* 0.5 l) -1.0))) (+ 1.0 (* -0.5 (* M M)))))
double code(double K, double m, double n, double M, double l) {
return (1.0 + (l * ((0.5 * l) + -1.0))) * (1.0 + (-0.5 * (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 = (1.0d0 + (l * ((0.5d0 * l) + (-1.0d0)))) * (1.0d0 + ((-0.5d0) * (m_1 * m_1)))
end function
public static double code(double K, double m, double n, double M, double l) {
return (1.0 + (l * ((0.5 * l) + -1.0))) * (1.0 + (-0.5 * (M * M)));
}
def code(K, m, n, M, l): return (1.0 + (l * ((0.5 * l) + -1.0))) * (1.0 + (-0.5 * (M * M)))
function code(K, m, n, M, l) return Float64(Float64(1.0 + Float64(l * Float64(Float64(0.5 * l) + -1.0))) * Float64(1.0 + Float64(-0.5 * Float64(M * M)))) end
function tmp = code(K, m, n, M, l) tmp = (1.0 + (l * ((0.5 * l) + -1.0))) * (1.0 + (-0.5 * (M * M))); end
code[K_, m_, n_, M_, l_] := N[(N[(1.0 + N[(l * N[(N[(0.5 * l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.5 * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \ell \cdot \left(0.5 \cdot \ell + -1\right)\right) \cdot \left(1 + -0.5 \cdot \left(M \cdot M\right)\right)
\end{array}
Initial program 75.9%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified75.9%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.2%
Taylor expanded in l around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6437.9%
Simplified37.9%
Taylor expanded in l around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f649.2%
Simplified9.2%
Taylor expanded in M around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f648.5%
Simplified8.5%
Final simplification8.5%
(FPCore (K m n M l) :precision binary64 (+ 1.0 (* l (+ (* 0.5 l) -1.0))))
double code(double K, double m, double n, double M, double l) {
return 1.0 + (l * ((0.5 * l) + -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 + (l * ((0.5d0 * l) + (-1.0d0)))
end function
public static double code(double K, double m, double n, double M, double l) {
return 1.0 + (l * ((0.5 * l) + -1.0));
}
def code(K, m, n, M, l): return 1.0 + (l * ((0.5 * l) + -1.0))
function code(K, m, n, M, l) return Float64(1.0 + Float64(l * Float64(Float64(0.5 * l) + -1.0))) end
function tmp = code(K, m, n, M, l) tmp = 1.0 + (l * ((0.5 * l) + -1.0)); end
code[K_, m_, n_, M_, l_] := N[(1.0 + N[(l * N[(N[(0.5 * l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \ell \cdot \left(0.5 \cdot \ell + -1\right)
\end{array}
Initial program 75.9%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified75.9%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.2%
Taylor expanded in l around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6437.9%
Simplified37.9%
Taylor expanded in l around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f649.2%
Simplified9.2%
Taylor expanded in M around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f648.5%
Simplified8.5%
Final simplification8.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 75.9%
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
cos-negN/A
cos-lowering-cos.f64N/A
sub-negN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
metadata-evalN/A
exp-lowering-exp.f64N/A
Simplified75.9%
Taylor expanded in K around 0
*-commutativeN/A
*-lowering-*.f64N/A
Simplified96.2%
Taylor expanded in l around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6437.9%
Simplified37.9%
Taylor expanded in l around 0
cos-lowering-cos.f647.5%
Simplified7.5%
Taylor expanded in M around 0
Simplified7.5%
herbie shell --seed 2024152
(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)))))))