
(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 22 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 (* (* (cos (/ K 2.0)) J) (sinh l))) U))
double code(double J, double l, double K, double U) {
return (2.0 * ((cos((K / 2.0)) * J) * sinh(l))) + 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 * ((cos((k / 2.0d0)) * j) * sinh(l))) + u
end function
public static double code(double J, double l, double K, double U) {
return (2.0 * ((Math.cos((K / 2.0)) * J) * Math.sinh(l))) + U;
}
def code(J, l, K, U): return (2.0 * ((math.cos((K / 2.0)) * J) * math.sinh(l))) + U
function code(J, l, K, U) return Float64(Float64(2.0 * Float64(Float64(cos(Float64(K / 2.0)) * J) * sinh(l))) + U) end
function tmp = code(J, l, K, U) tmp = (2.0 * ((cos((K / 2.0)) * J) * sinh(l))) + U; end
code[J_, l_, K_, U_] := N[(N[(2.0 * N[(N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * J), $MachinePrecision] * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(\cos \left(\frac{K}{2}\right) \cdot J\right) \cdot \sinh \ell\right) + U
\end{array}
Initial program 85.5%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.915)
(+
U
(*
l
(*
(+ 2.0 (* (* l l) 0.3333333333333333))
(+ J (* J (* -0.125 (* K K)))))))
(if (<= t_0 -0.05)
(+ U (* t_0 (* J (* 2.0 l))))
(+ U (* 2.0 (* J (sinh l))))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.915) {
tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K))))));
} else if (t_0 <= -0.05) {
tmp = U + (t_0 * (J * (2.0 * l)));
} else {
tmp = U + (2.0 * (J * sinh(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) :: t_0
real(8) :: tmp
t_0 = cos((k / 2.0d0))
if (t_0 <= (-0.915d0)) then
tmp = u + (l * ((2.0d0 + ((l * l) * 0.3333333333333333d0)) * (j + (j * ((-0.125d0) * (k * k))))))
else if (t_0 <= (-0.05d0)) then
tmp = u + (t_0 * (j * (2.0d0 * l)))
else
tmp = u + (2.0d0 * (j * sinh(l)))
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.915) {
tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K))))));
} else if (t_0 <= -0.05) {
tmp = U + (t_0 * (J * (2.0 * l)));
} else {
tmp = U + (2.0 * (J * Math.sinh(l)));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.915: tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K)))))) elif t_0 <= -0.05: tmp = U + (t_0 * (J * (2.0 * l))) else: tmp = U + (2.0 * (J * math.sinh(l))) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.915) tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); elseif (t_0 <= -0.05) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(2.0 * l)))); else tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); 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.915) tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K)))))); elseif (t_0 <= -0.05) tmp = U + (t_0 * (J * (2.0 * l))); else tmp = U + (2.0 * (J * sinh(l))); 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.915], N[(U + N[(l * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.05], N[(U + N[(t$95$0 * N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.915:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq -0.05:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(2 \cdot \ell\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.91500000000000004Initial program 81.5%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified93.2%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.5%
Simplified79.5%
if -0.91500000000000004 < (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.050000000000000003Initial program 82.9%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6478.5%
Simplified78.5%
if -0.050000000000000003 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 86.4%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified93.6%
Final simplification90.2%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.915)
(+
U
(*
l
(*
(+ 2.0 (* (* l l) 0.3333333333333333))
(+ J (* J (* -0.125 (* K K)))))))
(if (<= t_0 -0.05)
(+ U (* J (/ t_0 (/ 0.5 l))))
(+ U (* 2.0 (* J (sinh l))))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.915) {
tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K))))));
} else if (t_0 <= -0.05) {
tmp = U + (J * (t_0 / (0.5 / l)));
} else {
tmp = U + (2.0 * (J * sinh(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) :: t_0
real(8) :: tmp
t_0 = cos((k / 2.0d0))
if (t_0 <= (-0.915d0)) then
tmp = u + (l * ((2.0d0 + ((l * l) * 0.3333333333333333d0)) * (j + (j * ((-0.125d0) * (k * k))))))
else if (t_0 <= (-0.05d0)) then
tmp = u + (j * (t_0 / (0.5d0 / l)))
else
tmp = u + (2.0d0 * (j * sinh(l)))
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.915) {
tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K))))));
} else if (t_0 <= -0.05) {
tmp = U + (J * (t_0 / (0.5 / l)));
} else {
tmp = U + (2.0 * (J * Math.sinh(l)));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.915: tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K)))))) elif t_0 <= -0.05: tmp = U + (J * (t_0 / (0.5 / l))) else: tmp = U + (2.0 * (J * math.sinh(l))) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.915) tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); elseif (t_0 <= -0.05) tmp = Float64(U + Float64(J * Float64(t_0 / Float64(0.5 / l)))); else tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); 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.915) tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K)))))); elseif (t_0 <= -0.05) tmp = U + (J * (t_0 / (0.5 / l))); else tmp = U + (2.0 * (J * sinh(l))); 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.915], N[(U + N[(l * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.05], N[(U + N[(J * N[(t$95$0 / N[(0.5 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.915:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq -0.05:\\
\;\;\;\;U + J \cdot \frac{t\_0}{\frac{0.5}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.91500000000000004Initial program 81.5%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified93.2%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.5%
Simplified79.5%
if -0.91500000000000004 < (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.050000000000000003Initial program 82.9%
*-commutativeN/A
associate-*r*N/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
sinh-undefN/A
Applied egg-rr99.9%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.8%
Applied egg-rr99.8%
Taylor expanded in l around 0
Simplified78.5%
if -0.050000000000000003 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 86.4%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified93.6%
Final simplification90.2%
(FPCore (J l K U) :precision binary64 (if (<= (cos (/ K 2.0)) -0.05) (+ U (* l (* (+ 2.0 (* (* l l) 0.3333333333333333)) (* J (cos (* K 0.5)))))) (+ U (* 2.0 (* J (sinh l))))))
double code(double J, double l, double K, double U) {
double tmp;
if (cos((K / 2.0)) <= -0.05) {
tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J * cos((K * 0.5)))));
} else {
tmp = U + (2.0 * (J * sinh(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 (cos((k / 2.0d0)) <= (-0.05d0)) then
tmp = u + (l * ((2.0d0 + ((l * l) * 0.3333333333333333d0)) * (j * cos((k * 0.5d0)))))
else
tmp = u + (2.0d0 * (j * sinh(l)))
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.05) {
tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J * Math.cos((K * 0.5)))));
} else {
tmp = U + (2.0 * (J * Math.sinh(l)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if math.cos((K / 2.0)) <= -0.05: tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J * math.cos((K * 0.5))))) else: tmp = U + (2.0 * (J * math.sinh(l))) return tmp
function code(J, l, K, U) tmp = 0.0 if (cos(Float64(K / 2.0)) <= -0.05) tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) * Float64(J * cos(Float64(K * 0.5)))))); else tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (cos((K / 2.0)) <= -0.05) tmp = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J * cos((K * 0.5))))); else tmp = U + (2.0 * (J * sinh(l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision], -0.05], N[(U + N[(l * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[(J * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq -0.05:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right) \cdot \left(J \cdot \cos \left(K \cdot 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.050000000000000003Initial program 82.6%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified91.8%
if -0.050000000000000003 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 86.4%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified93.6%
Final simplification93.2%
(FPCore (J l K U) :precision binary64 (+ U (* J (/ (cos (/ K 2.0)) (/ 0.5 (sinh l))))))
double code(double J, double l, double K, double U) {
return U + (J * (cos((K / 2.0)) / (0.5 / sinh(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 + (j * (cos((k / 2.0d0)) / (0.5d0 / sinh(l))))
end function
public static double code(double J, double l, double K, double U) {
return U + (J * (Math.cos((K / 2.0)) / (0.5 / Math.sinh(l))));
}
def code(J, l, K, U): return U + (J * (math.cos((K / 2.0)) / (0.5 / math.sinh(l))))
function code(J, l, K, U) return Float64(U + Float64(J * Float64(cos(Float64(K / 2.0)) / Float64(0.5 / sinh(l))))) end
function tmp = code(J, l, K, U) tmp = U + (J * (cos((K / 2.0)) / (0.5 / sinh(l)))); end
code[J_, l_, K_, U_] := N[(U + N[(J * N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] / N[(0.5 / N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \frac{\cos \left(\frac{K}{2}\right)}{\frac{0.5}{\sinh \ell}}
\end{array}
Initial program 85.5%
*-commutativeN/A
associate-*r*N/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
sinh-undefN/A
Applied egg-rr99.9%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 2e-50)
(+ U (* 2.0 (* J (sinh l))))
(+
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) <= 2e-50) {
tmp = U + (2.0 * (J * sinh(l)));
} 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) <= 2d-50) then
tmp = u + (2.0d0 * (j * sinh(l)))
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) <= 2e-50) {
tmp = U + (2.0 * (J * Math.sinh(l)));
} 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) <= 2e-50: tmp = U + (2.0 * (J * math.sinh(l))) 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) <= 2e-50) tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); 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) <= 2e-50) tmp = U + (2.0 * (J * sinh(l))); 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], 2e-50], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{-50}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\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)) < 2.00000000000000002e-50Initial program 86.1%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified83.5%
if 2.00000000000000002e-50 < (/.f64 K #s(literal 2 binary64)) Initial program 83.7%
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
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.4%
Simplified95.4%
Final simplification86.6%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 2e-50)
(+ U (* 2.0 (* J (sinh l))))
(+
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) <= 2e-50) {
tmp = U + (2.0 * (J * sinh(l)));
} 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) <= 2d-50) then
tmp = u + (2.0d0 * (j * sinh(l)))
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) <= 2e-50) {
tmp = U + (2.0 * (J * Math.sinh(l)));
} 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) <= 2e-50: tmp = U + (2.0 * (J * math.sinh(l))) 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) <= 2e-50) tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); 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) <= 2e-50) tmp = U + (2.0 * (J * sinh(l))); 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], 2e-50], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{-50}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\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)) < 2.00000000000000002e-50Initial program 86.1%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified83.5%
if 2.00000000000000002e-50 < (/.f64 K #s(literal 2 binary64)) Initial program 83.7%
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.5%
Simplified92.5%
Final simplification85.8%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 5e-20)
(+ U (* 2.0 (* J (sinh l))))
(+
U
(* (cos (/ K 2.0)) (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 5e-20) {
tmp = U + (2.0 * (J * sinh(l)));
} else {
tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))));
}
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) <= 5d-20) then
tmp = u + (2.0d0 * (j * sinh(l)))
else
tmp = u + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 5e-20) {
tmp = U + (2.0 * (J * Math.sinh(l)));
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (K / 2.0) <= 5e-20: tmp = U + (2.0 * (J * math.sinh(l))) else: tmp = U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * 0.3333333333333333))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 5e-20) tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((K / 2.0) <= 5e-20) tmp = U + (2.0 * (J * sinh(l))); else tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * 0.3333333333333333))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 5e-20], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $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] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 5 \cdot 10^{-20}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 4.9999999999999999e-20Initial program 85.7%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified84.2%
if 4.9999999999999999e-20 < (/.f64 K #s(literal 2 binary64)) Initial program 84.8%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.1%
Simplified83.1%
Final simplification83.9%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (+ (* -0.125 (* K K)) 1.0)))
(if (<= l -5e+80)
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
t_0))
(if (<= l 2e+138)
(+ U (* 2.0 (* J (sinh l))))
(+ U (* (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333)))) t_0))))))
double code(double J, double l, double K, double U) {
double t_0 = (-0.125 * (K * K)) + 1.0;
double tmp;
if (l <= -5e+80) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * t_0);
} else if (l <= 2e+138) {
tmp = U + (2.0 * (J * sinh(l)));
} else {
tmp = U + ((J * (l * (2.0 + ((l * l) * 0.3333333333333333)))) * 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.125d0) * (k * k)) + 1.0d0
if (l <= (-5d+80)) then
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))) * t_0)
else if (l <= 2d+138) then
tmp = u + (2.0d0 * (j * sinh(l)))
else
tmp = u + ((j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0)))) * t_0)
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = (-0.125 * (K * K)) + 1.0;
double tmp;
if (l <= -5e+80) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * t_0);
} else if (l <= 2e+138) {
tmp = U + (2.0 * (J * Math.sinh(l)));
} else {
tmp = U + ((J * (l * (2.0 + ((l * l) * 0.3333333333333333)))) * t_0);
}
return tmp;
}
def code(J, l, K, U): t_0 = (-0.125 * (K * K)) + 1.0 tmp = 0 if l <= -5e+80: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * t_0) elif l <= 2e+138: tmp = U + (2.0 * (J * math.sinh(l))) else: tmp = U + ((J * (l * (2.0 + ((l * l) * 0.3333333333333333)))) * t_0) return tmp
function code(J, l, K, U) t_0 = Float64(Float64(-0.125 * Float64(K * K)) + 1.0) tmp = 0.0 if (l <= -5e+80) tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))) * t_0)); elseif (l <= 2e+138) tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); else tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)))) * t_0)); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = (-0.125 * (K * K)) + 1.0; tmp = 0.0; if (l <= -5e+80) tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * t_0); elseif (l <= 2e+138) tmp = U + (2.0 * (J * sinh(l))); else tmp = U + ((J * (l * (2.0 + ((l * l) * 0.3333333333333333)))) * t_0); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[l, -5e+80], 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] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2e+138], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.125 \cdot \left(K \cdot K\right) + 1\\
\mathbf{if}\;\ell \leq -5 \cdot 10^{+80}:\\
\;\;\;\;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 t\_0\\
\mathbf{elif}\;\ell \leq 2 \cdot 10^{+138}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if l < -4.99999999999999961e80Initial 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-*.f6481.8%
Simplified81.8%
if -4.99999999999999961e80 < l < 2.0000000000000001e138Initial program 78.9%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified82.9%
if 2.0000000000000001e138 < 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-*.f6492.0%
Simplified92.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
Final simplification83.6%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (+ (* -0.125 (* K K)) 1.0)))
(if (<= l -6e+81)
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
t_0))
(if (<= l 1.4e+140)
(+
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)))) t_0))))))
double code(double J, double l, double K, double U) {
double t_0 = (-0.125 * (K * K)) + 1.0;
double tmp;
if (l <= -6e+81) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * t_0);
} else if (l <= 1.4e+140) {
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)))) * 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.125d0) * (k * k)) + 1.0d0
if (l <= (-6d+81)) then
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))) * t_0)
else if (l <= 1.4d+140) 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)))) * t_0)
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = (-0.125 * (K * K)) + 1.0;
double tmp;
if (l <= -6e+81) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * t_0);
} else if (l <= 1.4e+140) {
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)))) * t_0);
}
return tmp;
}
def code(J, l, K, U): t_0 = (-0.125 * (K * K)) + 1.0 tmp = 0 if l <= -6e+81: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * t_0) elif l <= 1.4e+140: 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)))) * t_0) return tmp
function code(J, l, K, U) t_0 = Float64(Float64(-0.125 * Float64(K * K)) + 1.0) tmp = 0.0 if (l <= -6e+81) tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))) * t_0)); elseif (l <= 1.4e+140) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * 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) * 0.3333333333333333)))) * t_0)); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = (-0.125 * (K * K)) + 1.0; tmp = 0.0; if (l <= -6e+81) tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * t_0); elseif (l <= 1.4e+140) 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)))) * t_0); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[l, -6e+81], 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] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.4e+140], N[(U + N[(J * N[(l * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 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] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.125 \cdot \left(K \cdot K\right) + 1\\
\mathbf{if}\;\ell \leq -6 \cdot 10^{+81}:\\
\;\;\;\;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 t\_0\\
\mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+140}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \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 0.3333333333333333\right)\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if l < -5.99999999999999995e81Initial 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-*.f6481.8%
Simplified81.8%
if -5.99999999999999995e81 < l < 1.39999999999999991e140Initial program 78.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6474.6%
Simplified74.6%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/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-*.f6478.6%
Simplified78.6%
if 1.39999999999999991e140 < 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-*.f6492.0%
Simplified92.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
Final simplification80.6%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* -0.125 (* K K))) (t_1 (+ 2.0 (* (* l l) 0.3333333333333333))))
(if (<= l -1e+248)
(+ U (* l (* t_1 (+ J (* J t_0)))))
(if (<= l 2e+138)
(+
U
(*
J
(*
l
(+
2.0
(*
l
(*
l
(+
0.3333333333333333
(*
(* l l)
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968))))))))))
(+ U (* (* J (* l t_1)) (+ t_0 1.0)))))))
double code(double J, double l, double K, double U) {
double t_0 = -0.125 * (K * K);
double t_1 = 2.0 + ((l * l) * 0.3333333333333333);
double tmp;
if (l <= -1e+248) {
tmp = U + (l * (t_1 * (J + (J * t_0))));
} else if (l <= 2e+138) {
tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + ((J * (l * t_1)) * (t_0 + 1.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.125d0) * (k * k)
t_1 = 2.0d0 + ((l * l) * 0.3333333333333333d0)
if (l <= (-1d+248)) then
tmp = u + (l * (t_1 * (j + (j * t_0))))
else if (l <= 2d+138) then
tmp = u + (j * (l * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
else
tmp = u + ((j * (l * t_1)) * (t_0 + 1.0d0))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = -0.125 * (K * K);
double t_1 = 2.0 + ((l * l) * 0.3333333333333333);
double tmp;
if (l <= -1e+248) {
tmp = U + (l * (t_1 * (J + (J * t_0))));
} else if (l <= 2e+138) {
tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + ((J * (l * t_1)) * (t_0 + 1.0));
}
return tmp;
}
def code(J, l, K, U): t_0 = -0.125 * (K * K) t_1 = 2.0 + ((l * l) * 0.3333333333333333) tmp = 0 if l <= -1e+248: tmp = U + (l * (t_1 * (J + (J * t_0)))) elif l <= 2e+138: tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) else: tmp = U + ((J * (l * t_1)) * (t_0 + 1.0)) return tmp
function code(J, l, K, U) t_0 = Float64(-0.125 * Float64(K * K)) t_1 = Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) tmp = 0.0 if (l <= -1e+248) tmp = Float64(U + Float64(l * Float64(t_1 * Float64(J + Float64(J * t_0))))); elseif (l <= 2e+138) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))); else tmp = Float64(U + Float64(Float64(J * Float64(l * t_1)) * Float64(t_0 + 1.0))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = -0.125 * (K * K); t_1 = 2.0 + ((l * l) * 0.3333333333333333); tmp = 0.0; if (l <= -1e+248) tmp = U + (l * (t_1 * (J + (J * t_0)))); elseif (l <= 2e+138) tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); else tmp = U + ((J * (l * t_1)) * (t_0 + 1.0)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1e+248], N[(U + N[(l * N[(t$95$1 * N[(J + N[(J * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2e+138], N[(U + N[(J * N[(l * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 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 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.125 \cdot \left(K \cdot K\right)\\
t_1 := 2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\\
\mathbf{if}\;\ell \leq -1 \cdot 10^{+248}:\\
\;\;\;\;U + \ell \cdot \left(t\_1 \cdot \left(J + J \cdot t\_0\right)\right)\\
\mathbf{elif}\;\ell \leq 2 \cdot 10^{+138}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \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 t\_1\right)\right) \cdot \left(t\_0 + 1\right)\\
\end{array}
\end{array}
if l < -1.00000000000000005e248Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.8%
Simplified93.8%
if -1.00000000000000005e248 < l < 2.0000000000000001e138Initial program 82.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6474.6%
Simplified74.6%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/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-*.f6477.8%
Simplified77.8%
if 2.0000000000000001e138 < 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-*.f6492.0%
Simplified92.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
Final simplification80.2%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* -0.125 (* K K))) (t_1 (+ 2.0 (* (* l l) 0.3333333333333333))))
(if (<= l -1e+249)
(+ U (* l (* t_1 (+ J (* J t_0)))))
(if (<= l 2e+138)
(*
U
(+
1.0
(/
(*
J
(*
l
(+
2.0
(*
l
(* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
U)))
(+ U (* (* J (* l t_1)) (+ t_0 1.0)))))))
double code(double J, double l, double K, double U) {
double t_0 = -0.125 * (K * K);
double t_1 = 2.0 + ((l * l) * 0.3333333333333333);
double tmp;
if (l <= -1e+249) {
tmp = U + (l * (t_1 * (J + (J * t_0))));
} else if (l <= 2e+138) {
tmp = U * (1.0 + ((J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))) / U));
} else {
tmp = U + ((J * (l * t_1)) * (t_0 + 1.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.125d0) * (k * k)
t_1 = 2.0d0 + ((l * l) * 0.3333333333333333d0)
if (l <= (-1d+249)) then
tmp = u + (l * (t_1 * (j + (j * t_0))))
else if (l <= 2d+138) then
tmp = u * (1.0d0 + ((j * (l * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))) / u))
else
tmp = u + ((j * (l * t_1)) * (t_0 + 1.0d0))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = -0.125 * (K * K);
double t_1 = 2.0 + ((l * l) * 0.3333333333333333);
double tmp;
if (l <= -1e+249) {
tmp = U + (l * (t_1 * (J + (J * t_0))));
} else if (l <= 2e+138) {
tmp = U * (1.0 + ((J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))) / U));
} else {
tmp = U + ((J * (l * t_1)) * (t_0 + 1.0));
}
return tmp;
}
def code(J, l, K, U): t_0 = -0.125 * (K * K) t_1 = 2.0 + ((l * l) * 0.3333333333333333) tmp = 0 if l <= -1e+249: tmp = U + (l * (t_1 * (J + (J * t_0)))) elif l <= 2e+138: tmp = U * (1.0 + ((J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))) / U)) else: tmp = U + ((J * (l * t_1)) * (t_0 + 1.0)) return tmp
function code(J, l, K, U) t_0 = Float64(-0.125 * Float64(K * K)) t_1 = Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) tmp = 0.0 if (l <= -1e+249) tmp = Float64(U + Float64(l * Float64(t_1 * Float64(J + Float64(J * t_0))))); elseif (l <= 2e+138) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))) / U))); else tmp = Float64(U + Float64(Float64(J * Float64(l * t_1)) * Float64(t_0 + 1.0))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = -0.125 * (K * K); t_1 = 2.0 + ((l * l) * 0.3333333333333333); tmp = 0.0; if (l <= -1e+249) tmp = U + (l * (t_1 * (J + (J * t_0)))); elseif (l <= 2e+138) tmp = U * (1.0 + ((J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))) / U)); else tmp = U + ((J * (l * t_1)) * (t_0 + 1.0)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1e+249], N[(U + N[(l * N[(t$95$1 * N[(J + N[(J * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2e+138], N[(U * N[(1.0 + N[(N[(J * N[(l * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * N[(l * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.125 \cdot \left(K \cdot K\right)\\
t_1 := 2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\\
\mathbf{if}\;\ell \leq -1 \cdot 10^{+249}:\\
\;\;\;\;U + \ell \cdot \left(t\_1 \cdot \left(J + J \cdot t\_0\right)\right)\\
\mathbf{elif}\;\ell \leq 2 \cdot 10^{+138}:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot t\_1\right)\right) \cdot \left(t\_0 + 1\right)\\
\end{array}
\end{array}
if l < -9.9999999999999992e248Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.8%
Simplified93.8%
if -9.9999999999999992e248 < l < 2.0000000000000001e138Initial program 82.8%
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
+-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-*.f6476.1%
Simplified76.1%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified76.6%
if 2.0000000000000001e138 < 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-*.f6492.0%
Simplified92.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
Final simplification79.2%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* -0.125 (* K K))) (t_1 (+ 2.0 (* (* l l) 0.3333333333333333))))
(if (<= l -4.4e+248)
(+ U (* l (* t_1 (+ J (* J t_0)))))
(if (<= l 2e+138)
(+
U
(*
J
(*
l
(+
2.0
(*
l
(* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
(+ U (* (* J (* l t_1)) (+ t_0 1.0)))))))
double code(double J, double l, double K, double U) {
double t_0 = -0.125 * (K * K);
double t_1 = 2.0 + ((l * l) * 0.3333333333333333);
double tmp;
if (l <= -4.4e+248) {
tmp = U + (l * (t_1 * (J + (J * t_0))));
} else if (l <= 2e+138) {
tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
} else {
tmp = U + ((J * (l * t_1)) * (t_0 + 1.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.125d0) * (k * k)
t_1 = 2.0d0 + ((l * l) * 0.3333333333333333d0)
if (l <= (-4.4d+248)) then
tmp = u + (l * (t_1 * (j + (j * t_0))))
else if (l <= 2d+138) then
tmp = u + (j * (l * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))))
else
tmp = u + ((j * (l * t_1)) * (t_0 + 1.0d0))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = -0.125 * (K * K);
double t_1 = 2.0 + ((l * l) * 0.3333333333333333);
double tmp;
if (l <= -4.4e+248) {
tmp = U + (l * (t_1 * (J + (J * t_0))));
} else if (l <= 2e+138) {
tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
} else {
tmp = U + ((J * (l * t_1)) * (t_0 + 1.0));
}
return tmp;
}
def code(J, l, K, U): t_0 = -0.125 * (K * K) t_1 = 2.0 + ((l * l) * 0.3333333333333333) tmp = 0 if l <= -4.4e+248: tmp = U + (l * (t_1 * (J + (J * t_0)))) elif l <= 2e+138: tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))) else: tmp = U + ((J * (l * t_1)) * (t_0 + 1.0)) return tmp
function code(J, l, K, U) t_0 = Float64(-0.125 * Float64(K * K)) t_1 = Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) tmp = 0.0 if (l <= -4.4e+248) tmp = Float64(U + Float64(l * Float64(t_1 * Float64(J + Float64(J * t_0))))); elseif (l <= 2e+138) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))))); else tmp = Float64(U + Float64(Float64(J * Float64(l * t_1)) * Float64(t_0 + 1.0))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = -0.125 * (K * K); t_1 = 2.0 + ((l * l) * 0.3333333333333333); tmp = 0.0; if (l <= -4.4e+248) tmp = U + (l * (t_1 * (J + (J * t_0)))); elseif (l <= 2e+138) tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))); else tmp = U + ((J * (l * t_1)) * (t_0 + 1.0)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -4.4e+248], N[(U + N[(l * N[(t$95$1 * N[(J + N[(J * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2e+138], N[(U + N[(J * N[(l * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * N[(l * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.125 \cdot \left(K \cdot K\right)\\
t_1 := 2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\\
\mathbf{if}\;\ell \leq -4.4 \cdot 10^{+248}:\\
\;\;\;\;U + \ell \cdot \left(t\_1 \cdot \left(J + J \cdot t\_0\right)\right)\\
\mathbf{elif}\;\ell \leq 2 \cdot 10^{+138}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot t\_1\right)\right) \cdot \left(t\_0 + 1\right)\\
\end{array}
\end{array}
if l < -4.3999999999999999e248Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.8%
Simplified93.8%
if -4.3999999999999999e248 < l < 2.0000000000000001e138Initial program 82.8%
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
+-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-*.f6476.1%
Simplified76.1%
if 2.0000000000000001e138 < 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-*.f6492.0%
Simplified92.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
Final simplification78.7%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(+
U
(*
l
(*
(+ 2.0 (* (* l l) 0.3333333333333333))
(+ J (* J (* -0.125 (* K K)))))))))
(if (<= l -1e+249)
t_0
(if (<= l 1e+143)
(+
U
(*
J
(*
l
(+
2.0
(*
l
(* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
t_0))))
double code(double J, double l, double K, double U) {
double t_0 = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K))))));
double tmp;
if (l <= -1e+249) {
tmp = t_0;
} else if (l <= 1e+143) {
tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
} 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 = u + (l * ((2.0d0 + ((l * l) * 0.3333333333333333d0)) * (j + (j * ((-0.125d0) * (k * k))))))
if (l <= (-1d+249)) then
tmp = t_0
else if (l <= 1d+143) then
tmp = u + (j * (l * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))))
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 = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K))))));
double tmp;
if (l <= -1e+249) {
tmp = t_0;
} else if (l <= 1e+143) {
tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K)))))) tmp = 0 if l <= -1e+249: tmp = t_0 elif l <= 1e+143: tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))) tmp = 0.0 if (l <= -1e+249) tmp = t_0; elseif (l <= 1e+143) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = U + (l * ((2.0 + ((l * l) * 0.3333333333333333)) * (J + (J * (-0.125 * (K * K)))))); tmp = 0.0; if (l <= -1e+249) tmp = t_0; elseif (l <= 1e+143) tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(U + N[(l * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1e+249], t$95$0, If[LessEqual[l, 1e+143], N[(U + N[(J * N[(l * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := U + \ell \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\mathbf{if}\;\ell \leq -1 \cdot 10^{+249}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 10^{+143}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -9.9999999999999992e248 or 1e143 < 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
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified97.6%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.3%
Simplified90.3%
if -9.9999999999999992e248 < l < 1e143Initial program 82.8%
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
+-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-*.f6476.1%
Simplified76.1%
Final simplification78.3%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (+ U (* J (* l (* l (* l (* (* l l) 0.016666666666666666)))))))) (if (<= l -250000.0) t_0 (if (<= l 3.4) (+ U (* J (* 2.0 l))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = U + (J * (l * (l * (l * ((l * l) * 0.016666666666666666)))));
double tmp;
if (l <= -250000.0) {
tmp = t_0;
} else if (l <= 3.4) {
tmp = U + (J * (2.0 * l));
} 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 = u + (j * (l * (l * (l * ((l * l) * 0.016666666666666666d0)))))
if (l <= (-250000.0d0)) then
tmp = t_0
else if (l <= 3.4d0) then
tmp = u + (j * (2.0d0 * l))
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 = U + (J * (l * (l * (l * ((l * l) * 0.016666666666666666)))));
double tmp;
if (l <= -250000.0) {
tmp = t_0;
} else if (l <= 3.4) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = U + (J * (l * (l * (l * ((l * l) * 0.016666666666666666))))) tmp = 0 if l <= -250000.0: tmp = t_0 elif l <= 3.4: tmp = U + (J * (2.0 * l)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(U + Float64(J * Float64(l * Float64(l * Float64(l * Float64(Float64(l * l) * 0.016666666666666666)))))) tmp = 0.0 if (l <= -250000.0) tmp = t_0; elseif (l <= 3.4) tmp = Float64(U + Float64(J * Float64(2.0 * l))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = U + (J * (l * (l * (l * ((l * l) * 0.016666666666666666))))); tmp = 0.0; if (l <= -250000.0) tmp = t_0; elseif (l <= 3.4) tmp = U + (J * (2.0 * l)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(U + N[(J * N[(l * N[(l * N[(l * N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -250000.0], t$95$0, If[LessEqual[l, 3.4], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := U + J \cdot \left(\ell \cdot \left(\ell \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\
\mathbf{if}\;\ell \leq -250000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 3.4:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -2.5e5 or 3.39999999999999991 < 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-*.f6491.6%
Simplified91.6%
Taylor expanded in K around 0
*-lowering-*.f64N/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-*.f6469.6%
Simplified69.6%
Taylor expanded in l around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.6%
Simplified69.6%
if -2.5e5 < l < 3.39999999999999991Initial program 69.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6467.0%
Simplified67.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1%
Simplified79.1%
Final simplification74.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* J (* l (+ 2.0 (* l (* l 0.3333333333333333)))))))
(if (<= l -3.4e+67)
t_0
(if (<= l 2.3e+98) (* U (+ 1.0 (/ (* l (* 2.0 J)) U))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (l * (2.0 + (l * (l * 0.3333333333333333))));
double tmp;
if (l <= -3.4e+67) {
tmp = t_0;
} else if (l <= 2.3e+98) {
tmp = U * (1.0 + ((l * (2.0 * J)) / 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 + (l * (l * 0.3333333333333333d0))))
if (l <= (-3.4d+67)) then
tmp = t_0
else if (l <= 2.3d+98) then
tmp = u * (1.0d0 + ((l * (2.0d0 * j)) / 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 + (l * (l * 0.3333333333333333))));
double tmp;
if (l <= -3.4e+67) {
tmp = t_0;
} else if (l <= 2.3e+98) {
tmp = U * (1.0 + ((l * (2.0 * J)) / U));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (l * (2.0 + (l * (l * 0.3333333333333333)))) tmp = 0 if l <= -3.4e+67: tmp = t_0 elif l <= 2.3e+98: tmp = U * (1.0 + ((l * (2.0 * J)) / U)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))) tmp = 0.0 if (l <= -3.4e+67) tmp = t_0; elseif (l <= 2.3e+98) tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(2.0 * J)) / U))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (l * (2.0 + (l * (l * 0.3333333333333333)))); tmp = 0.0; if (l <= -3.4e+67) tmp = t_0; elseif (l <= 2.3e+98) tmp = U * (1.0 + ((l * (2.0 * J)) / U)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.4e+67], t$95$0, If[LessEqual[l, 2.3e+98], N[(U * N[(1.0 + N[(N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\
\mathbf{if}\;\ell \leq -3.4 \cdot 10^{+67}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{+98}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(2 \cdot J\right)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -3.4000000000000002e67 or 2.30000000000000013e98 < 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
+-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-*.f6472.7%
Simplified72.7%
Taylor expanded in J around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lft-identityN/A
+-lowering-+.f64N/A
*-lft-identityN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.7%
Simplified72.7%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6465.0%
Simplified65.0%
if -3.4000000000000002e67 < l < 2.30000000000000013e98Initial program 76.4%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6472.8%
Simplified72.8%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6464.5%
Simplified64.5%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
associate-*r*N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6469.0%
Simplified69.0%
Final simplification67.4%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* l (+ 2.0 (* l (* l 0.3333333333333333))))))) (if (<= l -185000.0) t_0 (if (<= l 1.4e-8) (+ U (* J (* 2.0 l))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (l * (2.0 + (l * (l * 0.3333333333333333))));
double tmp;
if (l <= -185000.0) {
tmp = t_0;
} else if (l <= 1.4e-8) {
tmp = U + (J * (2.0 * l));
} 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 + (l * (l * 0.3333333333333333d0))))
if (l <= (-185000.0d0)) then
tmp = t_0
else if (l <= 1.4d-8) then
tmp = u + (j * (2.0d0 * l))
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 + (l * (l * 0.3333333333333333))));
double tmp;
if (l <= -185000.0) {
tmp = t_0;
} else if (l <= 1.4e-8) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (l * (2.0 + (l * (l * 0.3333333333333333)))) tmp = 0 if l <= -185000.0: tmp = t_0 elif l <= 1.4e-8: tmp = U + (J * (2.0 * l)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))) tmp = 0.0 if (l <= -185000.0) tmp = t_0; elseif (l <= 1.4e-8) tmp = Float64(U + Float64(J * Float64(2.0 * l))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (l * (2.0 + (l * (l * 0.3333333333333333)))); tmp = 0.0; if (l <= -185000.0) tmp = t_0; elseif (l <= 1.4e-8) tmp = U + (J * (2.0 * l)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -185000.0], t$95$0, If[LessEqual[l, 1.4e-8], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\
\mathbf{if}\;\ell \leq -185000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 1.4 \cdot 10^{-8}:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -185000 or 1.4e-8 < l Initial program 99.8%
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-*.f6491.0%
Simplified91.0%
Taylor expanded in K around 0
*-lowering-*.f64N/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-*.f6468.8%
Simplified68.8%
Taylor expanded in J around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lft-identityN/A
+-lowering-+.f64N/A
*-lft-identityN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.8%
Simplified68.8%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6453.7%
Simplified53.7%
if -185000 < l < 1.4e-8Initial program 68.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6467.9%
Simplified67.9%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.2%
Simplified80.2%
Final simplification65.9%
(FPCore (J l K U)
:precision binary64
(+
U
(*
J
(*
l
(+
2.0
(* l (* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))))
double code(double J, double l, double K, double U) {
return U + (J * (l * (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 + (j * (l * (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 + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
}
def code(J, l, K, U): return U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))))
function code(J, l, K, U) return Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))))) end
function tmp = code(J, l, K, U) tmp = U + (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))); end
code[J_, l_, K_, U_] := N[(U + N[(J * N[(l * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)
\end{array}
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-*.f6494.7%
Simplified94.7%
Taylor expanded in K around 0
*-lowering-*.f64N/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-*.f6474.0%
Simplified74.0%
Final simplification74.0%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* l (* 2.0 J)))) (if (<= l -192000.0) t_0 (if (<= l 8.5e-9) U t_0))))
double code(double J, double l, double K, double U) {
double t_0 = l * (2.0 * J);
double tmp;
if (l <= -192000.0) {
tmp = t_0;
} else if (l <= 8.5e-9) {
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 = l * (2.0d0 * j)
if (l <= (-192000.0d0)) then
tmp = t_0
else if (l <= 8.5d-9) 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 = l * (2.0 * J);
double tmp;
if (l <= -192000.0) {
tmp = t_0;
} else if (l <= 8.5e-9) {
tmp = U;
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = l * (2.0 * J) tmp = 0 if l <= -192000.0: tmp = t_0 elif l <= 8.5e-9: tmp = U else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(l * Float64(2.0 * J)) tmp = 0.0 if (l <= -192000.0) tmp = t_0; elseif (l <= 8.5e-9) tmp = U; else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = l * (2.0 * J); tmp = 0.0; if (l <= -192000.0) tmp = t_0; elseif (l <= 8.5e-9) tmp = U; else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -192000.0], t$95$0, If[LessEqual[l, 8.5e-9], U, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \ell \cdot \left(2 \cdot J\right)\\
\mathbf{if}\;\ell \leq -192000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 8.5 \cdot 10^{-9}:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -192000 or 8.5e-9 < l Initial program 99.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6477.0%
Simplified77.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6421.2%
Simplified21.2%
Taylor expanded in J around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6421.0%
Simplified21.0%
if -192000 < l < 8.5e-9Initial program 68.8%
Taylor expanded in J around 0
Simplified67.7%
Final simplification42.6%
(FPCore (J l K U) :precision binary64 (+ U (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333))))))
double code(double J, double l, double K, double U) {
return U + (J * (l * (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 + (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0))))
end function
public static double code(double J, double l, double K, double U) {
return U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
}
def code(J, l, K, U): return U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))))
function code(J, l, K, U) return Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))) end
function tmp = code(J, l, K, U) tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))); end
code[J_, l_, K_, U_] := N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)
\end{array}
Initial program 85.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6472.8%
Simplified72.8%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.9%
Simplified65.9%
Final simplification65.9%
(FPCore (J l K U) :precision binary64 (+ U (* J (* 2.0 l))))
double code(double J, double l, double K, double U) {
return U + (J * (2.0 * 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 + (j * (2.0d0 * l))
end function
public static double code(double J, double l, double K, double U) {
return U + (J * (2.0 * l));
}
def code(J, l, K, U): return U + (J * (2.0 * l))
function code(J, l, K, U) return Float64(U + Float64(J * Float64(2.0 * l))) end
function tmp = code(J, l, K, U) tmp = U + (J * (2.0 * l)); end
code[J_, l_, K_, U_] := N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \left(2 \cdot \ell\right)
\end{array}
Initial program 85.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6472.8%
Simplified72.8%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6448.4%
Simplified48.4%
Final simplification48.4%
(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 85.5%
Taylor expanded in J around 0
Simplified32.5%
herbie shell --seed 2024150
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))