
(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 13 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)) (+ 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((n - m)) - (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((n - m)) - (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((n - m)) - (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((n - m)) - (l + math.pow((((m + n) / 2.0) - M), 2.0))))
function code(K, m, n, M, l) return Float64(cos(M) * exp(Float64(abs(Float64(n - m)) - Float64(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((n - m)) - (l + ((((m + n) / 2.0) - M) ^ 2.0)))); end
code[K_, m_, n_, M_, l_] := N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] - N[(l + N[Power[N[(N[(N[(m + n), $MachinePrecision] / 2.0), $MachinePrecision] - M), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos M \cdot e^{\left|n - m\right| - \left(\ell + {\left(\frac{m + n}{2} - M\right)}^{2}\right)}
\end{array}
Initial program 76.7%
associate-/l*76.3%
exp-diff23.1%
sub-neg23.1%
exp-sum16.9%
associate-/r*16.9%
exp-diff24.3%
exp-diff76.3%
sub-neg76.3%
remove-double-neg76.3%
fabs-sub76.3%
Simplified76.3%
Taylor expanded in K around 0 96.7%
cos-neg96.7%
Simplified96.7%
Final simplification96.7%
(FPCore (K m n M l)
:precision binary64
(if (<= m -1e+14)
(* (cos M) (exp (* (pow m 2.0) -0.25)))
(*
(cos M)
(exp (+ (fabs (- n m)) (- (* (- (* n 0.5) M) (- (- M (* n 0.5)) m)) l))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (m <= -1e+14) {
tmp = cos(M) * exp((pow(m, 2.0) * -0.25));
} else {
tmp = cos(M) * exp((fabs((n - m)) + ((((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) :: tmp
if (m <= (-1d+14)) then
tmp = cos(m_1) * exp(((m ** 2.0d0) * (-0.25d0)))
else
tmp = cos(m_1) * exp((abs((n - m)) + ((((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 tmp;
if (m <= -1e+14) {
tmp = Math.cos(M) * Math.exp((Math.pow(m, 2.0) * -0.25));
} else {
tmp = Math.cos(M) * Math.exp((Math.abs((n - m)) + ((((n * 0.5) - M) * ((M - (n * 0.5)) - m)) - l)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if m <= -1e+14: tmp = math.cos(M) * math.exp((math.pow(m, 2.0) * -0.25)) else: tmp = math.cos(M) * math.exp((math.fabs((n - m)) + ((((n * 0.5) - M) * ((M - (n * 0.5)) - m)) - l))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (m <= -1e+14) tmp = Float64(cos(M) * exp(Float64((m ^ 2.0) * -0.25))); else tmp = Float64(cos(M) * exp(Float64(abs(Float64(n - m)) + 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) tmp = 0.0; if (m <= -1e+14) tmp = cos(M) * exp(((m ^ 2.0) * -0.25)); else tmp = cos(M) * exp((abs((n - m)) + ((((n * 0.5) - M) * ((M - (n * 0.5)) - m)) - l))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[m, -1e+14], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[Power[m, 2.0], $MachinePrecision] * -0.25), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] + 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]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -1 \cdot 10^{+14}:\\
\;\;\;\;\cos M \cdot e^{{m}^{2} \cdot -0.25}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{\left|n - m\right| + \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 < -1e14Initial program 69.5%
associate-/l*69.5%
exp-diff8.5%
sub-neg8.5%
exp-sum0.0%
associate-/r*0.0%
exp-diff6.8%
exp-diff69.5%
sub-neg69.5%
remove-double-neg69.5%
fabs-sub69.5%
Simplified69.5%
Taylor expanded in K around 0 98.3%
cos-neg98.3%
Simplified98.3%
Taylor expanded in n around 0 91.6%
+-commutative91.6%
unpow291.6%
distribute-rgt-out96.6%
*-commutative96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in m around inf 93.3%
*-commutative93.3%
Simplified93.3%
if -1e14 < m Initial program 78.8%
associate-/l*78.3%
exp-diff27.5%
sub-neg27.5%
exp-sum21.9%
associate-/r*21.9%
exp-diff29.6%
exp-diff78.3%
sub-neg78.3%
remove-double-neg78.3%
fabs-sub78.3%
Simplified78.3%
Taylor expanded in K around 0 96.2%
cos-neg96.2%
Simplified96.2%
Taylor expanded in m around 0 75.1%
+-commutative75.1%
unpow275.1%
distribute-rgt-out82.2%
*-commutative82.2%
*-commutative82.2%
Simplified82.2%
Final simplification84.8%
(FPCore (K m n M l) :precision binary64 (if (<= n 98.0) (exp (+ (fabs (- n m)) (- (* (- (* m 0.5) M) (- M (+ n (* m 0.5)))) l))) (* (cos M) (exp (* -0.25 (pow n 2.0))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (n <= 98.0) {
tmp = exp((fabs((n - m)) + ((((m * 0.5) - M) * (M - (n + (m * 0.5)))) - l)));
} else {
tmp = cos(M) * exp((-0.25 * pow(n, 2.0)));
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: tmp
if (n <= 98.0d0) then
tmp = exp((abs((n - m)) + ((((m * 0.5d0) - m_1) * (m_1 - (n + (m * 0.5d0)))) - l)))
else
tmp = cos(m_1) * exp(((-0.25d0) * (n ** 2.0d0)))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (n <= 98.0) {
tmp = Math.exp((Math.abs((n - m)) + ((((m * 0.5) - M) * (M - (n + (m * 0.5)))) - l)));
} else {
tmp = Math.cos(M) * Math.exp((-0.25 * Math.pow(n, 2.0)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if n <= 98.0: tmp = math.exp((math.fabs((n - m)) + ((((m * 0.5) - M) * (M - (n + (m * 0.5)))) - l))) else: tmp = math.cos(M) * math.exp((-0.25 * math.pow(n, 2.0))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (n <= 98.0) tmp = exp(Float64(abs(Float64(n - m)) + Float64(Float64(Float64(Float64(m * 0.5) - M) * Float64(M - Float64(n + Float64(m * 0.5)))) - l))); else tmp = Float64(cos(M) * exp(Float64(-0.25 * (n ^ 2.0)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (n <= 98.0) tmp = exp((abs((n - m)) + ((((m * 0.5) - M) * (M - (n + (m * 0.5)))) - l))); else tmp = cos(M) * exp((-0.25 * (n ^ 2.0))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[n, 98.0], N[Exp[N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] + N[(N[(N[(N[(m * 0.5), $MachinePrecision] - M), $MachinePrecision] * N[(M - N[(n + N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(-0.25 * N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 98:\\
\;\;\;\;e^{\left|n - m\right| + \left(\left(m \cdot 0.5 - M\right) \cdot \left(M - \left(n + m \cdot 0.5\right)\right) - \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{-0.25 \cdot {n}^{2}}\\
\end{array}
\end{array}
if n < 98Initial program 78.1%
associate-/l*77.6%
exp-diff28.8%
sub-neg28.8%
exp-sum22.2%
associate-/r*22.2%
exp-diff30.4%
exp-diff77.6%
sub-neg77.6%
remove-double-neg77.6%
fabs-sub77.6%
Simplified77.6%
Taylor expanded in n around 0 69.1%
+-commutative82.6%
unpow282.6%
distribute-rgt-out84.7%
*-commutative84.7%
*-commutative84.7%
Simplified70.1%
Taylor expanded in M around 0 70.1%
*-commutative70.1%
*-commutative70.1%
associate-*r*70.1%
Simplified70.1%
Taylor expanded in K around 0 84.7%
if 98 < n Initial program 72.1%
associate-/l*72.1%
exp-diff4.9%
sub-neg4.9%
exp-sum0.0%
associate-/r*0.0%
exp-diff4.9%
exp-diff72.1%
sub-neg72.1%
remove-double-neg72.1%
fabs-sub72.1%
Simplified72.1%
Taylor expanded in K around 0 98.4%
cos-neg98.4%
Simplified98.4%
Taylor expanded in m around 0 85.4%
+-commutative85.4%
unpow285.4%
distribute-rgt-out90.3%
*-commutative90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in n around inf 93.5%
*-commutative93.5%
Simplified93.5%
Final simplification86.8%
(FPCore (K m n M l) :precision binary64 (if (<= M 0.00072) (exp (+ (fabs (- n m)) (- (* (- (* m 0.5) M) (- M (+ n (* m 0.5)))) l))) (* (cos M) (exp (* M (- m M))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (M <= 0.00072) {
tmp = exp((fabs((n - m)) + ((((m * 0.5) - M) * (M - (n + (m * 0.5)))) - l)));
} else {
tmp = cos(M) * exp((M * (m - 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) :: tmp
if (m_1 <= 0.00072d0) then
tmp = exp((abs((n - m)) + ((((m * 0.5d0) - m_1) * (m_1 - (n + (m * 0.5d0)))) - l)))
else
tmp = cos(m_1) * exp((m_1 * (m - m_1)))
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.00072) {
tmp = Math.exp((Math.abs((n - m)) + ((((m * 0.5) - M) * (M - (n + (m * 0.5)))) - l)));
} else {
tmp = Math.cos(M) * Math.exp((M * (m - M)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if M <= 0.00072: tmp = math.exp((math.fabs((n - m)) + ((((m * 0.5) - M) * (M - (n + (m * 0.5)))) - l))) else: tmp = math.cos(M) * math.exp((M * (m - M))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (M <= 0.00072) tmp = exp(Float64(abs(Float64(n - m)) + Float64(Float64(Float64(Float64(m * 0.5) - M) * Float64(M - Float64(n + Float64(m * 0.5)))) - l))); else tmp = Float64(cos(M) * exp(Float64(M * Float64(m - M)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (M <= 0.00072) tmp = exp((abs((n - m)) + ((((m * 0.5) - M) * (M - (n + (m * 0.5)))) - l))); else tmp = cos(M) * exp((M * (m - M))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[M, 0.00072], N[Exp[N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] + N[(N[(N[(N[(m * 0.5), $MachinePrecision] - M), $MachinePrecision] * N[(M - N[(n + N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(M * N[(m - M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq 0.00072:\\
\;\;\;\;e^{\left|n - m\right| + \left(\left(m \cdot 0.5 - M\right) \cdot \left(M - \left(n + m \cdot 0.5\right)\right) - \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{M \cdot \left(m - M\right)}\\
\end{array}
\end{array}
if M < 7.20000000000000045e-4Initial program 74.3%
associate-/l*73.7%
exp-diff20.4%
sub-neg20.4%
exp-sum14.7%
associate-/r*14.7%
exp-diff22.6%
exp-diff73.7%
sub-neg73.7%
remove-double-neg73.7%
fabs-sub73.7%
Simplified73.7%
Taylor expanded in n around 0 58.9%
+-commutative73.8%
unpow273.8%
distribute-rgt-out76.6%
*-commutative76.6%
*-commutative76.6%
Simplified60.6%
Taylor expanded in M around 0 60.6%
*-commutative60.6%
*-commutative60.6%
associate-*r*60.6%
Simplified60.6%
Taylor expanded in K around 0 75.5%
if 7.20000000000000045e-4 < M Initial program 82.1%
associate-/l*82.1%
exp-diff29.5%
sub-neg29.5%
exp-sum21.8%
associate-/r*21.8%
exp-diff28.2%
exp-diff82.1%
sub-neg82.1%
remove-double-neg82.1%
fabs-sub82.1%
Simplified82.1%
Taylor expanded in K around 0 98.7%
cos-neg98.7%
Simplified98.7%
Taylor expanded in n around 0 79.7%
+-commutative79.7%
unpow279.7%
distribute-rgt-out86.1%
*-commutative86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in M around -inf 61.8%
+-commutative61.8%
mul-1-neg61.8%
unsub-neg61.8%
+-commutative61.8%
Simplified61.8%
Taylor expanded in n around 0 72.1%
unpow272.1%
distribute-lft-out--79.8%
Simplified79.8%
Final simplification76.8%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (* (cos M) (exp (* M (- m M))))) (t_1 (exp (- l))))
(if (<= M -2.7e+161)
t_0
(if (<= M -4e+124)
(exp (* n (- M (* m 0.5))))
(if (<= M -1.65e+64)
t_0
(if (<= M -215000.0)
(* (cos M) t_1)
(if (<= M -1.4e-177)
(pow (exp n) (+ M (* m -0.5)))
(if (<= M 1.45e-103) t_1 t_0))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = cos(M) * exp((M * (m - M)));
double t_1 = exp(-l);
double tmp;
if (M <= -2.7e+161) {
tmp = t_0;
} else if (M <= -4e+124) {
tmp = exp((n * (M - (m * 0.5))));
} else if (M <= -1.65e+64) {
tmp = t_0;
} else if (M <= -215000.0) {
tmp = cos(M) * t_1;
} else if (M <= -1.4e-177) {
tmp = pow(exp(n), (M + (m * -0.5)));
} else if (M <= 1.45e-103) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = cos(m_1) * exp((m_1 * (m - m_1)))
t_1 = exp(-l)
if (m_1 <= (-2.7d+161)) then
tmp = t_0
else if (m_1 <= (-4d+124)) then
tmp = exp((n * (m_1 - (m * 0.5d0))))
else if (m_1 <= (-1.65d+64)) then
tmp = t_0
else if (m_1 <= (-215000.0d0)) then
tmp = cos(m_1) * t_1
else if (m_1 <= (-1.4d-177)) then
tmp = exp(n) ** (m_1 + (m * (-0.5d0)))
else if (m_1 <= 1.45d-103) then
tmp = t_1
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((M * (m - M)));
double t_1 = Math.exp(-l);
double tmp;
if (M <= -2.7e+161) {
tmp = t_0;
} else if (M <= -4e+124) {
tmp = Math.exp((n * (M - (m * 0.5))));
} else if (M <= -1.65e+64) {
tmp = t_0;
} else if (M <= -215000.0) {
tmp = Math.cos(M) * t_1;
} else if (M <= -1.4e-177) {
tmp = Math.pow(Math.exp(n), (M + (m * -0.5)));
} else if (M <= 1.45e-103) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.cos(M) * math.exp((M * (m - M))) t_1 = math.exp(-l) tmp = 0 if M <= -2.7e+161: tmp = t_0 elif M <= -4e+124: tmp = math.exp((n * (M - (m * 0.5)))) elif M <= -1.65e+64: tmp = t_0 elif M <= -215000.0: tmp = math.cos(M) * t_1 elif M <= -1.4e-177: tmp = math.pow(math.exp(n), (M + (m * -0.5))) elif M <= 1.45e-103: tmp = t_1 else: tmp = t_0 return tmp
function code(K, m, n, M, l) t_0 = Float64(cos(M) * exp(Float64(M * Float64(m - M)))) t_1 = exp(Float64(-l)) tmp = 0.0 if (M <= -2.7e+161) tmp = t_0; elseif (M <= -4e+124) tmp = exp(Float64(n * Float64(M - Float64(m * 0.5)))); elseif (M <= -1.65e+64) tmp = t_0; elseif (M <= -215000.0) tmp = Float64(cos(M) * t_1); elseif (M <= -1.4e-177) tmp = exp(n) ^ Float64(M + Float64(m * -0.5)); elseif (M <= 1.45e-103) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = cos(M) * exp((M * (m - M))); t_1 = exp(-l); tmp = 0.0; if (M <= -2.7e+161) tmp = t_0; elseif (M <= -4e+124) tmp = exp((n * (M - (m * 0.5)))); elseif (M <= -1.65e+64) tmp = t_0; elseif (M <= -215000.0) tmp = cos(M) * t_1; elseif (M <= -1.4e-177) tmp = exp(n) ^ (M + (m * -0.5)); elseif (M <= 1.45e-103) tmp = t_1; 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[(M * N[(m - M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[(-l)], $MachinePrecision]}, If[LessEqual[M, -2.7e+161], t$95$0, If[LessEqual[M, -4e+124], N[Exp[N[(n * N[(M - N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[M, -1.65e+64], t$95$0, If[LessEqual[M, -215000.0], N[(N[Cos[M], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[M, -1.4e-177], N[Power[N[Exp[n], $MachinePrecision], N[(M + N[(m * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[M, 1.45e-103], t$95$1, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos M \cdot e^{M \cdot \left(m - M\right)}\\
t_1 := e^{-\ell}\\
\mathbf{if}\;M \leq -2.7 \cdot 10^{+161}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;M \leq -4 \cdot 10^{+124}:\\
\;\;\;\;e^{n \cdot \left(M - m \cdot 0.5\right)}\\
\mathbf{elif}\;M \leq -1.65 \cdot 10^{+64}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;M \leq -215000:\\
\;\;\;\;\cos M \cdot t_1\\
\mathbf{elif}\;M \leq -1.4 \cdot 10^{-177}:\\
\;\;\;\;{\left(e^{n}\right)}^{\left(M + m \cdot -0.5\right)}\\
\mathbf{elif}\;M \leq 1.45 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if M < -2.6999999999999998e161 or -3.99999999999999979e124 < M < -1.64999999999999994e64 or 1.4499999999999999e-103 < M Initial program 76.6%
associate-/l*76.6%
exp-diff22.6%
sub-neg22.6%
exp-sum16.1%
associate-/r*16.1%
exp-diff23.4%
exp-diff76.6%
sub-neg76.6%
remove-double-neg76.6%
fabs-sub76.6%
Simplified76.6%
Taylor expanded in K around 0 99.3%
cos-neg99.3%
Simplified99.3%
Taylor expanded in n around 0 81.9%
+-commutative81.9%
unpow281.9%
distribute-rgt-out87.1%
*-commutative87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in M around -inf 63.1%
+-commutative63.1%
mul-1-neg63.1%
unsub-neg63.1%
+-commutative63.1%
Simplified63.1%
Taylor expanded in n around 0 72.6%
unpow272.6%
distribute-lft-out--78.5%
Simplified78.5%
if -2.6999999999999998e161 < M < -3.99999999999999979e124Initial program 28.6%
associate-/l*28.6%
exp-diff14.3%
sub-neg14.3%
exp-sum0.0%
associate-/r*0.0%
exp-diff0.0%
exp-diff28.6%
sub-neg28.6%
remove-double-neg28.6%
fabs-sub28.6%
Simplified28.6%
Taylor expanded in n around 0 28.6%
+-commutative85.7%
unpow285.7%
distribute-rgt-out85.9%
*-commutative85.9%
*-commutative85.9%
Simplified28.6%
Taylor expanded in M around 0 28.6%
*-commutative28.6%
*-commutative28.6%
associate-*r*28.6%
Simplified28.6%
Taylor expanded in n around inf 28.6%
Taylor expanded in K around 0 85.9%
if -1.64999999999999994e64 < M < -215000Initial program 73.3%
associate-/l*73.3%
exp-diff26.7%
sub-neg26.7%
exp-sum6.7%
associate-/r*6.7%
exp-diff26.7%
exp-diff73.3%
sub-neg73.3%
remove-double-neg73.3%
fabs-sub73.3%
Simplified73.3%
Taylor expanded in K around 0 93.3%
cos-neg93.3%
Simplified93.3%
Taylor expanded in n around 0 80.2%
+-commutative80.2%
unpow280.2%
distribute-rgt-out80.2%
*-commutative80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in l around inf 54.4%
neg-mul-154.4%
Simplified54.4%
if -215000 < M < -1.39999999999999993e-177Initial program 78.8%
associate-/l*75.6%
exp-diff25.6%
sub-neg25.6%
exp-sum22.5%
associate-/r*22.5%
exp-diff25.6%
exp-diff75.6%
sub-neg75.6%
remove-double-neg75.6%
fabs-sub75.6%
Simplified75.6%
Taylor expanded in n around 0 48.9%
+-commutative51.6%
unpow251.6%
distribute-rgt-out54.7%
*-commutative54.7%
*-commutative54.7%
Simplified48.9%
Taylor expanded in M around 0 52.1%
*-commutative52.1%
*-commutative52.1%
associate-*r*52.1%
Simplified52.1%
Taylor expanded in n around inf 39.9%
Taylor expanded in K around 0 42.6%
exp-prod45.6%
cancel-sign-sub-inv45.6%
metadata-eval45.6%
*-commutative45.6%
Simplified45.6%
if -1.39999999999999993e-177 < M < 1.4499999999999999e-103Initial program 81.6%
associate-/l*81.6%
exp-diff23.1%
sub-neg23.1%
exp-sum20.0%
associate-/r*20.0%
exp-diff27.7%
exp-diff81.6%
sub-neg81.6%
remove-double-neg81.6%
fabs-sub81.6%
Simplified81.6%
Taylor expanded in K around 0 96.2%
cos-neg96.2%
Simplified96.2%
Taylor expanded in n around 0 71.9%
+-commutative71.9%
unpow271.9%
distribute-rgt-out75.0%
*-commutative75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in l around inf 54.4%
neg-mul-154.4%
Simplified54.4%
Taylor expanded in M around 0 54.4%
Final simplification67.1%
(FPCore (K m n M l)
:precision binary64
(if (<= M -3.1e-83)
(* (cos M) (exp (* M (- n M))))
(if (<= M 0.00075)
(exp (- (- (fabs (- n m)) l) (* (* m 0.5) (+ n (* m 0.5)))))
(* (cos M) (exp (* M (- m M)))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (M <= -3.1e-83) {
tmp = cos(M) * exp((M * (n - M)));
} else if (M <= 0.00075) {
tmp = exp(((fabs((n - m)) - l) - ((m * 0.5) * (n + (m * 0.5)))));
} else {
tmp = cos(M) * exp((M * (m - 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) :: tmp
if (m_1 <= (-3.1d-83)) then
tmp = cos(m_1) * exp((m_1 * (n - m_1)))
else if (m_1 <= 0.00075d0) then
tmp = exp(((abs((n - m)) - l) - ((m * 0.5d0) * (n + (m * 0.5d0)))))
else
tmp = cos(m_1) * exp((m_1 * (m - m_1)))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (M <= -3.1e-83) {
tmp = Math.cos(M) * Math.exp((M * (n - M)));
} else if (M <= 0.00075) {
tmp = Math.exp(((Math.abs((n - m)) - l) - ((m * 0.5) * (n + (m * 0.5)))));
} else {
tmp = Math.cos(M) * Math.exp((M * (m - M)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if M <= -3.1e-83: tmp = math.cos(M) * math.exp((M * (n - M))) elif M <= 0.00075: tmp = math.exp(((math.fabs((n - m)) - l) - ((m * 0.5) * (n + (m * 0.5))))) else: tmp = math.cos(M) * math.exp((M * (m - M))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (M <= -3.1e-83) tmp = Float64(cos(M) * exp(Float64(M * Float64(n - M)))); elseif (M <= 0.00075) tmp = exp(Float64(Float64(abs(Float64(n - m)) - l) - Float64(Float64(m * 0.5) * Float64(n + Float64(m * 0.5))))); else tmp = Float64(cos(M) * exp(Float64(M * Float64(m - M)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (M <= -3.1e-83) tmp = cos(M) * exp((M * (n - M))); elseif (M <= 0.00075) tmp = exp(((abs((n - m)) - l) - ((m * 0.5) * (n + (m * 0.5))))); else tmp = cos(M) * exp((M * (m - M))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[M, -3.1e-83], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(M * N[(n - M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 0.00075], N[Exp[N[(N[(N[Abs[N[(n - m), $MachinePrecision]], $MachinePrecision] - l), $MachinePrecision] - N[(N[(m * 0.5), $MachinePrecision] * N[(n + N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(M * N[(m - M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq -3.1 \cdot 10^{-83}:\\
\;\;\;\;\cos M \cdot e^{M \cdot \left(n - M\right)}\\
\mathbf{elif}\;M \leq 0.00075:\\
\;\;\;\;e^{\left(\left|n - m\right| - \ell\right) - \left(m \cdot 0.5\right) \cdot \left(n + m \cdot 0.5\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{M \cdot \left(m - M\right)}\\
\end{array}
\end{array}
if M < -3.09999999999999992e-83Initial program 65.7%
associate-/l*64.5%
exp-diff16.9%
sub-neg16.9%
exp-sum9.8%
associate-/r*9.8%
exp-diff20.5%
exp-diff64.5%
sub-neg64.5%
remove-double-neg64.5%
fabs-sub64.5%
Simplified64.5%
Taylor expanded in K around 0 94.1%
cos-neg94.1%
Simplified94.1%
Taylor expanded in n around 0 75.2%
+-commutative75.2%
unpow275.2%
distribute-rgt-out77.7%
*-commutative77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in M around -inf 54.2%
+-commutative54.2%
mul-1-neg54.2%
unsub-neg54.2%
+-commutative54.2%
Simplified54.2%
Taylor expanded in m around 0 68.3%
unpow268.3%
distribute-lft-out--70.7%
Simplified70.7%
if -3.09999999999999992e-83 < M < 7.5000000000000002e-4Initial program 81.9%
associate-/l*81.9%
exp-diff23.4%
sub-neg23.4%
exp-sum19.2%
associate-/r*19.2%
exp-diff24.5%
exp-diff81.9%
sub-neg81.9%
remove-double-neg81.9%
fabs-sub81.9%
Simplified81.9%
Taylor expanded in n around 0 61.3%
+-commutative72.5%
unpow272.5%
distribute-rgt-out75.7%
*-commutative75.7%
*-commutative75.7%
Simplified63.4%
Taylor expanded in K around 0 70.2%
cos-neg70.2%
associate-*r*70.2%
sin-neg70.2%
Simplified70.2%
Taylor expanded in M around 0 75.7%
associate--r+75.7%
fabs-sub75.7%
associate-*r*75.7%
Simplified75.7%
if 7.5000000000000002e-4 < M Initial program 82.1%
associate-/l*82.1%
exp-diff29.5%
sub-neg29.5%
exp-sum21.8%
associate-/r*21.8%
exp-diff28.2%
exp-diff82.1%
sub-neg82.1%
remove-double-neg82.1%
fabs-sub82.1%
Simplified82.1%
Taylor expanded in K around 0 98.7%
cos-neg98.7%
Simplified98.7%
Taylor expanded in n around 0 79.7%
+-commutative79.7%
unpow279.7%
distribute-rgt-out86.1%
*-commutative86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in M around -inf 61.8%
+-commutative61.8%
mul-1-neg61.8%
unsub-neg61.8%
+-commutative61.8%
Simplified61.8%
Taylor expanded in n around 0 72.1%
unpow272.1%
distribute-lft-out--79.8%
Simplified79.8%
Final simplification75.3%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (* (cos M) (exp (- l)))) (t_1 (exp (* n (- M (* m 0.5))))))
(if (<= l -4.5e+258)
(pow (exp n) (+ M (* m -0.5)))
(if (<= l -9.8e+174)
t_0
(if (<= l -4.8e+41)
t_1
(if (<= l -2.6e-81)
(* (cos M) (exp (* M m)))
(if (<= l 5.9e-12) t_1 t_0)))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = cos(M) * exp(-l);
double t_1 = exp((n * (M - (m * 0.5))));
double tmp;
if (l <= -4.5e+258) {
tmp = pow(exp(n), (M + (m * -0.5)));
} else if (l <= -9.8e+174) {
tmp = t_0;
} else if (l <= -4.8e+41) {
tmp = t_1;
} else if (l <= -2.6e-81) {
tmp = cos(M) * exp((M * m));
} else if (l <= 5.9e-12) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = cos(m_1) * exp(-l)
t_1 = exp((n * (m_1 - (m * 0.5d0))))
if (l <= (-4.5d+258)) then
tmp = exp(n) ** (m_1 + (m * (-0.5d0)))
else if (l <= (-9.8d+174)) then
tmp = t_0
else if (l <= (-4.8d+41)) then
tmp = t_1
else if (l <= (-2.6d-81)) then
tmp = cos(m_1) * exp((m_1 * m))
else if (l <= 5.9d-12) then
tmp = t_1
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(-l);
double t_1 = Math.exp((n * (M - (m * 0.5))));
double tmp;
if (l <= -4.5e+258) {
tmp = Math.pow(Math.exp(n), (M + (m * -0.5)));
} else if (l <= -9.8e+174) {
tmp = t_0;
} else if (l <= -4.8e+41) {
tmp = t_1;
} else if (l <= -2.6e-81) {
tmp = Math.cos(M) * Math.exp((M * m));
} else if (l <= 5.9e-12) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.cos(M) * math.exp(-l) t_1 = math.exp((n * (M - (m * 0.5)))) tmp = 0 if l <= -4.5e+258: tmp = math.pow(math.exp(n), (M + (m * -0.5))) elif l <= -9.8e+174: tmp = t_0 elif l <= -4.8e+41: tmp = t_1 elif l <= -2.6e-81: tmp = math.cos(M) * math.exp((M * m)) elif l <= 5.9e-12: tmp = t_1 else: tmp = t_0 return tmp
function code(K, m, n, M, l) t_0 = Float64(cos(M) * exp(Float64(-l))) t_1 = exp(Float64(n * Float64(M - Float64(m * 0.5)))) tmp = 0.0 if (l <= -4.5e+258) tmp = exp(n) ^ Float64(M + Float64(m * -0.5)); elseif (l <= -9.8e+174) tmp = t_0; elseif (l <= -4.8e+41) tmp = t_1; elseif (l <= -2.6e-81) tmp = Float64(cos(M) * exp(Float64(M * m))); elseif (l <= 5.9e-12) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = cos(M) * exp(-l); t_1 = exp((n * (M - (m * 0.5)))); tmp = 0.0; if (l <= -4.5e+258) tmp = exp(n) ^ (M + (m * -0.5)); elseif (l <= -9.8e+174) tmp = t_0; elseif (l <= -4.8e+41) tmp = t_1; elseif (l <= -2.6e-81) tmp = cos(M) * exp((M * m)); elseif (l <= 5.9e-12) tmp = t_1; 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[(-l)], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(n * N[(M - N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -4.5e+258], N[Power[N[Exp[n], $MachinePrecision], N[(M + N[(m * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -9.8e+174], t$95$0, If[LessEqual[l, -4.8e+41], t$95$1, If[LessEqual[l, -2.6e-81], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(M * m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5.9e-12], t$95$1, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos M \cdot e^{-\ell}\\
t_1 := e^{n \cdot \left(M - m \cdot 0.5\right)}\\
\mathbf{if}\;\ell \leq -4.5 \cdot 10^{+258}:\\
\;\;\;\;{\left(e^{n}\right)}^{\left(M + m \cdot -0.5\right)}\\
\mathbf{elif}\;\ell \leq -9.8 \cdot 10^{+174}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \leq -4.8 \cdot 10^{+41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq -2.6 \cdot 10^{-81}:\\
\;\;\;\;\cos M \cdot e^{M \cdot m}\\
\mathbf{elif}\;\ell \leq 5.9 \cdot 10^{-12}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if l < -4.5000000000000004e258Initial program 75.0%
associate-/l*75.0%
exp-diff6.3%
sub-neg6.3%
exp-sum6.3%
associate-/r*6.3%
exp-diff43.8%
exp-diff75.0%
sub-neg75.0%
remove-double-neg75.0%
fabs-sub75.0%
Simplified75.0%
Taylor expanded in n around 0 62.6%
+-commutative62.7%
unpow262.7%
distribute-rgt-out68.9%
*-commutative68.9%
*-commutative68.9%
Simplified68.8%
Taylor expanded in M around 0 68.8%
*-commutative68.8%
*-commutative68.8%
associate-*r*68.8%
Simplified68.8%
Taylor expanded in n around inf 32.3%
Taylor expanded in K around 0 44.8%
exp-prod44.9%
cancel-sign-sub-inv44.9%
metadata-eval44.9%
*-commutative44.9%
Simplified44.9%
if -4.5000000000000004e258 < l < -9.7999999999999993e174 or 5.9e-12 < l Initial program 74.4%
associate-/l*74.4%
exp-diff36.0%
sub-neg36.0%
exp-sum17.4%
associate-/r*17.4%
exp-diff24.4%
exp-diff74.4%
sub-neg74.4%
remove-double-neg74.4%
fabs-sub74.4%
Simplified74.4%
Taylor expanded in K around 0 98.8%
cos-neg98.8%
Simplified98.8%
Taylor expanded in n around 0 85.0%
+-commutative85.0%
unpow285.0%
distribute-rgt-out89.7%
*-commutative89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in l around inf 89.7%
neg-mul-189.7%
Simplified89.7%
if -9.7999999999999993e174 < l < -4.8000000000000003e41 or -2.5999999999999999e-81 < l < 5.9e-12Initial program 78.3%
associate-/l*77.7%
exp-diff18.0%
sub-neg18.0%
exp-sum18.0%
associate-/r*18.0%
exp-diff20.3%
exp-diff77.7%
sub-neg77.7%
remove-double-neg77.7%
fabs-sub77.7%
Simplified77.7%
Taylor expanded in n around 0 60.3%
+-commutative72.1%
unpow272.1%
distribute-rgt-out76.0%
*-commutative76.0%
*-commutative76.0%
Simplified61.9%
Taylor expanded in M around 0 62.5%
*-commutative62.5%
*-commutative62.5%
associate-*r*62.5%
Simplified62.5%
Taylor expanded in n around inf 36.9%
Taylor expanded in K around 0 46.6%
if -4.8000000000000003e41 < l < -2.5999999999999999e-81Initial program 76.8%
associate-/l*76.1%
exp-diff16.1%
sub-neg16.1%
exp-sum16.1%
associate-/r*16.1%
exp-diff32.1%
exp-diff76.1%
sub-neg76.1%
remove-double-neg76.1%
fabs-sub76.1%
Simplified76.1%
Taylor expanded in K around 0 93.1%
cos-neg93.1%
Simplified93.1%
Taylor expanded in n around 0 69.4%
+-commutative69.4%
unpow269.4%
distribute-rgt-out69.5%
*-commutative69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in M around -inf 46.0%
+-commutative46.0%
mul-1-neg46.0%
unsub-neg46.0%
+-commutative46.0%
Simplified46.0%
Taylor expanded in m around inf 19.1%
Final simplification58.3%
(FPCore (K m n M l) :precision binary64 (if (<= M -4e-187) (* (cos M) (exp (* M (- n M)))) (if (<= M 5e-100) (exp (- l)) (* (cos M) (exp (* M (- m M)))))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (M <= -4e-187) {
tmp = cos(M) * exp((M * (n - M)));
} else if (M <= 5e-100) {
tmp = exp(-l);
} else {
tmp = cos(M) * exp((M * (m - 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) :: tmp
if (m_1 <= (-4d-187)) then
tmp = cos(m_1) * exp((m_1 * (n - m_1)))
else if (m_1 <= 5d-100) then
tmp = exp(-l)
else
tmp = cos(m_1) * exp((m_1 * (m - m_1)))
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (M <= -4e-187) {
tmp = Math.cos(M) * Math.exp((M * (n - M)));
} else if (M <= 5e-100) {
tmp = Math.exp(-l);
} else {
tmp = Math.cos(M) * Math.exp((M * (m - M)));
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if M <= -4e-187: tmp = math.cos(M) * math.exp((M * (n - M))) elif M <= 5e-100: tmp = math.exp(-l) else: tmp = math.cos(M) * math.exp((M * (m - M))) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (M <= -4e-187) tmp = Float64(cos(M) * exp(Float64(M * Float64(n - M)))); elseif (M <= 5e-100) tmp = exp(Float64(-l)); else tmp = Float64(cos(M) * exp(Float64(M * Float64(m - M)))); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (M <= -4e-187) tmp = cos(M) * exp((M * (n - M))); elseif (M <= 5e-100) tmp = exp(-l); else tmp = cos(M) * exp((M * (m - M))); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[M, -4e-187], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(M * N[(n - M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 5e-100], N[Exp[(-l)], $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(M * N[(m - M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq -4 \cdot 10^{-187}:\\
\;\;\;\;\cos M \cdot e^{M \cdot \left(n - M\right)}\\
\mathbf{elif}\;M \leq 5 \cdot 10^{-100}:\\
\;\;\;\;e^{-\ell}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{M \cdot \left(m - M\right)}\\
\end{array}
\end{array}
if M < -4.0000000000000001e-187Initial program 70.5%
associate-/l*69.5%
exp-diff20.0%
sub-neg20.0%
exp-sum13.1%
associate-/r*13.1%
exp-diff22.0%
exp-diff69.5%
sub-neg69.5%
remove-double-neg69.5%
fabs-sub69.5%
Simplified69.5%
Taylor expanded in K around 0 95.1%
cos-neg95.1%
Simplified95.1%
Taylor expanded in n around 0 73.8%
+-commutative73.8%
unpow273.8%
distribute-rgt-out76.9%
*-commutative76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in M around -inf 52.4%
+-commutative52.4%
mul-1-neg52.4%
unsub-neg52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in m around 0 59.4%
unpow259.4%
distribute-lft-out--61.4%
Simplified61.4%
if -4.0000000000000001e-187 < M < 5.0000000000000001e-100Initial program 80.7%
associate-/l*80.7%
exp-diff22.6%
sub-neg22.6%
exp-sum19.4%
associate-/r*19.4%
exp-diff27.5%
exp-diff80.7%
sub-neg80.7%
remove-double-neg80.7%
fabs-sub80.7%
Simplified80.7%
Taylor expanded in K around 0 96.0%
cos-neg96.0%
Simplified96.0%
Taylor expanded in n around 0 72.1%
+-commutative72.1%
unpow272.1%
distribute-rgt-out75.4%
*-commutative75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in l around inf 53.8%
neg-mul-153.8%
Simplified53.8%
Taylor expanded in M around 0 53.8%
if 5.0000000000000001e-100 < M Initial program 80.6%
associate-/l*80.6%
exp-diff26.9%
sub-neg26.9%
exp-sum19.4%
associate-/r*19.4%
exp-diff24.7%
exp-diff80.6%
sub-neg80.6%
remove-double-neg80.6%
fabs-sub80.6%
Simplified80.6%
Taylor expanded in K around 0 98.9%
cos-neg98.9%
Simplified98.9%
Taylor expanded in n around 0 79.8%
+-commutative79.8%
unpow279.8%
distribute-rgt-out85.2%
*-commutative85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in M around -inf 58.5%
+-commutative58.5%
mul-1-neg58.5%
unsub-neg58.5%
+-commutative58.5%
Simplified58.5%
Taylor expanded in n around 0 66.1%
unpow266.1%
distribute-lft-out--72.6%
Simplified72.6%
Final simplification63.6%
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (exp (* n (- M (* m 0.5))))))
(if (<= l -3.1e+265)
t_0
(if (<= l -1.65e-82)
(* (cos M) (exp (* M m)))
(if (<= l 5.9e-12) t_0 (* (cos M) (exp (- l))))))))
double code(double K, double m, double n, double M, double l) {
double t_0 = exp((n * (M - (m * 0.5))));
double tmp;
if (l <= -3.1e+265) {
tmp = t_0;
} else if (l <= -1.65e-82) {
tmp = cos(M) * exp((M * m));
} else if (l <= 5.9e-12) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = exp((n * (m_1 - (m * 0.5d0))))
if (l <= (-3.1d+265)) then
tmp = t_0
else if (l <= (-1.65d-82)) then
tmp = cos(m_1) * exp((m_1 * m))
else if (l <= 5.9d-12) then
tmp = t_0
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 t_0 = Math.exp((n * (M - (m * 0.5))));
double tmp;
if (l <= -3.1e+265) {
tmp = t_0;
} else if (l <= -1.65e-82) {
tmp = Math.cos(M) * Math.exp((M * m));
} else if (l <= 5.9e-12) {
tmp = t_0;
} else {
tmp = Math.cos(M) * Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): t_0 = math.exp((n * (M - (m * 0.5)))) tmp = 0 if l <= -3.1e+265: tmp = t_0 elif l <= -1.65e-82: tmp = math.cos(M) * math.exp((M * m)) elif l <= 5.9e-12: tmp = t_0 else: tmp = math.cos(M) * math.exp(-l) return tmp
function code(K, m, n, M, l) t_0 = exp(Float64(n * Float64(M - Float64(m * 0.5)))) tmp = 0.0 if (l <= -3.1e+265) tmp = t_0; elseif (l <= -1.65e-82) tmp = Float64(cos(M) * exp(Float64(M * m))); elseif (l <= 5.9e-12) tmp = t_0; else tmp = Float64(cos(M) * exp(Float64(-l))); end return tmp end
function tmp_2 = code(K, m, n, M, l) t_0 = exp((n * (M - (m * 0.5)))); tmp = 0.0; if (l <= -3.1e+265) tmp = t_0; elseif (l <= -1.65e-82) tmp = cos(M) * exp((M * m)); elseif (l <= 5.9e-12) tmp = t_0; else tmp = cos(M) * exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := Block[{t$95$0 = N[Exp[N[(n * N[(M - N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -3.1e+265], t$95$0, If[LessEqual[l, -1.65e-82], N[(N[Cos[M], $MachinePrecision] * N[Exp[N[(M * m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5.9e-12], t$95$0, N[(N[Cos[M], $MachinePrecision] * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{n \cdot \left(M - m \cdot 0.5\right)}\\
\mathbf{if}\;\ell \leq -3.1 \cdot 10^{+265}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \leq -1.65 \cdot 10^{-82}:\\
\;\;\;\;\cos M \cdot e^{M \cdot m}\\
\mathbf{elif}\;\ell \leq 5.9 \cdot 10^{-12}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{-\ell}\\
\end{array}
\end{array}
if l < -3.10000000000000008e265 or -1.65000000000000011e-82 < l < 5.9e-12Initial program 79.2%
associate-/l*79.3%
exp-diff17.7%
sub-neg17.7%
exp-sum17.7%
associate-/r*17.7%
exp-diff22.7%
exp-diff79.3%
sub-neg79.3%
remove-double-neg79.3%
fabs-sub79.3%
Simplified79.3%
Taylor expanded in n around 0 61.5%
+-commutative70.8%
unpow270.8%
distribute-rgt-out74.2%
*-commutative74.2%
*-commutative74.2%
Simplified64.0%
Taylor expanded in M around 0 63.9%
*-commutative63.9%
*-commutative63.9%
associate-*r*63.9%
Simplified63.9%
Taylor expanded in n around inf 39.5%
Taylor expanded in K around 0 49.0%
if -3.10000000000000008e265 < l < -1.65000000000000011e-82Initial program 74.6%
associate-/l*72.8%
exp-diff12.2%
sub-neg12.2%
exp-sum12.2%
associate-/r*12.2%
exp-diff31.9%
exp-diff72.8%
sub-neg72.8%
remove-double-neg72.8%
fabs-sub72.8%
Simplified72.8%
Taylor expanded in K around 0 94.4%
cos-neg94.4%
Simplified94.4%
Taylor expanded in n around 0 74.8%
+-commutative74.8%
unpow274.8%
distribute-rgt-out79.5%
*-commutative79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in M around -inf 37.9%
+-commutative37.9%
mul-1-neg37.9%
unsub-neg37.9%
+-commutative37.9%
Simplified37.9%
Taylor expanded in m around inf 19.1%
if 5.9e-12 < l Initial program 74.3%
associate-/l*74.3%
exp-diff42.9%
sub-neg42.9%
exp-sum20.0%
associate-/r*20.0%
exp-diff20.0%
exp-diff74.3%
sub-neg74.3%
remove-double-neg74.3%
fabs-sub74.3%
Simplified74.3%
Taylor expanded in K around 0 100.0%
cos-neg100.0%
Simplified100.0%
Taylor expanded in n around 0 84.4%
+-commutative84.4%
unpow284.4%
distribute-rgt-out88.8%
*-commutative88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in l around inf 98.6%
neg-mul-198.6%
Simplified98.6%
Final simplification54.9%
(FPCore (K m n M l) :precision binary64 (if (<= l 5.9e-12) (exp (* n (- M (* m 0.5)))) (* (cos M) (exp (- l)))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= 5.9e-12) {
tmp = exp((n * (M - (m * 0.5))));
} 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 <= 5.9d-12) then
tmp = exp((n * (m_1 - (m * 0.5d0))))
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 <= 5.9e-12) {
tmp = Math.exp((n * (M - (m * 0.5))));
} else {
tmp = Math.cos(M) * Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= 5.9e-12: tmp = math.exp((n * (M - (m * 0.5)))) else: tmp = math.cos(M) * math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= 5.9e-12) tmp = exp(Float64(n * Float64(M - Float64(m * 0.5)))); 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 <= 5.9e-12) tmp = exp((n * (M - (m * 0.5)))); else tmp = cos(M) * exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, 5.9e-12], N[Exp[N[(n * N[(M - N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Cos[M], $MachinePrecision] * N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.9 \cdot 10^{-12}:\\
\;\;\;\;e^{n \cdot \left(M - m \cdot 0.5\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos M \cdot e^{-\ell}\\
\end{array}
\end{array}
if l < 5.9e-12Initial program 77.5%
associate-/l*77.0%
exp-diff15.7%
sub-neg15.7%
exp-sum15.7%
associate-/r*15.7%
exp-diff25.9%
exp-diff77.0%
sub-neg77.0%
remove-double-neg77.0%
fabs-sub77.0%
Simplified77.0%
Taylor expanded in n around 0 61.2%
+-commutative72.2%
unpow272.2%
distribute-rgt-out76.1%
*-commutative76.1%
*-commutative76.1%
Simplified63.4%
Taylor expanded in M around 0 63.4%
*-commutative63.4%
*-commutative63.4%
associate-*r*63.4%
Simplified63.4%
Taylor expanded in n around inf 33.1%
Taylor expanded in K around 0 41.5%
if 5.9e-12 < l Initial program 74.3%
associate-/l*74.3%
exp-diff42.9%
sub-neg42.9%
exp-sum20.0%
associate-/r*20.0%
exp-diff20.0%
exp-diff74.3%
sub-neg74.3%
remove-double-neg74.3%
fabs-sub74.3%
Simplified74.3%
Taylor expanded in K around 0 100.0%
cos-neg100.0%
Simplified100.0%
Taylor expanded in n around 0 84.4%
+-commutative84.4%
unpow284.4%
distribute-rgt-out88.8%
*-commutative88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in l around inf 98.6%
neg-mul-198.6%
Simplified98.6%
Final simplification57.1%
(FPCore (K m n M l) :precision binary64 (if (<= l 5.9e-12) (exp (* n (- M (* m 0.5)))) (exp (- l))))
double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= 5.9e-12) {
tmp = exp((n * (M - (m * 0.5))));
} else {
tmp = exp(-l);
}
return tmp;
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
real(8) :: tmp
if (l <= 5.9d-12) then
tmp = exp((n * (m_1 - (m * 0.5d0))))
else
tmp = exp(-l)
end if
code = tmp
end function
public static double code(double K, double m, double n, double M, double l) {
double tmp;
if (l <= 5.9e-12) {
tmp = Math.exp((n * (M - (m * 0.5))));
} else {
tmp = Math.exp(-l);
}
return tmp;
}
def code(K, m, n, M, l): tmp = 0 if l <= 5.9e-12: tmp = math.exp((n * (M - (m * 0.5)))) else: tmp = math.exp(-l) return tmp
function code(K, m, n, M, l) tmp = 0.0 if (l <= 5.9e-12) tmp = exp(Float64(n * Float64(M - Float64(m * 0.5)))); else tmp = exp(Float64(-l)); end return tmp end
function tmp_2 = code(K, m, n, M, l) tmp = 0.0; if (l <= 5.9e-12) tmp = exp((n * (M - (m * 0.5)))); else tmp = exp(-l); end tmp_2 = tmp; end
code[K_, m_, n_, M_, l_] := If[LessEqual[l, 5.9e-12], N[Exp[N[(n * N[(M - N[(m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[(-l)], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.9 \cdot 10^{-12}:\\
\;\;\;\;e^{n \cdot \left(M - m \cdot 0.5\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{-\ell}\\
\end{array}
\end{array}
if l < 5.9e-12Initial program 77.5%
associate-/l*77.0%
exp-diff15.7%
sub-neg15.7%
exp-sum15.7%
associate-/r*15.7%
exp-diff25.9%
exp-diff77.0%
sub-neg77.0%
remove-double-neg77.0%
fabs-sub77.0%
Simplified77.0%
Taylor expanded in n around 0 61.2%
+-commutative72.2%
unpow272.2%
distribute-rgt-out76.1%
*-commutative76.1%
*-commutative76.1%
Simplified63.4%
Taylor expanded in M around 0 63.4%
*-commutative63.4%
*-commutative63.4%
associate-*r*63.4%
Simplified63.4%
Taylor expanded in n around inf 33.1%
Taylor expanded in K around 0 41.5%
if 5.9e-12 < l Initial program 74.3%
associate-/l*74.3%
exp-diff42.9%
sub-neg42.9%
exp-sum20.0%
associate-/r*20.0%
exp-diff20.0%
exp-diff74.3%
sub-neg74.3%
remove-double-neg74.3%
fabs-sub74.3%
Simplified74.3%
Taylor expanded in K around 0 100.0%
cos-neg100.0%
Simplified100.0%
Taylor expanded in n around 0 84.4%
+-commutative84.4%
unpow284.4%
distribute-rgt-out88.8%
*-commutative88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in l around inf 98.6%
neg-mul-198.6%
Simplified98.6%
Taylor expanded in M around 0 98.6%
Final simplification57.1%
(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 76.7%
associate-/l*76.3%
exp-diff23.1%
sub-neg23.1%
exp-sum16.9%
associate-/r*16.9%
exp-diff24.3%
exp-diff76.3%
sub-neg76.3%
remove-double-neg76.3%
fabs-sub76.3%
Simplified76.3%
Taylor expanded in K around 0 96.7%
cos-neg96.7%
Simplified96.7%
Taylor expanded in n around 0 75.6%
+-commutative75.6%
unpow275.6%
distribute-rgt-out79.5%
*-commutative79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in l around inf 38.7%
neg-mul-138.7%
Simplified38.7%
Taylor expanded in M around 0 37.9%
Final simplification37.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(M) end
function tmp = code(K, m, n, M, l) tmp = cos(M); end
code[K_, m_, n_, M_, l_] := N[Cos[M], $MachinePrecision]
\begin{array}{l}
\\
\cos M
\end{array}
Initial program 76.7%
associate-/l*76.3%
exp-diff23.1%
sub-neg23.1%
exp-sum16.9%
associate-/r*16.9%
exp-diff24.3%
exp-diff76.3%
sub-neg76.3%
remove-double-neg76.3%
fabs-sub76.3%
Simplified76.3%
Taylor expanded in K around 0 96.7%
cos-neg96.7%
Simplified96.7%
Taylor expanded in n around 0 75.6%
+-commutative75.6%
unpow275.6%
distribute-rgt-out79.5%
*-commutative79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in l around inf 38.7%
neg-mul-138.7%
Simplified38.7%
Taylor expanded in l around 0 6.7%
Final simplification6.7%
herbie shell --seed 2023299
(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)))))))