
(FPCore (J l K U) :precision binary64 (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))
double code(double J, double l, double K, double U) {
return ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = ((j * (exp(l) - exp(-l))) * cos((k / 2.0d0))) + u
end function
public static double code(double J, double l, double K, double U) {
return ((J * (Math.exp(l) - Math.exp(-l))) * Math.cos((K / 2.0))) + U;
}
def code(J, l, K, U): return ((J * (math.exp(l) - math.exp(-l))) * math.cos((K / 2.0))) + U
function code(J, l, K, U) return Float64(Float64(Float64(J * Float64(exp(l) - exp(Float64(-l)))) * cos(Float64(K / 2.0))) + U) end
function tmp = code(J, l, K, U) tmp = ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(J * N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (J l K U) :precision binary64 (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))
double code(double J, double l, double K, double U) {
return ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = ((j * (exp(l) - exp(-l))) * cos((k / 2.0d0))) + u
end function
public static double code(double J, double l, double K, double U) {
return ((J * (Math.exp(l) - Math.exp(-l))) * Math.cos((K / 2.0))) + U;
}
def code(J, l, K, U): return ((J * (math.exp(l) - math.exp(-l))) * math.cos((K / 2.0))) + U
function code(J, l, K, U) return Float64(Float64(Float64(J * Float64(exp(l) - exp(Float64(-l)))) * cos(Float64(K / 2.0))) + U) end
function tmp = code(J, l, K, U) tmp = ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(J * N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U
\end{array}
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))) (t_1 (- (exp l) (exp (- l)))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e-13)))
(+ (* (* t_1 J) t_0) U)
(+ U (* t_0 (* J (* l 2.0)))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double t_1 = exp(l) - exp(-l);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e-13)) {
tmp = ((t_1 * J) * t_0) + U;
} else {
tmp = U + (t_0 * (J * (l * 2.0)));
}
return tmp;
}
public static double code(double J, double l, double K, double U) {
double t_0 = Math.cos((K / 2.0));
double t_1 = Math.exp(l) - Math.exp(-l);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e-13)) {
tmp = ((t_1 * J) * t_0) + U;
} else {
tmp = U + (t_0 * (J * (l * 2.0)));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) t_1 = math.exp(l) - math.exp(-l) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e-13): tmp = ((t_1 * J) * t_0) + U else: tmp = U + (t_0 * (J * (l * 2.0))) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) t_1 = Float64(exp(l) - exp(Float64(-l))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e-13)) tmp = Float64(Float64(Float64(t_1 * J) * t_0) + U); else tmp = Float64(U + Float64(t_0 * Float64(J * Float64(l * 2.0)))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = cos((K / 2.0)); t_1 = exp(l) - exp(-l); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e-13))) tmp = ((t_1 * J) * t_0) + U; else tmp = U + (t_0 * (J * (l * 2.0))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e-13]], $MachinePrecision]], N[(N[(N[(t$95$1 * J), $MachinePrecision] * t$95$0), $MachinePrecision] + U), $MachinePrecision], N[(U + N[(t$95$0 * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
t_1 := e^{\ell} - e^{-\ell}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{-13}\right):\\
\;\;\;\;\left(t_1 \cdot J\right) \cdot t_0 + U\\
\mathbf{else}:\\
\;\;\;\;U + t_0 \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\end{array}
\end{array}
if (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) < -inf.0 or 4.9999999999999999e-13 < (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) Initial program 100.0%
if -inf.0 < (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) < 4.9999999999999999e-13Initial program 67.7%
Taylor expanded in l around 0 99.9%
Final simplification100.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (- (exp l) (exp (- l)))) (t_1 (* t_0 J)))
(if (<= t_0 (- INFINITY))
t_1
(if (<= t_0 5e-13) (+ U (* (cos (/ K 2.0)) (* J (* l 2.0)))) (+ t_1 U)))))
double code(double J, double l, double K, double U) {
double t_0 = exp(l) - exp(-l);
double t_1 = t_0 * J;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_0 <= 5e-13) {
tmp = U + (cos((K / 2.0)) * (J * (l * 2.0)));
} else {
tmp = t_1 + U;
}
return tmp;
}
public static double code(double J, double l, double K, double U) {
double t_0 = Math.exp(l) - Math.exp(-l);
double t_1 = t_0 * J;
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_0 <= 5e-13) {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * 2.0)));
} else {
tmp = t_1 + U;
}
return tmp;
}
def code(J, l, K, U): t_0 = math.exp(l) - math.exp(-l) t_1 = t_0 * J tmp = 0 if t_0 <= -math.inf: tmp = t_1 elif t_0 <= 5e-13: tmp = U + (math.cos((K / 2.0)) * (J * (l * 2.0))) else: tmp = t_1 + U return tmp
function code(J, l, K, U) t_0 = Float64(exp(l) - exp(Float64(-l))) t_1 = Float64(t_0 * J) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = t_1; elseif (t_0 <= 5e-13) tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * 2.0)))); else tmp = Float64(t_1 + U); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = exp(l) - exp(-l); t_1 = t_0 * J; tmp = 0.0; if (t_0 <= -Inf) tmp = t_1; elseif (t_0 <= 5e-13) tmp = U + (cos((K / 2.0)) * (J * (l * 2.0))); else tmp = t_1 + U; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * J), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], t$95$1, If[LessEqual[t$95$0, 5e-13], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + U), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\ell} - e^{-\ell}\\
t_1 := t_0 \cdot J\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{-13}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + U\\
\end{array}
\end{array}
if (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) < -inf.0Initial program 100.0%
Taylor expanded in K around 0 75.4%
Taylor expanded in J around inf 75.4%
if -inf.0 < (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) < 4.9999999999999999e-13Initial program 67.7%
Taylor expanded in l around 0 99.9%
if 4.9999999999999999e-13 < (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) Initial program 100.0%
Taylor expanded in K around 0 80.8%
Final simplification88.6%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (- (exp l) (exp (- l)))))
(if (<= t_0 (- INFINITY))
(+ U (* t_0 (+ J (* K (* -0.125 (* J K))))))
(if (<= t_0 5e-13)
(+ U (* (cos (/ K 2.0)) (* J (* l 2.0))))
(+ (* t_0 J) U)))))
double code(double J, double l, double K, double U) {
double t_0 = exp(l) - exp(-l);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = U + (t_0 * (J + (K * (-0.125 * (J * K)))));
} else if (t_0 <= 5e-13) {
tmp = U + (cos((K / 2.0)) * (J * (l * 2.0)));
} else {
tmp = (t_0 * J) + U;
}
return tmp;
}
public static double code(double J, double l, double K, double U) {
double t_0 = Math.exp(l) - Math.exp(-l);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = U + (t_0 * (J + (K * (-0.125 * (J * K)))));
} else if (t_0 <= 5e-13) {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * 2.0)));
} else {
tmp = (t_0 * J) + U;
}
return tmp;
}
def code(J, l, K, U): t_0 = math.exp(l) - math.exp(-l) tmp = 0 if t_0 <= -math.inf: tmp = U + (t_0 * (J + (K * (-0.125 * (J * K))))) elif t_0 <= 5e-13: tmp = U + (math.cos((K / 2.0)) * (J * (l * 2.0))) else: tmp = (t_0 * J) + U return tmp
function code(J, l, K, U) t_0 = Float64(exp(l) - exp(Float64(-l))) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(U + Float64(t_0 * Float64(J + Float64(K * Float64(-0.125 * Float64(J * K)))))); elseif (t_0 <= 5e-13) tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * 2.0)))); else tmp = Float64(Float64(t_0 * J) + U); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = exp(l) - exp(-l); tmp = 0.0; if (t_0 <= -Inf) tmp = U + (t_0 * (J + (K * (-0.125 * (J * K))))); elseif (t_0 <= 5e-13) tmp = U + (cos((K / 2.0)) * (J * (l * 2.0))); else tmp = (t_0 * J) + U; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(U + N[(t$95$0 * N[(J + N[(K * N[(-0.125 * N[(J * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-13], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * J), $MachinePrecision] + U), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\ell} - e^{-\ell}\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;U + t_0 \cdot \left(J + K \cdot \left(-0.125 \cdot \left(J \cdot K\right)\right)\right)\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{-13}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot J + U\\
\end{array}
\end{array}
if (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) < -inf.0Initial program 100.0%
Taylor expanded in K around 0 0.0%
+-commutative0.0%
associate-*r*0.0%
associate-*r*0.0%
distribute-rgt-out80.3%
unpow280.3%
associate-*r*80.3%
associate-*r*80.3%
Simplified80.3%
if -inf.0 < (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) < 4.9999999999999999e-13Initial program 67.7%
Taylor expanded in l around 0 99.9%
if 4.9999999999999999e-13 < (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) Initial program 100.0%
Taylor expanded in K around 0 80.8%
Final simplification89.8%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (- (exp l) (exp (- l)))))
(if (or (<= t_0 (- INFINITY)) (not (<= t_0 5e-10)))
(* t_0 J)
(+ U (* (cos (/ K 2.0)) (* J (* l 2.0)))))))
double code(double J, double l, double K, double U) {
double t_0 = exp(l) - exp(-l);
double tmp;
if ((t_0 <= -((double) INFINITY)) || !(t_0 <= 5e-10)) {
tmp = t_0 * J;
} else {
tmp = U + (cos((K / 2.0)) * (J * (l * 2.0)));
}
return tmp;
}
public static double code(double J, double l, double K, double U) {
double t_0 = Math.exp(l) - Math.exp(-l);
double tmp;
if ((t_0 <= -Double.POSITIVE_INFINITY) || !(t_0 <= 5e-10)) {
tmp = t_0 * J;
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * 2.0)));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.exp(l) - math.exp(-l) tmp = 0 if (t_0 <= -math.inf) or not (t_0 <= 5e-10): tmp = t_0 * J else: tmp = U + (math.cos((K / 2.0)) * (J * (l * 2.0))) return tmp
function code(J, l, K, U) t_0 = Float64(exp(l) - exp(Float64(-l))) tmp = 0.0 if ((t_0 <= Float64(-Inf)) || !(t_0 <= 5e-10)) tmp = Float64(t_0 * J); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * 2.0)))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = exp(l) - exp(-l); tmp = 0.0; if ((t_0 <= -Inf) || ~((t_0 <= 5e-10))) tmp = t_0 * J; else tmp = U + (cos((K / 2.0)) * (J * (l * 2.0))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, (-Infinity)], N[Not[LessEqual[t$95$0, 5e-10]], $MachinePrecision]], N[(t$95$0 * J), $MachinePrecision], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\ell} - e^{-\ell}\\
\mathbf{if}\;t_0 \leq -\infty \lor \neg \left(t_0 \leq 5 \cdot 10^{-10}\right):\\
\;\;\;\;t_0 \cdot J\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\end{array}
\end{array}
if (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) < -inf.0 or 5.00000000000000031e-10 < (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) Initial program 100.0%
Taylor expanded in K around 0 78.2%
Taylor expanded in J around inf 78.2%
if -inf.0 < (-.f64 (exp.f64 l) (exp.f64 (neg.f64 l))) < 5.00000000000000031e-10Initial program 67.9%
Taylor expanded in l around 0 99.9%
Final simplification88.6%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (- (exp l) (exp (- l)))))
(if (<= l -110.0)
(+ U (* t_0 (+ J (* K (* -0.125 (* J K))))))
(if (<= l 2.1e-10)
(+ U (* (cos (/ K 2.0)) (* J (* l 2.0))))
(if (<= l 6.5e+153)
(+ (* t_0 J) U)
(+ U (cbrt (pow (* J (* 2.0 (* l (cos (* K 0.5))))) 3.0))))))))
double code(double J, double l, double K, double U) {
double t_0 = exp(l) - exp(-l);
double tmp;
if (l <= -110.0) {
tmp = U + (t_0 * (J + (K * (-0.125 * (J * K)))));
} else if (l <= 2.1e-10) {
tmp = U + (cos((K / 2.0)) * (J * (l * 2.0)));
} else if (l <= 6.5e+153) {
tmp = (t_0 * J) + U;
} else {
tmp = U + cbrt(pow((J * (2.0 * (l * cos((K * 0.5))))), 3.0));
}
return tmp;
}
public static double code(double J, double l, double K, double U) {
double t_0 = Math.exp(l) - Math.exp(-l);
double tmp;
if (l <= -110.0) {
tmp = U + (t_0 * (J + (K * (-0.125 * (J * K)))));
} else if (l <= 2.1e-10) {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * 2.0)));
} else if (l <= 6.5e+153) {
tmp = (t_0 * J) + U;
} else {
tmp = U + Math.cbrt(Math.pow((J * (2.0 * (l * Math.cos((K * 0.5))))), 3.0));
}
return tmp;
}
function code(J, l, K, U) t_0 = Float64(exp(l) - exp(Float64(-l))) tmp = 0.0 if (l <= -110.0) tmp = Float64(U + Float64(t_0 * Float64(J + Float64(K * Float64(-0.125 * Float64(J * K)))))); elseif (l <= 2.1e-10) tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * 2.0)))); elseif (l <= 6.5e+153) tmp = Float64(Float64(t_0 * J) + U); else tmp = Float64(U + cbrt((Float64(J * Float64(2.0 * Float64(l * cos(Float64(K * 0.5))))) ^ 3.0))); end return tmp end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -110.0], N[(U + N[(t$95$0 * N[(J + N[(K * N[(-0.125 * N[(J * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.1e-10], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 6.5e+153], N[(N[(t$95$0 * J), $MachinePrecision] + U), $MachinePrecision], N[(U + N[Power[N[Power[N[(J * N[(2.0 * N[(l * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{\ell} - e^{-\ell}\\
\mathbf{if}\;\ell \leq -110:\\
\;\;\;\;U + t_0 \cdot \left(J + K \cdot \left(-0.125 \cdot \left(J \cdot K\right)\right)\right)\\
\mathbf{elif}\;\ell \leq 2.1 \cdot 10^{-10}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\mathbf{elif}\;\ell \leq 6.5 \cdot 10^{+153}:\\
\;\;\;\;t_0 \cdot J + U\\
\mathbf{else}:\\
\;\;\;\;U + \sqrt[3]{{\left(J \cdot \left(2 \cdot \left(\ell \cdot \cos \left(K \cdot 0.5\right)\right)\right)\right)}^{3}}\\
\end{array}
\end{array}
if l < -110Initial program 100.0%
Taylor expanded in K around 0 0.0%
+-commutative0.0%
associate-*r*0.0%
associate-*r*0.0%
distribute-rgt-out80.3%
unpow280.3%
associate-*r*80.3%
associate-*r*80.3%
Simplified80.3%
if -110 < l < 2.1e-10Initial program 67.7%
Taylor expanded in l around 0 99.9%
if 2.1e-10 < l < 6.49999999999999972e153Initial program 100.0%
Taylor expanded in K around 0 86.4%
if 6.49999999999999972e153 < l Initial program 100.0%
Taylor expanded in l around 0 68.2%
add-cbrt-cube91.8%
pow391.8%
associate-*l*91.8%
associate-*l*91.8%
div-inv91.8%
metadata-eval91.8%
Applied egg-rr91.8%
Final simplification92.2%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.015)
(+ U (* t_0 (* J (* l 2.0))))
(+ U (* J (+ (* l 2.0) (* 0.3333333333333333 (pow l 3.0))))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.015) {
tmp = U + (t_0 * (J * (l * 2.0)));
} else {
tmp = U + (J * ((l * 2.0) + (0.3333333333333333 * pow(l, 3.0))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = cos((k / 2.0d0))
if (t_0 <= (-0.015d0)) then
tmp = u + (t_0 * (j * (l * 2.0d0)))
else
tmp = u + (j * ((l * 2.0d0) + (0.3333333333333333d0 * (l ** 3.0d0))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = Math.cos((K / 2.0));
double tmp;
if (t_0 <= -0.015) {
tmp = U + (t_0 * (J * (l * 2.0)));
} else {
tmp = U + (J * ((l * 2.0) + (0.3333333333333333 * Math.pow(l, 3.0))));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.015: tmp = U + (t_0 * (J * (l * 2.0))) else: tmp = U + (J * ((l * 2.0) + (0.3333333333333333 * math.pow(l, 3.0)))) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.015) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(l * 2.0)))); else tmp = Float64(U + Float64(J * Float64(Float64(l * 2.0) + Float64(0.3333333333333333 * (l ^ 3.0))))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = cos((K / 2.0)); tmp = 0.0; if (t_0 <= -0.015) tmp = U + (t_0 * (J * (l * 2.0))); else tmp = U + (J * ((l * 2.0) + (0.3333333333333333 * (l ^ 3.0)))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -0.015], N[(U + N[(t$95$0 * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(J * N[(N[(l * 2.0), $MachinePrecision] + N[(0.3333333333333333 * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t_0 \leq -0.015:\\
\;\;\;\;U + t_0 \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot 2 + 0.3333333333333333 \cdot {\ell}^{3}\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K 2)) < -0.014999999999999999Initial program 81.1%
Taylor expanded in l around 0 66.0%
if -0.014999999999999999 < (cos.f64 (/.f64 K 2)) Initial program 85.7%
Taylor expanded in K around 0 85.7%
Taylor expanded in l around 0 84.5%
Final simplification80.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (+ U (* 2.0 (* J (* l (cos (* K 0.5)))))))
(t_1 (* 0.3333333333333333 (* J (pow l 3.0))))
(t_2 (+ U t_1)))
(if (<= l -2e+42)
t_2
(if (<= l 2.1e-10)
t_0
(if (<= l 5e+229) t_2 (if (<= l 3e+285) t_0 t_1))))))
double code(double J, double l, double K, double U) {
double t_0 = U + (2.0 * (J * (l * cos((K * 0.5)))));
double t_1 = 0.3333333333333333 * (J * pow(l, 3.0));
double t_2 = U + t_1;
double tmp;
if (l <= -2e+42) {
tmp = t_2;
} else if (l <= 2.1e-10) {
tmp = t_0;
} else if (l <= 5e+229) {
tmp = t_2;
} else if (l <= 3e+285) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = u + (2.0d0 * (j * (l * cos((k * 0.5d0)))))
t_1 = 0.3333333333333333d0 * (j * (l ** 3.0d0))
t_2 = u + t_1
if (l <= (-2d+42)) then
tmp = t_2
else if (l <= 2.1d-10) then
tmp = t_0
else if (l <= 5d+229) then
tmp = t_2
else if (l <= 3d+285) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = U + (2.0 * (J * (l * Math.cos((K * 0.5)))));
double t_1 = 0.3333333333333333 * (J * Math.pow(l, 3.0));
double t_2 = U + t_1;
double tmp;
if (l <= -2e+42) {
tmp = t_2;
} else if (l <= 2.1e-10) {
tmp = t_0;
} else if (l <= 5e+229) {
tmp = t_2;
} else if (l <= 3e+285) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(J, l, K, U): t_0 = U + (2.0 * (J * (l * math.cos((K * 0.5))))) t_1 = 0.3333333333333333 * (J * math.pow(l, 3.0)) t_2 = U + t_1 tmp = 0 if l <= -2e+42: tmp = t_2 elif l <= 2.1e-10: tmp = t_0 elif l <= 5e+229: tmp = t_2 elif l <= 3e+285: tmp = t_0 else: tmp = t_1 return tmp
function code(J, l, K, U) t_0 = Float64(U + Float64(2.0 * Float64(J * Float64(l * cos(Float64(K * 0.5)))))) t_1 = Float64(0.3333333333333333 * Float64(J * (l ^ 3.0))) t_2 = Float64(U + t_1) tmp = 0.0 if (l <= -2e+42) tmp = t_2; elseif (l <= 2.1e-10) tmp = t_0; elseif (l <= 5e+229) tmp = t_2; elseif (l <= 3e+285) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = U + (2.0 * (J * (l * cos((K * 0.5))))); t_1 = 0.3333333333333333 * (J * (l ^ 3.0)); t_2 = U + t_1; tmp = 0.0; if (l <= -2e+42) tmp = t_2; elseif (l <= 2.1e-10) tmp = t_0; elseif (l <= 5e+229) tmp = t_2; elseif (l <= 3e+285) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(U + N[(2.0 * N[(J * N[(l * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.3333333333333333 * N[(J * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(U + t$95$1), $MachinePrecision]}, If[LessEqual[l, -2e+42], t$95$2, If[LessEqual[l, 2.1e-10], t$95$0, If[LessEqual[l, 5e+229], t$95$2, If[LessEqual[l, 3e+285], t$95$0, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := U + 2 \cdot \left(J \cdot \left(\ell \cdot \cos \left(K \cdot 0.5\right)\right)\right)\\
t_1 := 0.3333333333333333 \cdot \left(J \cdot {\ell}^{3}\right)\\
t_2 := U + t_1\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{+42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\ell \leq 2.1 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \leq 5 \cdot 10^{+229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\ell \leq 3 \cdot 10^{+285}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if l < -2.00000000000000009e42 or 2.1e-10 < l < 5.0000000000000005e229Initial program 100.0%
Taylor expanded in K around 0 80.5%
Taylor expanded in l around 0 58.6%
Taylor expanded in l around inf 58.6%
if -2.00000000000000009e42 < l < 2.1e-10 or 5.0000000000000005e229 < l < 3.0000000000000002e285Initial program 72.4%
Taylor expanded in l around 0 97.8%
if 3.0000000000000002e285 < l Initial program 100.0%
Taylor expanded in K around 0 100.0%
Taylor expanded in l around 0 100.0%
Taylor expanded in J around inf 100.0%
Taylor expanded in l around inf 100.0%
Final simplification81.3%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* J (pow l 3.0))))
(t_1 (+ U t_0))
(t_2 (cos (* K 0.5))))
(if (<= l -1.8e+42)
t_1
(if (<= l 2.1e-10)
(+ U (* (* l 2.0) (* J t_2)))
(if (<= l 5e+229)
t_1
(if (<= l 9.5e+284) (+ U (* 2.0 (* J (* l t_2)))) t_0))))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 * (J * pow(l, 3.0));
double t_1 = U + t_0;
double t_2 = cos((K * 0.5));
double tmp;
if (l <= -1.8e+42) {
tmp = t_1;
} else if (l <= 2.1e-10) {
tmp = U + ((l * 2.0) * (J * t_2));
} else if (l <= 5e+229) {
tmp = t_1;
} else if (l <= 9.5e+284) {
tmp = U + (2.0 * (J * (l * t_2)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 0.3333333333333333d0 * (j * (l ** 3.0d0))
t_1 = u + t_0
t_2 = cos((k * 0.5d0))
if (l <= (-1.8d+42)) then
tmp = t_1
else if (l <= 2.1d-10) then
tmp = u + ((l * 2.0d0) * (j * t_2))
else if (l <= 5d+229) then
tmp = t_1
else if (l <= 9.5d+284) then
tmp = u + (2.0d0 * (j * (l * t_2)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 * (J * Math.pow(l, 3.0));
double t_1 = U + t_0;
double t_2 = Math.cos((K * 0.5));
double tmp;
if (l <= -1.8e+42) {
tmp = t_1;
} else if (l <= 2.1e-10) {
tmp = U + ((l * 2.0) * (J * t_2));
} else if (l <= 5e+229) {
tmp = t_1;
} else if (l <= 9.5e+284) {
tmp = U + (2.0 * (J * (l * t_2)));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 * (J * math.pow(l, 3.0)) t_1 = U + t_0 t_2 = math.cos((K * 0.5)) tmp = 0 if l <= -1.8e+42: tmp = t_1 elif l <= 2.1e-10: tmp = U + ((l * 2.0) * (J * t_2)) elif l <= 5e+229: tmp = t_1 elif l <= 9.5e+284: tmp = U + (2.0 * (J * (l * t_2))) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 * Float64(J * (l ^ 3.0))) t_1 = Float64(U + t_0) t_2 = cos(Float64(K * 0.5)) tmp = 0.0 if (l <= -1.8e+42) tmp = t_1; elseif (l <= 2.1e-10) tmp = Float64(U + Float64(Float64(l * 2.0) * Float64(J * t_2))); elseif (l <= 5e+229) tmp = t_1; elseif (l <= 9.5e+284) tmp = Float64(U + Float64(2.0 * Float64(J * Float64(l * t_2)))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 * (J * (l ^ 3.0)); t_1 = U + t_0; t_2 = cos((K * 0.5)); tmp = 0.0; if (l <= -1.8e+42) tmp = t_1; elseif (l <= 2.1e-10) tmp = U + ((l * 2.0) * (J * t_2)); elseif (l <= 5e+229) tmp = t_1; elseif (l <= 9.5e+284) tmp = U + (2.0 * (J * (l * t_2))); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(J * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(U + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -1.8e+42], t$95$1, If[LessEqual[l, 2.1e-10], N[(U + N[(N[(l * 2.0), $MachinePrecision] * N[(J * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5e+229], t$95$1, If[LessEqual[l, 9.5e+284], N[(U + N[(2.0 * N[(J * N[(l * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 \cdot \left(J \cdot {\ell}^{3}\right)\\
t_1 := U + t_0\\
t_2 := \cos \left(K \cdot 0.5\right)\\
\mathbf{if}\;\ell \leq -1.8 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq 2.1 \cdot 10^{-10}:\\
\;\;\;\;U + \left(\ell \cdot 2\right) \cdot \left(J \cdot t_2\right)\\
\mathbf{elif}\;\ell \leq 5 \cdot 10^{+229}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+284}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \left(\ell \cdot t_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if l < -1.8e42 or 2.1e-10 < l < 5.0000000000000005e229Initial program 100.0%
Taylor expanded in K around 0 80.5%
Taylor expanded in l around 0 58.6%
Taylor expanded in l around inf 58.6%
if -1.8e42 < l < 2.1e-10Initial program 68.2%
Taylor expanded in l around 0 98.3%
associate-*r*98.3%
*-commutative98.3%
associate-*l*98.3%
associate-*r*98.3%
Simplified98.3%
if 5.0000000000000005e229 < l < 9.4999999999999997e284Initial program 100.0%
Taylor expanded in l around 0 94.8%
if 9.4999999999999997e284 < l Initial program 100.0%
Taylor expanded in K around 0 100.0%
Taylor expanded in l around 0 100.0%
Taylor expanded in J around inf 100.0%
Taylor expanded in l around inf 100.0%
Final simplification81.3%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* J (pow l 3.0)))) (t_1 (+ U t_0)))
(if (<= l -2e+42)
t_1
(if (<= l 2.1e-10)
(+ U (* (cos (/ K 2.0)) (* J (* l 2.0))))
(if (<= l 1.6e+229)
t_1
(if (<= l 2.35e+284)
(+ U (* 2.0 (* J (* l (cos (* K 0.5))))))
t_0))))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 * (J * pow(l, 3.0));
double t_1 = U + t_0;
double tmp;
if (l <= -2e+42) {
tmp = t_1;
} else if (l <= 2.1e-10) {
tmp = U + (cos((K / 2.0)) * (J * (l * 2.0)));
} else if (l <= 1.6e+229) {
tmp = t_1;
} else if (l <= 2.35e+284) {
tmp = U + (2.0 * (J * (l * cos((K * 0.5)))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.3333333333333333d0 * (j * (l ** 3.0d0))
t_1 = u + t_0
if (l <= (-2d+42)) then
tmp = t_1
else if (l <= 2.1d-10) then
tmp = u + (cos((k / 2.0d0)) * (j * (l * 2.0d0)))
else if (l <= 1.6d+229) then
tmp = t_1
else if (l <= 2.35d+284) then
tmp = u + (2.0d0 * (j * (l * cos((k * 0.5d0)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 * (J * Math.pow(l, 3.0));
double t_1 = U + t_0;
double tmp;
if (l <= -2e+42) {
tmp = t_1;
} else if (l <= 2.1e-10) {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * 2.0)));
} else if (l <= 1.6e+229) {
tmp = t_1;
} else if (l <= 2.35e+284) {
tmp = U + (2.0 * (J * (l * Math.cos((K * 0.5)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 * (J * math.pow(l, 3.0)) t_1 = U + t_0 tmp = 0 if l <= -2e+42: tmp = t_1 elif l <= 2.1e-10: tmp = U + (math.cos((K / 2.0)) * (J * (l * 2.0))) elif l <= 1.6e+229: tmp = t_1 elif l <= 2.35e+284: tmp = U + (2.0 * (J * (l * math.cos((K * 0.5))))) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 * Float64(J * (l ^ 3.0))) t_1 = Float64(U + t_0) tmp = 0.0 if (l <= -2e+42) tmp = t_1; elseif (l <= 2.1e-10) tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * 2.0)))); elseif (l <= 1.6e+229) tmp = t_1; elseif (l <= 2.35e+284) tmp = Float64(U + Float64(2.0 * Float64(J * Float64(l * cos(Float64(K * 0.5)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 * (J * (l ^ 3.0)); t_1 = U + t_0; tmp = 0.0; if (l <= -2e+42) tmp = t_1; elseif (l <= 2.1e-10) tmp = U + (cos((K / 2.0)) * (J * (l * 2.0))); elseif (l <= 1.6e+229) tmp = t_1; elseif (l <= 2.35e+284) tmp = U + (2.0 * (J * (l * cos((K * 0.5))))); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(J * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(U + t$95$0), $MachinePrecision]}, If[LessEqual[l, -2e+42], t$95$1, If[LessEqual[l, 2.1e-10], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.6e+229], t$95$1, If[LessEqual[l, 2.35e+284], N[(U + N[(2.0 * N[(J * N[(l * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 \cdot \left(J \cdot {\ell}^{3}\right)\\
t_1 := U + t_0\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq 2.1 \cdot 10^{-10}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\mathbf{elif}\;\ell \leq 1.6 \cdot 10^{+229}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq 2.35 \cdot 10^{+284}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \left(\ell \cdot \cos \left(K \cdot 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if l < -2.00000000000000009e42 or 2.1e-10 < l < 1.5999999999999999e229Initial program 100.0%
Taylor expanded in K around 0 80.5%
Taylor expanded in l around 0 58.6%
Taylor expanded in l around inf 58.6%
if -2.00000000000000009e42 < l < 2.1e-10Initial program 68.2%
Taylor expanded in l around 0 98.3%
if 1.5999999999999999e229 < l < 2.35000000000000011e284Initial program 100.0%
Taylor expanded in l around 0 94.8%
if 2.35000000000000011e284 < l Initial program 100.0%
Taylor expanded in K around 0 100.0%
Taylor expanded in l around 0 100.0%
Taylor expanded in J around inf 100.0%
Taylor expanded in l around inf 100.0%
Final simplification81.3%
(FPCore (J l K U) :precision binary64 (if (or (<= l -1.8e+42) (not (<= l 2.1e-10))) (+ U (* 0.3333333333333333 (* J (pow l 3.0)))) (fma (* J 2.0) l U)))
double code(double J, double l, double K, double U) {
double tmp;
if ((l <= -1.8e+42) || !(l <= 2.1e-10)) {
tmp = U + (0.3333333333333333 * (J * pow(l, 3.0)));
} else {
tmp = fma((J * 2.0), l, U);
}
return tmp;
}
function code(J, l, K, U) tmp = 0.0 if ((l <= -1.8e+42) || !(l <= 2.1e-10)) tmp = Float64(U + Float64(0.3333333333333333 * Float64(J * (l ^ 3.0)))); else tmp = fma(Float64(J * 2.0), l, U); end return tmp end
code[J_, l_, K_, U_] := If[Or[LessEqual[l, -1.8e+42], N[Not[LessEqual[l, 2.1e-10]], $MachinePrecision]], N[(U + N[(0.3333333333333333 * N[(J * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(J * 2.0), $MachinePrecision] * l + U), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.8 \cdot 10^{+42} \lor \neg \left(\ell \leq 2.1 \cdot 10^{-10}\right):\\
\;\;\;\;U + 0.3333333333333333 \cdot \left(J \cdot {\ell}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(J \cdot 2, \ell, U\right)\\
\end{array}
\end{array}
if l < -1.8e42 or 2.1e-10 < l Initial program 100.0%
Taylor expanded in K around 0 79.5%
Taylor expanded in l around 0 61.6%
Taylor expanded in l around inf 61.6%
if -1.8e42 < l < 2.1e-10Initial program 68.2%
Taylor expanded in K around 0 66.6%
Taylor expanded in l around 0 83.6%
+-commutative83.6%
associate-*r*83.6%
fma-def83.6%
*-commutative83.6%
Simplified83.6%
Final simplification72.2%
(FPCore (J l K U) :precision binary64 (if (or (<= l -1.8e+42) (not (<= l 9.8e+44))) (* 0.3333333333333333 (* J (pow l 3.0))) (fma (* J 2.0) l U)))
double code(double J, double l, double K, double U) {
double tmp;
if ((l <= -1.8e+42) || !(l <= 9.8e+44)) {
tmp = 0.3333333333333333 * (J * pow(l, 3.0));
} else {
tmp = fma((J * 2.0), l, U);
}
return tmp;
}
function code(J, l, K, U) tmp = 0.0 if ((l <= -1.8e+42) || !(l <= 9.8e+44)) tmp = Float64(0.3333333333333333 * Float64(J * (l ^ 3.0))); else tmp = fma(Float64(J * 2.0), l, U); end return tmp end
code[J_, l_, K_, U_] := If[Or[LessEqual[l, -1.8e+42], N[Not[LessEqual[l, 9.8e+44]], $MachinePrecision]], N[(0.3333333333333333 * N[(J * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(J * 2.0), $MachinePrecision] * l + U), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.8 \cdot 10^{+42} \lor \neg \left(\ell \leq 9.8 \cdot 10^{+44}\right):\\
\;\;\;\;0.3333333333333333 \cdot \left(J \cdot {\ell}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(J \cdot 2, \ell, U\right)\\
\end{array}
\end{array}
if l < -1.8e42 or 9.80000000000000071e44 < l Initial program 100.0%
Taylor expanded in K around 0 78.3%
Taylor expanded in l around 0 66.5%
Taylor expanded in J around inf 66.4%
Taylor expanded in l around inf 66.4%
if -1.8e42 < l < 9.80000000000000071e44Initial program 71.0%
Taylor expanded in K around 0 68.8%
Taylor expanded in l around 0 77.3%
+-commutative77.3%
associate-*r*77.3%
fma-def77.3%
*-commutative77.3%
Simplified77.3%
Final simplification72.2%
(FPCore (J l K U) :precision binary64 (if (<= l 2300.0) (fma (* J 2.0) l U) (if (<= l 6.6e+168) (pow U -134217728.0) (* J (* l 2.0)))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2300.0) {
tmp = fma((J * 2.0), l, U);
} else if (l <= 6.6e+168) {
tmp = pow(U, -134217728.0);
} else {
tmp = J * (l * 2.0);
}
return tmp;
}
function code(J, l, K, U) tmp = 0.0 if (l <= 2300.0) tmp = fma(Float64(J * 2.0), l, U); elseif (l <= 6.6e+168) tmp = U ^ -134217728.0; else tmp = Float64(J * Float64(l * 2.0)); end return tmp end
code[J_, l_, K_, U_] := If[LessEqual[l, 2300.0], N[(N[(J * 2.0), $MachinePrecision] * l + U), $MachinePrecision], If[LessEqual[l, 6.6e+168], N[Power[U, -134217728.0], $MachinePrecision], N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2300:\\
\;\;\;\;\mathsf{fma}\left(J \cdot 2, \ell, U\right)\\
\mathbf{elif}\;\ell \leq 6.6 \cdot 10^{+168}:\\
\;\;\;\;{U}^{-134217728}\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(\ell \cdot 2\right)\\
\end{array}
\end{array}
if l < 2300Initial program 78.8%
Taylor expanded in K around 0 70.7%
Taylor expanded in l around 0 64.8%
+-commutative64.8%
associate-*r*64.8%
fma-def64.8%
*-commutative64.8%
Simplified64.8%
if 2300 < l < 6.5999999999999997e168Initial program 100.0%
Taylor expanded in K around 0 79.5%
Applied egg-rr31.6%
if 6.5999999999999997e168 < l Initial program 100.0%
Taylor expanded in K around 0 80.6%
Taylor expanded in l around 0 80.6%
Taylor expanded in J around inf 80.6%
Taylor expanded in l around 0 59.1%
*-commutative59.1%
associate-*r*59.1%
*-commutative59.1%
Simplified59.1%
Final simplification59.0%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* l 2.0)))) (if (<= l 2300.0) (+ U t_0) (if (<= l 1.8e+168) (pow U -134217728.0) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (l * 2.0);
double tmp;
if (l <= 2300.0) {
tmp = U + t_0;
} else if (l <= 1.8e+168) {
tmp = pow(U, -134217728.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * (l * 2.0d0)
if (l <= 2300.0d0) then
tmp = u + t_0
else if (l <= 1.8d+168) then
tmp = u ** (-134217728.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = J * (l * 2.0);
double tmp;
if (l <= 2300.0) {
tmp = U + t_0;
} else if (l <= 1.8e+168) {
tmp = Math.pow(U, -134217728.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (l * 2.0) tmp = 0 if l <= 2300.0: tmp = U + t_0 elif l <= 1.8e+168: tmp = math.pow(U, -134217728.0) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(l * 2.0)) tmp = 0.0 if (l <= 2300.0) tmp = Float64(U + t_0); elseif (l <= 1.8e+168) tmp = U ^ -134217728.0; else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (l * 2.0); tmp = 0.0; if (l <= 2300.0) tmp = U + t_0; elseif (l <= 1.8e+168) tmp = U ^ -134217728.0; else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2300.0], N[(U + t$95$0), $MachinePrecision], If[LessEqual[l, 1.8e+168], N[Power[U, -134217728.0], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\ell \cdot 2\right)\\
\mathbf{if}\;\ell \leq 2300:\\
\;\;\;\;U + t_0\\
\mathbf{elif}\;\ell \leq 1.8 \cdot 10^{+168}:\\
\;\;\;\;{U}^{-134217728}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if l < 2300Initial program 78.8%
Taylor expanded in K around 0 70.7%
Taylor expanded in l around 0 64.8%
if 2300 < l < 1.8e168Initial program 100.0%
Taylor expanded in K around 0 79.5%
Applied egg-rr31.6%
if 1.8e168 < l Initial program 100.0%
Taylor expanded in K around 0 80.6%
Taylor expanded in l around 0 80.6%
Taylor expanded in J around inf 80.6%
Taylor expanded in l around 0 59.1%
*-commutative59.1%
associate-*r*59.1%
*-commutative59.1%
Simplified59.1%
Final simplification59.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* J (* l 2.0))))
(if (<= l -5.2e-34)
t_0
(if (<= l 215.0) U (if (<= l 1.24e+179) (* U (- 2.0 U)) t_0)))))
double code(double J, double l, double K, double U) {
double t_0 = J * (l * 2.0);
double tmp;
if (l <= -5.2e-34) {
tmp = t_0;
} else if (l <= 215.0) {
tmp = U;
} else if (l <= 1.24e+179) {
tmp = U * (2.0 - U);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * (l * 2.0d0)
if (l <= (-5.2d-34)) then
tmp = t_0
else if (l <= 215.0d0) then
tmp = u
else if (l <= 1.24d+179) then
tmp = u * (2.0d0 - u)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = J * (l * 2.0);
double tmp;
if (l <= -5.2e-34) {
tmp = t_0;
} else if (l <= 215.0) {
tmp = U;
} else if (l <= 1.24e+179) {
tmp = U * (2.0 - U);
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (l * 2.0) tmp = 0 if l <= -5.2e-34: tmp = t_0 elif l <= 215.0: tmp = U elif l <= 1.24e+179: tmp = U * (2.0 - U) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(l * 2.0)) tmp = 0.0 if (l <= -5.2e-34) tmp = t_0; elseif (l <= 215.0) tmp = U; elseif (l <= 1.24e+179) tmp = Float64(U * Float64(2.0 - U)); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (l * 2.0); tmp = 0.0; if (l <= -5.2e-34) tmp = t_0; elseif (l <= 215.0) tmp = U; elseif (l <= 1.24e+179) tmp = U * (2.0 - U); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -5.2e-34], t$95$0, If[LessEqual[l, 215.0], U, If[LessEqual[l, 1.24e+179], N[(U * N[(2.0 - U), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\ell \cdot 2\right)\\
\mathbf{if}\;\ell \leq -5.2 \cdot 10^{-34}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \leq 215:\\
\;\;\;\;U\\
\mathbf{elif}\;\ell \leq 1.24 \cdot 10^{+179}:\\
\;\;\;\;U \cdot \left(2 - U\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if l < -5.1999999999999999e-34 or 1.23999999999999996e179 < l Initial program 96.0%
Taylor expanded in K around 0 74.1%
Taylor expanded in l around 0 69.5%
Taylor expanded in J around inf 68.3%
Taylor expanded in l around 0 37.3%
*-commutative37.3%
associate-*r*37.3%
*-commutative37.3%
Simplified37.3%
if -5.1999999999999999e-34 < l < 215Initial program 69.8%
Taylor expanded in J around 0 69.5%
if 215 < l < 1.23999999999999996e179Initial program 100.0%
Applied egg-rr10.5%
Applied egg-rr27.7%
fma-udef27.7%
+-commutative27.7%
associate-+r+27.7%
count-227.7%
distribute-rgt-out27.7%
unsub-neg27.7%
Simplified27.7%
Final simplification50.6%
(FPCore (J l K U) :precision binary64 (if (or (<= l -5.2e-34) (not (<= l 1.2e+45))) (* J (* l 2.0)) U))
double code(double J, double l, double K, double U) {
double tmp;
if ((l <= -5.2e-34) || !(l <= 1.2e+45)) {
tmp = J * (l * 2.0);
} else {
tmp = U;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if ((l <= (-5.2d-34)) .or. (.not. (l <= 1.2d+45))) then
tmp = j * (l * 2.0d0)
else
tmp = u
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((l <= -5.2e-34) || !(l <= 1.2e+45)) {
tmp = J * (l * 2.0);
} else {
tmp = U;
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (l <= -5.2e-34) or not (l <= 1.2e+45): tmp = J * (l * 2.0) else: tmp = U return tmp
function code(J, l, K, U) tmp = 0.0 if ((l <= -5.2e-34) || !(l <= 1.2e+45)) tmp = Float64(J * Float64(l * 2.0)); else tmp = U; end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((l <= -5.2e-34) || ~((l <= 1.2e+45))) tmp = J * (l * 2.0); else tmp = U; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[Or[LessEqual[l, -5.2e-34], N[Not[LessEqual[l, 1.2e+45]], $MachinePrecision]], N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision], U]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5.2 \cdot 10^{-34} \lor \neg \left(\ell \leq 1.2 \cdot 10^{+45}\right):\\
\;\;\;\;J \cdot \left(\ell \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;U\\
\end{array}
\end{array}
if l < -5.1999999999999999e-34 or 1.19999999999999995e45 < l Initial program 97.0%
Taylor expanded in K around 0 74.9%
Taylor expanded in l around 0 65.3%
Taylor expanded in J around inf 64.4%
Taylor expanded in l around 0 30.5%
*-commutative30.5%
associate-*r*30.5%
*-commutative30.5%
Simplified30.5%
if -5.1999999999999999e-34 < l < 1.19999999999999995e45Initial program 72.4%
Taylor expanded in J around 0 63.8%
Final simplification47.3%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* l 2.0)))) (if (<= l 3100000.0) (+ U t_0) (if (<= l 1.62e+174) (* U (- 2.0 U)) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (l * 2.0);
double tmp;
if (l <= 3100000.0) {
tmp = U + t_0;
} else if (l <= 1.62e+174) {
tmp = U * (2.0 - U);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * (l * 2.0d0)
if (l <= 3100000.0d0) then
tmp = u + t_0
else if (l <= 1.62d+174) then
tmp = u * (2.0d0 - u)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = J * (l * 2.0);
double tmp;
if (l <= 3100000.0) {
tmp = U + t_0;
} else if (l <= 1.62e+174) {
tmp = U * (2.0 - U);
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (l * 2.0) tmp = 0 if l <= 3100000.0: tmp = U + t_0 elif l <= 1.62e+174: tmp = U * (2.0 - U) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(l * 2.0)) tmp = 0.0 if (l <= 3100000.0) tmp = Float64(U + t_0); elseif (l <= 1.62e+174) tmp = Float64(U * Float64(2.0 - U)); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (l * 2.0); tmp = 0.0; if (l <= 3100000.0) tmp = U + t_0; elseif (l <= 1.62e+174) tmp = U * (2.0 - U); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 3100000.0], N[(U + t$95$0), $MachinePrecision], If[LessEqual[l, 1.62e+174], N[(U * N[(2.0 - U), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\ell \cdot 2\right)\\
\mathbf{if}\;\ell \leq 3100000:\\
\;\;\;\;U + t_0\\
\mathbf{elif}\;\ell \leq 1.62 \cdot 10^{+174}:\\
\;\;\;\;U \cdot \left(2 - U\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if l < 3.1e6Initial program 78.9%
Taylor expanded in K around 0 70.9%
Taylor expanded in l around 0 64.4%
if 3.1e6 < l < 1.62000000000000007e174Initial program 100.0%
Applied egg-rr11.2%
Applied egg-rr29.7%
fma-udef29.7%
+-commutative29.7%
associate-+r+29.7%
count-229.7%
distribute-rgt-out29.7%
unsub-neg29.7%
Simplified29.7%
if 1.62000000000000007e174 < l Initial program 100.0%
Taylor expanded in K around 0 80.0%
Taylor expanded in l around 0 80.0%
Taylor expanded in J around inf 80.0%
Taylor expanded in l around 0 60.9%
*-commutative60.9%
associate-*r*60.9%
*-commutative60.9%
Simplified60.9%
Final simplification58.7%
(FPCore (J l K U) :precision binary64 (if (<= l -480.0) (* U U) (if (<= l 18500000000.0) U (* U U))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -480.0) {
tmp = U * U;
} else if (l <= 18500000000.0) {
tmp = U;
} else {
tmp = U * U;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= (-480.0d0)) then
tmp = u * u
else if (l <= 18500000000.0d0) then
tmp = u
else
tmp = u * u
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -480.0) {
tmp = U * U;
} else if (l <= 18500000000.0) {
tmp = U;
} else {
tmp = U * U;
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -480.0: tmp = U * U elif l <= 18500000000.0: tmp = U else: tmp = U * U return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -480.0) tmp = Float64(U * U); elseif (l <= 18500000000.0) tmp = U; else tmp = Float64(U * U); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -480.0) tmp = U * U; elseif (l <= 18500000000.0) tmp = U; else tmp = U * U; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -480.0], N[(U * U), $MachinePrecision], If[LessEqual[l, 18500000000.0], U, N[(U * U), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -480:\\
\;\;\;\;U \cdot U\\
\mathbf{elif}\;\ell \leq 18500000000:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;U \cdot U\\
\end{array}
\end{array}
if l < -480 or 1.85e10 < l Initial program 100.0%
Applied egg-rr14.4%
if -480 < l < 1.85e10Initial program 68.9%
Taylor expanded in J around 0 65.5%
Final simplification39.8%
(FPCore (J l K U) :precision binary64 -3.725290312339702e-9)
double code(double J, double l, double K, double U) {
return -3.725290312339702e-9;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = -3.725290312339702d-9
end function
public static double code(double J, double l, double K, double U) {
return -3.725290312339702e-9;
}
def code(J, l, K, U): return -3.725290312339702e-9
function code(J, l, K, U) return -3.725290312339702e-9 end
function tmp = code(J, l, K, U) tmp = -3.725290312339702e-9; end
code[J_, l_, K_, U_] := -3.725290312339702e-9
\begin{array}{l}
\\
-3.725290312339702 \cdot 10^{-9}
\end{array}
Initial program 84.6%
Taylor expanded in K around 0 73.3%
Applied egg-rr2.9%
associate-+r+2.9%
distribute-rgt1-in2.9%
distribute-rgt-out2.9%
associate-/r*2.9%
*-inverses2.9%
metadata-eval2.9%
metadata-eval2.9%
metadata-eval2.9%
Simplified2.9%
Final simplification2.9%
(FPCore (J l K U) :precision binary64 U)
double code(double J, double l, double K, double U) {
return U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u
end function
public static double code(double J, double l, double K, double U) {
return U;
}
def code(J, l, K, U): return U
function code(J, l, K, U) return U end
function tmp = code(J, l, K, U) tmp = U; end
code[J_, l_, K_, U_] := U
\begin{array}{l}
\\
U
\end{array}
Initial program 84.6%
Taylor expanded in J around 0 33.8%
Final simplification33.8%
herbie shell --seed 2023293
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))