
(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 24 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 (+ (* (* (* 2.0 (sinh l)) (cos (/ K 2.0))) J) U))
double code(double J, double l, double K, double U) {
return (((2.0 * sinh(l)) * cos((K / 2.0))) * J) + 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 = (((2.0d0 * sinh(l)) * cos((k / 2.0d0))) * j) + u
end function
public static double code(double J, double l, double K, double U) {
return (((2.0 * Math.sinh(l)) * Math.cos((K / 2.0))) * J) + U;
}
def code(J, l, K, U): return (((2.0 * math.sinh(l)) * math.cos((K / 2.0))) * J) + U
function code(J, l, K, U) return Float64(Float64(Float64(Float64(2.0 * sinh(l)) * cos(Float64(K / 2.0))) * J) + U) end
function tmp = code(J, l, K, U) tmp = (((2.0 * sinh(l)) * cos((K / 2.0))) * J) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(2 \cdot \sinh \ell\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot J + U
\end{array}
Initial program 87.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.7575)
(+ U (* J (* t_0 (* 2.0 l))))
(if (<= t_0 -0.01)
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
(+ 1.0 (* -0.125 (* K K)))))
(+ U (* (* 2.0 (sinh l)) J))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.7575) {
tmp = U + (J * (t_0 * (2.0 * l)));
} else if (t_0 <= -0.01) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
} else {
tmp = U + ((2.0 * sinh(l)) * J);
}
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.7575d0)) then
tmp = u + (j * (t_0 * (2.0d0 * l)))
else if (t_0 <= (-0.01d0)) then
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))) * (1.0d0 + ((-0.125d0) * (k * k))))
else
tmp = u + ((2.0d0 * sinh(l)) * j)
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.7575) {
tmp = U + (J * (t_0 * (2.0 * l)));
} else if (t_0 <= -0.01) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
} else {
tmp = U + ((2.0 * Math.sinh(l)) * J);
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.7575: tmp = U + (J * (t_0 * (2.0 * l))) elif t_0 <= -0.01: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))) else: tmp = U + ((2.0 * math.sinh(l)) * J) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.7575) tmp = Float64(U + Float64(J * Float64(t_0 * Float64(2.0 * l)))); elseif (t_0 <= -0.01) tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))); else tmp = Float64(U + Float64(Float64(2.0 * sinh(l)) * J)); 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.7575) tmp = U + (J * (t_0 * (2.0 * l))); elseif (t_0 <= -0.01) tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))); else tmp = U + ((2.0 * sinh(l)) * J); 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.7575], N[(U + N[(J * N[(t$95$0 * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.01], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.7575:\\
\;\;\;\;U + J \cdot \left(t\_0 \cdot \left(2 \cdot \ell\right)\right)\\
\mathbf{elif}\;t\_0 \leq -0.01:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(2 \cdot \sinh \ell\right) \cdot J\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.757499999999999951Initial program 84.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6499.9%
Applied egg-rr99.9%
Taylor expanded in l around 0
*-lowering-*.f6480.9%
Simplified80.9%
if -0.757499999999999951 < (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0100000000000000002Initial program 87.4%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.7%
Simplified93.7%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.6%
Simplified68.6%
if -0.0100000000000000002 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 87.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified96.9%
Final simplification91.6%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.7575)
(+ U (* t_0 (* J (* 2.0 l))))
(if (<= t_0 -0.01)
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
(+ 1.0 (* -0.125 (* K K)))))
(+ U (* (* 2.0 (sinh l)) J))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.7575) {
tmp = U + (t_0 * (J * (2.0 * l)));
} else if (t_0 <= -0.01) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
} else {
tmp = U + ((2.0 * sinh(l)) * J);
}
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.7575d0)) then
tmp = u + (t_0 * (j * (2.0d0 * l)))
else if (t_0 <= (-0.01d0)) then
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))) * (1.0d0 + ((-0.125d0) * (k * k))))
else
tmp = u + ((2.0d0 * sinh(l)) * j)
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.7575) {
tmp = U + (t_0 * (J * (2.0 * l)));
} else if (t_0 <= -0.01) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
} else {
tmp = U + ((2.0 * Math.sinh(l)) * J);
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.7575: tmp = U + (t_0 * (J * (2.0 * l))) elif t_0 <= -0.01: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))) else: tmp = U + ((2.0 * math.sinh(l)) * J) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.7575) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(2.0 * l)))); elseif (t_0 <= -0.01) tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))); else tmp = Float64(U + Float64(Float64(2.0 * sinh(l)) * J)); 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.7575) tmp = U + (t_0 * (J * (2.0 * l))); elseif (t_0 <= -0.01) tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))); else tmp = U + ((2.0 * sinh(l)) * J); 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.7575], N[(U + N[(t$95$0 * N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.01], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.7575:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(2 \cdot \ell\right)\right)\\
\mathbf{elif}\;t\_0 \leq -0.01:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(2 \cdot \sinh \ell\right) \cdot J\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.757499999999999951Initial program 84.1%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.8%
Simplified80.8%
if -0.757499999999999951 < (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0100000000000000002Initial program 87.4%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.7%
Simplified93.7%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.6%
Simplified68.6%
if -0.0100000000000000002 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 87.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified96.9%
Final simplification91.6%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.7575)
(+ U (* l (* (cos (* K 0.5)) (* 2.0 J))))
(if (<= t_0 -0.01)
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
(+ 1.0 (* -0.125 (* K K)))))
(+ U (* (* 2.0 (sinh l)) J))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.7575) {
tmp = U + (l * (cos((K * 0.5)) * (2.0 * J)));
} else if (t_0 <= -0.01) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
} else {
tmp = U + ((2.0 * sinh(l)) * J);
}
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.7575d0)) then
tmp = u + (l * (cos((k * 0.5d0)) * (2.0d0 * j)))
else if (t_0 <= (-0.01d0)) then
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))) * (1.0d0 + ((-0.125d0) * (k * k))))
else
tmp = u + ((2.0d0 * sinh(l)) * j)
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.7575) {
tmp = U + (l * (Math.cos((K * 0.5)) * (2.0 * J)));
} else if (t_0 <= -0.01) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
} else {
tmp = U + ((2.0 * Math.sinh(l)) * J);
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.7575: tmp = U + (l * (math.cos((K * 0.5)) * (2.0 * J))) elif t_0 <= -0.01: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))) else: tmp = U + ((2.0 * math.sinh(l)) * J) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.7575) tmp = Float64(U + Float64(l * Float64(cos(Float64(K * 0.5)) * Float64(2.0 * J)))); elseif (t_0 <= -0.01) tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))); else tmp = Float64(U + Float64(Float64(2.0 * sinh(l)) * J)); 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.7575) tmp = U + (l * (cos((K * 0.5)) * (2.0 * J))); elseif (t_0 <= -0.01) tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))); else tmp = U + ((2.0 * sinh(l)) * J); 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.7575], N[(U + N[(l * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.01], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.7575:\\
\;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(2 \cdot J\right)\right)\\
\mathbf{elif}\;t\_0 \leq -0.01:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(2 \cdot \sinh \ell\right) \cdot J\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.757499999999999951Initial program 84.1%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified90.5%
Taylor expanded in l around 0
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6480.7%
Simplified80.7%
if -0.757499999999999951 < (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0100000000000000002Initial program 87.4%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.7%
Simplified93.7%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.6%
Simplified68.6%
if -0.0100000000000000002 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 87.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified96.9%
Final simplification91.5%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 0.18)
(+ U (* t_0 (* J (* l (+ 2.0 (* l (* l 0.3333333333333333)))))))
(+ U (* (* 2.0 (sinh l)) J)))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= 0.18) {
tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333))))));
} else {
tmp = U + ((2.0 * sinh(l)) * J);
}
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.18d0) then
tmp = u + (t_0 * (j * (l * (2.0d0 + (l * (l * 0.3333333333333333d0))))))
else
tmp = u + ((2.0d0 * sinh(l)) * j)
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.18) {
tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333))))));
} else {
tmp = U + ((2.0 * Math.sinh(l)) * J);
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= 0.18: tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333)))))) else: tmp = U + ((2.0 * math.sinh(l)) * J) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= 0.18) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))))); else tmp = Float64(U + Float64(Float64(2.0 * sinh(l)) * J)); 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.18) tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333)))))); else tmp = U + ((2.0 * sinh(l)) * J); 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.18], N[(U + N[(t$95$0 * N[(J * N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq 0.18:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(2 \cdot \sinh \ell\right) \cdot J\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.17999999999999999Initial program 86.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6491.6%
Simplified91.6%
if 0.17999999999999999 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 87.5%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified97.3%
Final simplification95.7%
(FPCore (J l K U) :precision binary64 (if (<= (cos (/ K 2.0)) 0.18) (+ U (* l (* (+ 2.0 (* l (* l 0.3333333333333333))) (* J (cos (* K 0.5)))))) (+ U (* (* 2.0 (sinh l)) J))))
double code(double J, double l, double K, double U) {
double tmp;
if (cos((K / 2.0)) <= 0.18) {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J * cos((K * 0.5)))));
} else {
tmp = U + ((2.0 * sinh(l)) * J);
}
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 (cos((k / 2.0d0)) <= 0.18d0) then
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j * cos((k * 0.5d0)))))
else
tmp = u + ((2.0d0 * sinh(l)) * j)
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (Math.cos((K / 2.0)) <= 0.18) {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J * Math.cos((K * 0.5)))));
} else {
tmp = U + ((2.0 * Math.sinh(l)) * J);
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if math.cos((K / 2.0)) <= 0.18: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J * math.cos((K * 0.5))))) else: tmp = U + ((2.0 * math.sinh(l)) * J) return tmp
function code(J, l, K, U) tmp = 0.0 if (cos(Float64(K / 2.0)) <= 0.18) tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J * cos(Float64(K * 0.5)))))); else tmp = Float64(U + Float64(Float64(2.0 * sinh(l)) * J)); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (cos((K / 2.0)) <= 0.18) tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J * cos((K * 0.5))))); else tmp = U + ((2.0 * sinh(l)) * J); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision], 0.18], N[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq 0.18:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J \cdot \cos \left(K \cdot 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(2 \cdot \sinh \ell\right) \cdot J\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.17999999999999999Initial program 86.2%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified90.2%
if 0.17999999999999999 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 87.5%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified97.3%
Final simplification95.3%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 10000000000.0)
(+ U (* (* 2.0 (sinh l)) J))
(+
U
(*
(cos (/ K 2.0))
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968)))))))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 10000000000.0) {
tmp = U + ((2.0 * sinh(l)) * J);
} else {
tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
}
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 ((k / 2.0d0) <= 10000000000.0d0) then
tmp = u + ((2.0d0 * sinh(l)) * j)
else
tmp = u + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 10000000000.0) {
tmp = U + ((2.0 * Math.sinh(l)) * J);
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (K / 2.0) <= 10000000000.0: tmp = U + ((2.0 * math.sinh(l)) * J) else: tmp = U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 10000000000.0) tmp = Float64(U + Float64(Float64(2.0 * sinh(l)) * J)); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((K / 2.0) <= 10000000000.0) tmp = U + ((2.0 * sinh(l)) * J); else tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 10000000000.0], N[(U + N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 10000000000:\\
\;\;\;\;U + \left(2 \cdot \sinh \ell\right) \cdot J\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 1e10Initial program 87.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified88.1%
if 1e10 < (/.f64 K #s(literal 2 binary64)) Initial program 85.5%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.3%
Simplified98.3%
Final simplification90.5%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 10000000000.0)
(+ U (* (* 2.0 (sinh l)) J))
(+
U
(*
(cos (/ K 2.0))
(*
J
(*
l
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 10000000000.0) {
tmp = U + ((2.0 * sinh(l)) * J);
} else {
tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
}
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 ((k / 2.0d0) <= 10000000000.0d0) then
tmp = u + ((2.0d0 * sinh(l)) * j)
else
tmp = u + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 10000000000.0) {
tmp = U + ((2.0 * Math.sinh(l)) * J);
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (K / 2.0) <= 10000000000.0: tmp = U + ((2.0 * math.sinh(l)) * J) else: tmp = U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 10000000000.0) tmp = Float64(U + Float64(Float64(2.0 * sinh(l)) * J)); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((K / 2.0) <= 10000000000.0) tmp = U + ((2.0 * sinh(l)) * J); else tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 10000000000.0], N[(U + N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 10000000000:\\
\;\;\;\;U + \left(2 \cdot \sinh \ell\right) \cdot J\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 1e10Initial program 87.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified88.1%
if 1e10 < (/.f64 K #s(literal 2 binary64)) Initial program 85.5%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.1%
Simplified95.1%
Final simplification89.7%
(FPCore (J l K U)
:precision binary64
(if (<= l 6.2e+95)
(+ U (* (* 2.0 (sinh l)) J))
(+
U
(*
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
(+ 1.0 (* -0.125 (* K K)))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.2e+95) {
tmp = U + ((2.0 * sinh(l)) * J);
} else {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
}
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 <= 6.2d+95) then
tmp = u + ((2.0d0 * sinh(l)) * j)
else
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))) * (1.0d0 + ((-0.125d0) * (k * k))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.2e+95) {
tmp = U + ((2.0 * Math.sinh(l)) * J);
} else {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 6.2e+95: tmp = U + ((2.0 * math.sinh(l)) * J) else: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 6.2e+95) tmp = Float64(U + Float64(Float64(2.0 * sinh(l)) * J)); else tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 6.2e+95) tmp = U + ((2.0 * sinh(l)) * J); else tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 6.2e+95], N[(U + N[(N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.2 \cdot 10^{+95}:\\
\;\;\;\;U + \left(2 \cdot \sinh \ell\right) \cdot J\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\\
\end{array}
\end{array}
if l < 6.2000000000000006e95Initial program 84.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified84.6%
if 6.2000000000000006e95 < l Initial program 100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.3%
Simplified83.3%
Final simplification84.4%
(FPCore (J l K U)
:precision binary64
(if (<= l 3e+95)
(+
U
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
(+
U
(*
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
(+ 1.0 (* -0.125 (* K K)))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 3e+95) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
}
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 <= 3d+95) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
else
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))) * (1.0d0 + ((-0.125d0) * (k * k))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 3e+95) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 3e+95: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) else: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 3e+95) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))); else tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 3e+95) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); else tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 3e+95], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3 \cdot 10^{+95}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\\
\end{array}
\end{array}
if l < 2.99999999999999991e95Initial program 84.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.4%
Simplified94.4%
Taylor expanded in K around 0
Simplified80.0%
if 2.99999999999999991e95 < l Initial program 100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.3%
Simplified83.3%
Final simplification80.6%
(FPCore (J l K U)
:precision binary64
(if (<= l 6.5e+95)
(+
U
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
(+
U
(*
l
(*
(+ 2.0 (* l (* l 0.3333333333333333)))
(+ J (* J (* -0.125 (* K K)))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.5e+95) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
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 <= 6.5d+95) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
else
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j + (j * ((-0.125d0) * (k * k))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.5e+95) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 6.5e+95: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) else: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 6.5e+95) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))); else tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 6.5e+95) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); else tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 6.5e+95], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.5 \cdot 10^{+95}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 6.5e95Initial program 84.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.4%
Simplified94.4%
Taylor expanded in K around 0
Simplified80.0%
if 6.5e95 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified92.1%
Taylor expanded in K around 0
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.3%
Simplified81.3%
Final simplification80.2%
(FPCore (J l K U)
:precision binary64
(if (<= l 6.5e+95)
(+
U
(*
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(* l (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968)))))))
(* l J)))
(+
U
(*
l
(*
(+ 2.0 (* l (* l 0.3333333333333333)))
(+ J (* J (* -0.125 (* K K)))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.5e+95) {
tmp = U + ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))) * (l * J));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
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 <= 6.5d+95) then
tmp = u + ((2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))) * (l * j))
else
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j + (j * ((-0.125d0) * (k * k))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.5e+95) {
tmp = U + ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))) * (l * J));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 6.5e+95: tmp = U + ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))) * (l * J)) else: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 6.5e+95) tmp = Float64(U + Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))) * Float64(l * J))); else tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 6.5e+95) tmp = U + ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))) * (l * J)); else tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 6.5e+95], N[(U + N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.5 \cdot 10^{+95}:\\
\;\;\;\;U + \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right) \cdot \left(\ell \cdot J\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 6.5e95Initial program 84.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.4%
Simplified94.4%
Taylor expanded in K around 0
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified79.6%
if 6.5e95 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified92.1%
Taylor expanded in K around 0
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.3%
Simplified81.3%
Final simplification79.9%
(FPCore (J l K U)
:precision binary64
(if (<= l 6.5e+95)
(+
U
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
(+
U
(*
l
(*
(+ 2.0 (* l (* l 0.3333333333333333)))
(+ J (* J (* -0.125 (* K K)))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.5e+95) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
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 <= 6.5d+95) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
else
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j + (j * ((-0.125d0) * (k * k))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.5e+95) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 6.5e+95: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) else: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 6.5e+95) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))); else tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 6.5e+95) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); else tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 6.5e+95], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.5 \cdot 10^{+95}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 6.5e95Initial program 84.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.2%
Simplified92.2%
Taylor expanded in K around 0
Simplified78.2%
if 6.5e95 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified92.1%
Taylor expanded in K around 0
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.3%
Simplified81.3%
Final simplification78.8%
(FPCore (J l K U)
:precision binary64
(if (<= l 6.5e+95)
(+
U
(*
l
(*
J
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
(+
U
(*
l
(*
(+ 2.0 (* l (* l 0.3333333333333333)))
(+ J (* J (* -0.125 (* K K)))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.5e+95) {
tmp = U + (l * (J * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
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 <= 6.5d+95) then
tmp = u + (l * (j * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
else
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j + (j * ((-0.125d0) * (k * k))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 6.5e+95) {
tmp = U + (l * (J * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 6.5e+95: tmp = U + (l * (J * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) else: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 6.5e+95) tmp = Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))); else tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 6.5e+95) tmp = U + (l * (J * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); else tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 6.5e+95], N[(U + N[(l * N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.5 \cdot 10^{+95}:\\
\;\;\;\;U + \ell \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 6.5e95Initial program 84.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.2%
Simplified92.2%
Taylor expanded in K around 0
Simplified78.2%
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.3%
Applied egg-rr77.3%
if 6.5e95 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified92.1%
Taylor expanded in K around 0
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.3%
Simplified81.3%
Final simplification78.0%
(FPCore (J l K U) :precision binary64 (if (<= l 1.25e+21) (* U (+ 1.0 (* (* l J) (/ (+ 2.0 (* (* l l) 0.3333333333333333)) U)))) (* (* l J) (+ 2.0 (* (* l l) (* (* l l) 0.016666666666666666))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 1.25e+21) {
tmp = U * (1.0 + ((l * J) * ((2.0 + ((l * l) * 0.3333333333333333)) / U)));
} else {
tmp = (l * J) * (2.0 + ((l * l) * ((l * l) * 0.016666666666666666)));
}
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 <= 1.25d+21) then
tmp = u * (1.0d0 + ((l * j) * ((2.0d0 + ((l * l) * 0.3333333333333333d0)) / u)))
else
tmp = (l * j) * (2.0d0 + ((l * l) * ((l * l) * 0.016666666666666666d0)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 1.25e+21) {
tmp = U * (1.0 + ((l * J) * ((2.0 + ((l * l) * 0.3333333333333333)) / U)));
} else {
tmp = (l * J) * (2.0 + ((l * l) * ((l * l) * 0.016666666666666666)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 1.25e+21: tmp = U * (1.0 + ((l * J) * ((2.0 + ((l * l) * 0.3333333333333333)) / U))) else: tmp = (l * J) * (2.0 + ((l * l) * ((l * l) * 0.016666666666666666))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 1.25e+21) tmp = Float64(U * Float64(1.0 + Float64(Float64(l * J) * Float64(Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) / U)))); else tmp = Float64(Float64(l * J) * Float64(2.0 + Float64(Float64(l * l) * Float64(Float64(l * l) * 0.016666666666666666)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 1.25e+21) tmp = U * (1.0 + ((l * J) * ((2.0 + ((l * l) * 0.3333333333333333)) / U))); else tmp = (l * J) * (2.0 + ((l * l) * ((l * l) * 0.016666666666666666))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 1.25e+21], N[(U * N[(1.0 + N[(N[(l * J), $MachinePrecision] * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * J), $MachinePrecision] * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.25 \cdot 10^{+21}:\\
\;\;\;\;U \cdot \left(1 + \left(\ell \cdot J\right) \cdot \frac{2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot J\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\\
\end{array}
\end{array}
if l < 1.25e21Initial program 83.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified92.4%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.5%
Simplified79.5%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.4%
Simplified81.4%
if 1.25e21 < l Initial program 100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.5%
Simplified89.5%
Taylor expanded in K around 0
Simplified65.6%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.6%
Simplified65.6%
Taylor expanded in l around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.6%
Simplified65.6%
(FPCore (J l K U) :precision binary64 (if (<= l 5200000.0) (+ U (* l (* J (+ 2.0 (* (* l l) 0.3333333333333333))))) (* (* l J) (+ 2.0 (* (* l l) (* (* l l) 0.016666666666666666))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 5200000.0) {
tmp = U + (l * (J * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = (l * J) * (2.0 + ((l * l) * ((l * l) * 0.016666666666666666)));
}
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 <= 5200000.0d0) then
tmp = u + (l * (j * (2.0d0 + ((l * l) * 0.3333333333333333d0))))
else
tmp = (l * j) * (2.0d0 + ((l * l) * ((l * l) * 0.016666666666666666d0)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 5200000.0) {
tmp = U + (l * (J * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = (l * J) * (2.0 + ((l * l) * ((l * l) * 0.016666666666666666)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 5200000.0: tmp = U + (l * (J * (2.0 + ((l * l) * 0.3333333333333333)))) else: tmp = (l * J) * (2.0 + ((l * l) * ((l * l) * 0.016666666666666666))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 5200000.0) tmp = Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))); else tmp = Float64(Float64(l * J) * Float64(2.0 + Float64(Float64(l * l) * Float64(Float64(l * l) * 0.016666666666666666)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 5200000.0) tmp = U + (l * (J * (2.0 + ((l * l) * 0.3333333333333333)))); else tmp = (l * J) * (2.0 + ((l * l) * ((l * l) * 0.016666666666666666))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 5200000.0], N[(U + N[(l * N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * J), $MachinePrecision] * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5200000:\\
\;\;\;\;U + \ell \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot J\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\\
\end{array}
\end{array}
if l < 5.2e6Initial program 82.7%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified92.8%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.7%
Simplified79.7%
if 5.2e6 < l Initial program 100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in K around 0
Simplified65.7%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7%
Simplified65.7%
Taylor expanded in l around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7%
Simplified65.7%
Final simplification76.1%
(FPCore (J l K U)
:precision binary64
(if (<= l -10200.0)
(* l (* J (+ 2.0 (* (* l l) 0.3333333333333333))))
(if (<= l 10200.0)
(+ U (* l (* 2.0 J)))
(* 0.3333333333333333 (* J (* l (* l l)))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -10200.0) {
tmp = l * (J * (2.0 + ((l * l) * 0.3333333333333333)));
} else if (l <= 10200.0) {
tmp = U + (l * (2.0 * J));
} else {
tmp = 0.3333333333333333 * (J * (l * (l * l)));
}
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 <= (-10200.0d0)) then
tmp = l * (j * (2.0d0 + ((l * l) * 0.3333333333333333d0)))
else if (l <= 10200.0d0) then
tmp = u + (l * (2.0d0 * j))
else
tmp = 0.3333333333333333d0 * (j * (l * (l * l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -10200.0) {
tmp = l * (J * (2.0 + ((l * l) * 0.3333333333333333)));
} else if (l <= 10200.0) {
tmp = U + (l * (2.0 * J));
} else {
tmp = 0.3333333333333333 * (J * (l * (l * l)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -10200.0: tmp = l * (J * (2.0 + ((l * l) * 0.3333333333333333))) elif l <= 10200.0: tmp = U + (l * (2.0 * J)) else: tmp = 0.3333333333333333 * (J * (l * (l * l))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -10200.0) tmp = Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)))); elseif (l <= 10200.0) tmp = Float64(U + Float64(l * Float64(2.0 * J))); else tmp = Float64(0.3333333333333333 * Float64(J * Float64(l * Float64(l * l)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -10200.0) tmp = l * (J * (2.0 + ((l * l) * 0.3333333333333333))); elseif (l <= 10200.0) tmp = U + (l * (2.0 * J)); else tmp = 0.3333333333333333 * (J * (l * (l * l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -10200.0], N[(l * N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 10200.0], N[(U + N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(J * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -10200:\\
\;\;\;\;\ell \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{elif}\;\ell \leq 10200:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot J\right)\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\end{array}
\end{array}
if l < -10200Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified76.4%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.7%
Simplified58.7%
Taylor expanded in J around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.7%
Simplified58.7%
if -10200 < l < 10200Initial program 75.3%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified99.9%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.7%
Simplified88.7%
Taylor expanded in l around 0
Simplified88.7%
if 10200 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified75.6%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.7%
Simplified55.7%
flip3-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr0.1%
Taylor expanded in l around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.9%
Simplified59.9%
Final simplification74.6%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* 0.3333333333333333 (* J (* l (* l l)))))) (if (<= l -66000000.0) t_0 (if (<= l 1700.0) (+ U (* l (* 2.0 J))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 * (J * (l * (l * l)));
double tmp;
if (l <= -66000000.0) {
tmp = t_0;
} else if (l <= 1700.0) {
tmp = U + (l * (2.0 * J));
} 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 = 0.3333333333333333d0 * (j * (l * (l * l)))
if (l <= (-66000000.0d0)) then
tmp = t_0
else if (l <= 1700.0d0) then
tmp = u + (l * (2.0d0 * j))
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 * (l * (l * l)));
double tmp;
if (l <= -66000000.0) {
tmp = t_0;
} else if (l <= 1700.0) {
tmp = U + (l * (2.0 * J));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 * (J * (l * (l * l))) tmp = 0 if l <= -66000000.0: tmp = t_0 elif l <= 1700.0: tmp = U + (l * (2.0 * J)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 * Float64(J * Float64(l * Float64(l * l)))) tmp = 0.0 if (l <= -66000000.0) tmp = t_0; elseif (l <= 1700.0) tmp = Float64(U + Float64(l * Float64(2.0 * J))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 * (J * (l * (l * l))); tmp = 0.0; if (l <= -66000000.0) tmp = t_0; elseif (l <= 1700.0) tmp = U + (l * (2.0 * J)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(J * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -66000000.0], t$95$0, If[LessEqual[l, 1700.0], N[(U + N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\mathbf{if}\;\ell \leq -66000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 1700:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot J\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -6.6e7 or 1700 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified75.9%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.0%
Simplified57.0%
flip3-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr2.6%
Taylor expanded in l around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.3%
Simplified59.3%
if -6.6e7 < l < 1700Initial program 75.3%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified99.9%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.7%
Simplified88.7%
Taylor expanded in l around 0
Simplified88.7%
Final simplification74.6%
(FPCore (J l K U)
:precision binary64
(+
U
(*
l
(*
J
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
double code(double J, double l, double K, double U) {
return U + (l * (J * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
}
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 + (l * (j * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
end function
public static double code(double J, double l, double K, double U) {
return U + (l * (J * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
}
def code(J, l, K, U): return U + (l * (J * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))
function code(J, l, K, U) return Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))) end
function tmp = code(J, l, K, U) tmp = U + (l * (J * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); end
code[J_, l_, K_, U_] := N[(U + N[(l * N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \ell \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)
\end{array}
Initial program 87.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.6%
Simplified93.6%
Taylor expanded in K around 0
Simplified77.2%
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6476.5%
Applied egg-rr76.5%
Final simplification76.5%
(FPCore (J l K U) :precision binary64 (+ U (* l (+ (* 2.0 J) (* (* l l) (* 0.016666666666666666 (* J (* l l))))))))
double code(double J, double l, double K, double U) {
return U + (l * ((2.0 * J) + ((l * l) * (0.016666666666666666 * (J * (l * l))))));
}
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 + (l * ((2.0d0 * j) + ((l * l) * (0.016666666666666666d0 * (j * (l * l))))))
end function
public static double code(double J, double l, double K, double U) {
return U + (l * ((2.0 * J) + ((l * l) * (0.016666666666666666 * (J * (l * l))))));
}
def code(J, l, K, U): return U + (l * ((2.0 * J) + ((l * l) * (0.016666666666666666 * (J * (l * l))))))
function code(J, l, K, U) return Float64(U + Float64(l * Float64(Float64(2.0 * J) + Float64(Float64(l * l) * Float64(0.016666666666666666 * Float64(J * Float64(l * l))))))) end
function tmp = code(J, l, K, U) tmp = U + (l * ((2.0 * J) + ((l * l) * (0.016666666666666666 * (J * (l * l)))))); end
code[J_, l_, K_, U_] := N[(U + N[(l * N[(N[(2.0 * J), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] * N[(0.016666666666666666 * N[(J * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \ell \cdot \left(2 \cdot J + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right)\right)
\end{array}
Initial program 87.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.6%
Simplified93.6%
Taylor expanded in K around 0
Simplified77.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.2%
Simplified76.2%
Taylor expanded in l around inf
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.2%
Simplified76.2%
Final simplification76.2%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* 2.0 (* l J)))) (if (<= l -2.2e+103) t_0 (if (<= l 1.25e-30) U t_0))))
double code(double J, double l, double K, double U) {
double t_0 = 2.0 * (l * J);
double tmp;
if (l <= -2.2e+103) {
tmp = t_0;
} else if (l <= 1.25e-30) {
tmp = 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 = 2.0d0 * (l * j)
if (l <= (-2.2d+103)) then
tmp = t_0
else if (l <= 1.25d-30) then
tmp = 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 = 2.0 * (l * J);
double tmp;
if (l <= -2.2e+103) {
tmp = t_0;
} else if (l <= 1.25e-30) {
tmp = U;
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 2.0 * (l * J) tmp = 0 if l <= -2.2e+103: tmp = t_0 elif l <= 1.25e-30: tmp = U else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(2.0 * Float64(l * J)) tmp = 0.0 if (l <= -2.2e+103) tmp = t_0; elseif (l <= 1.25e-30) tmp = U; else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 2.0 * (l * J); tmp = 0.0; if (l <= -2.2e+103) tmp = t_0; elseif (l <= 1.25e-30) tmp = U; else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(2.0 * N[(l * J), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2.2e+103], t$95$0, If[LessEqual[l, 1.25e-30], U, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(\ell \cdot J\right)\\
\mathbf{if}\;\ell \leq -2.2 \cdot 10^{+103}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 1.25 \cdot 10^{-30}:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -2.19999999999999992e103 or 1.24999999999999993e-30 < l Initial program 97.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.0%
Simplified93.0%
Taylor expanded in K around 0
Simplified71.9%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.0%
Simplified71.0%
Taylor expanded in l around 0
Simplified24.7%
if -2.19999999999999992e103 < l < 1.24999999999999993e-30Initial program 79.6%
Taylor expanded in J around 0
Simplified67.1%
Final simplification49.0%
(FPCore (J l K U) :precision binary64 (+ U (* l (* J (+ 2.0 (* (* l l) 0.3333333333333333))))))
double code(double J, double l, double K, double U) {
return U + (l * (J * (2.0 + ((l * l) * 0.3333333333333333))));
}
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 + (l * (j * (2.0d0 + ((l * l) * 0.3333333333333333d0))))
end function
public static double code(double J, double l, double K, double U) {
return U + (l * (J * (2.0 + ((l * l) * 0.3333333333333333))));
}
def code(J, l, K, U): return U + (l * (J * (2.0 + ((l * l) * 0.3333333333333333))))
function code(J, l, K, U) return Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))) end
function tmp = code(J, l, K, U) tmp = U + (l * (J * (2.0 + ((l * l) * 0.3333333333333333)))); end
code[J_, l_, K_, U_] := N[(U + N[(l * N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \ell \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)
\end{array}
Initial program 87.2%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified88.4%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.5%
Simplified73.5%
Final simplification73.5%
(FPCore (J l K U) :precision binary64 (+ U (* l (* 2.0 J))))
double code(double J, double l, double K, double U) {
return U + (l * (2.0 * J));
}
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 + (l * (2.0d0 * j))
end function
public static double code(double J, double l, double K, double U) {
return U + (l * (2.0 * J));
}
def code(J, l, K, U): return U + (l * (2.0 * J))
function code(J, l, K, U) return Float64(U + Float64(l * Float64(2.0 * J))) end
function tmp = code(J, l, K, U) tmp = U + (l * (2.0 * J)); end
code[J_, l_, K_, U_] := N[(U + N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \ell \cdot \left(2 \cdot J\right)
\end{array}
Initial program 87.2%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified88.4%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.5%
Simplified73.5%
Taylor expanded in l around 0
Simplified56.1%
Final simplification56.1%
(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 87.2%
Taylor expanded in J around 0
Simplified39.9%
herbie shell --seed 2024161
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))