
(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 21 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 (+ (* (* (cos (/ K 2.0)) (sinh l)) (* 2.0 J)) U))
double code(double J, double l, double K, double U) {
return ((cos((K / 2.0)) * sinh(l)) * (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 = ((cos((k / 2.0d0)) * sinh(l)) * (2.0d0 * j)) + u
end function
public static double code(double J, double l, double K, double U) {
return ((Math.cos((K / 2.0)) * Math.sinh(l)) * (2.0 * J)) + U;
}
def code(J, l, K, U): return ((math.cos((K / 2.0)) * math.sinh(l)) * (2.0 * J)) + U
function code(J, l, K, U) return Float64(Float64(Float64(cos(Float64(K / 2.0)) * sinh(l)) * Float64(2.0 * J)) + U) end
function tmp = code(J, l, K, U) tmp = ((cos((K / 2.0)) * sinh(l)) * (2.0 * J)) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * N[(2.0 * J), $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(\cos \left(\frac{K}{2}\right) \cdot \sinh \ell\right) \cdot \left(2 \cdot J\right) + U
\end{array}
Initial program 85.8%
sinh-undefN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (J l K U)
:precision binary64
(if (<= (cos (/ K 2.0)) -0.04)
(*
U
(+
1.0
(/
(* J (* (* l (* l (* l 0.3333333333333333))) (+ 1.0 (* -0.125 (* K K)))))
U)))
(+ U (* (sinh l) (* 2.0 J)))))
double code(double J, double l, double K, double U) {
double tmp;
if (cos((K / 2.0)) <= -0.04) {
tmp = U * (1.0 + ((J * ((l * (l * (l * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) / U));
} else {
tmp = U + (sinh(l) * (2.0 * 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.04d0)) then
tmp = u * (1.0d0 + ((j * ((l * (l * (l * 0.3333333333333333d0))) * (1.0d0 + ((-0.125d0) * (k * k))))) / u))
else
tmp = u + (sinh(l) * (2.0d0 * 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.04) {
tmp = U * (1.0 + ((J * ((l * (l * (l * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) / U));
} else {
tmp = U + (Math.sinh(l) * (2.0 * J));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if math.cos((K / 2.0)) <= -0.04: tmp = U * (1.0 + ((J * ((l * (l * (l * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) / U)) else: tmp = U + (math.sinh(l) * (2.0 * J)) return tmp
function code(J, l, K, U) tmp = 0.0 if (cos(Float64(K / 2.0)) <= -0.04) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(Float64(l * Float64(l * Float64(l * 0.3333333333333333))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))) / U))); else tmp = Float64(U + Float64(sinh(l) * Float64(2.0 * J))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (cos((K / 2.0)) <= -0.04) tmp = U * (1.0 + ((J * ((l * (l * (l * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) / U)); else tmp = U + (sinh(l) * (2.0 * J)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision], -0.04], N[(U * N[(1.0 + N[(N[(J * N[(N[(l * N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq -0.04:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(\left(\ell \cdot \left(\ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;U + \sinh \ell \cdot \left(2 \cdot J\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0400000000000000008Initial program 88.3%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified87.5%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.5%
Simplified55.5%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.0%
Simplified60.0%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-lft-neg-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
Simplified64.5%
if -0.0400000000000000008 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 85.0%
sinh-undefN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified94.2%
Final simplification87.1%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 5e-7)
(+ U (* (sinh l) (* 2.0 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) <= 5e-7) {
tmp = U + (sinh(l) * (2.0 * 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) <= 5d-7) then
tmp = u + (sinh(l) * (2.0d0 * 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) <= 5e-7) {
tmp = U + (Math.sinh(l) * (2.0 * 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) <= 5e-7: tmp = U + (math.sinh(l) * (2.0 * 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) <= 5e-7) tmp = Float64(U + Float64(sinh(l) * Float64(2.0 * 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) <= 5e-7) tmp = U + (sinh(l) * (2.0 * 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], 5e-7], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(2.0 * J), $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 5 \cdot 10^{-7}:\\
\;\;\;\;U + \sinh \ell \cdot \left(2 \cdot J\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)) < 4.99999999999999977e-7Initial program 84.9%
sinh-undefN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified85.0%
if 4.99999999999999977e-7 < (/.f64 K #s(literal 2 binary64)) Initial program 89.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-*.f6494.4%
Simplified94.4%
Final simplification86.9%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 5e-7)
(+ U (* (sinh l) (* 2.0 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) <= 5e-7) {
tmp = U + (sinh(l) * (2.0 * 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) <= 5d-7) then
tmp = u + (sinh(l) * (2.0d0 * 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) <= 5e-7) {
tmp = U + (Math.sinh(l) * (2.0 * 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) <= 5e-7: tmp = U + (math.sinh(l) * (2.0 * 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) <= 5e-7) tmp = Float64(U + Float64(sinh(l) * Float64(2.0 * 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) <= 5e-7) tmp = U + (sinh(l) * (2.0 * 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], 5e-7], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(2.0 * J), $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 5 \cdot 10^{-7}:\\
\;\;\;\;U + \sinh \ell \cdot \left(2 \cdot J\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)) < 4.99999999999999977e-7Initial program 84.9%
sinh-undefN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified85.0%
if 4.99999999999999977e-7 < (/.f64 K #s(literal 2 binary64)) Initial program 89.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-*.f6492.7%
Simplified92.7%
Final simplification86.5%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 5e-7)
(+ U (* (sinh l) (* 2.0 J)))
(+
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-7) {
tmp = U + (sinh(l) * (2.0 * J));
} 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-7) then
tmp = u + (sinh(l) * (2.0d0 * j))
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-7) {
tmp = U + (Math.sinh(l) * (2.0 * J));
} 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-7: tmp = U + (math.sinh(l) * (2.0 * J)) 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-7) tmp = Float64(U + Float64(sinh(l) * Float64(2.0 * J))); 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-7) tmp = U + (sinh(l) * (2.0 * J)); 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-7], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(2.0 * J), $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^{-7}:\\
\;\;\;\;U + \sinh \ell \cdot \left(2 \cdot J\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.99999999999999977e-7Initial program 84.9%
sinh-undefN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified85.0%
if 4.99999999999999977e-7 < (/.f64 K #s(literal 2 binary64)) Initial program 89.5%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.2%
Simplified87.2%
Final simplification85.4%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 5e-7)
(+ U (* (sinh l) (* 2.0 J)))
(+
U
(* l (* (cos (* K 0.5)) (* J (+ 2.0 (* (* l l) 0.3333333333333333))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 5e-7) {
tmp = U + (sinh(l) * (2.0 * J));
} else {
tmp = U + (l * (cos((K * 0.5)) * (J * (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-7) then
tmp = u + (sinh(l) * (2.0d0 * j))
else
tmp = u + (l * (cos((k * 0.5d0)) * (j * (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-7) {
tmp = U + (Math.sinh(l) * (2.0 * J));
} else {
tmp = U + (l * (Math.cos((K * 0.5)) * (J * (2.0 + ((l * l) * 0.3333333333333333)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (K / 2.0) <= 5e-7: tmp = U + (math.sinh(l) * (2.0 * J)) else: tmp = U + (l * (math.cos((K * 0.5)) * (J * (2.0 + ((l * l) * 0.3333333333333333))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 5e-7) tmp = Float64(U + Float64(sinh(l) * Float64(2.0 * J))); else tmp = Float64(U + Float64(l * Float64(cos(Float64(K * 0.5)) * Float64(J * 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-7) tmp = U + (sinh(l) * (2.0 * J)); else tmp = U + (l * (cos((K * 0.5)) * (J * (2.0 + ((l * l) * 0.3333333333333333))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 5e-7], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * 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^{-7}:\\
\;\;\;\;U + \sinh \ell \cdot \left(2 \cdot J\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \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.99999999999999977e-7Initial program 84.9%
sinh-undefN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified85.0%
if 4.99999999999999977e-7 < (/.f64 K #s(literal 2 binary64)) Initial program 89.5%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified83.6%
Final simplification84.7%
(FPCore (J l K U) :precision binary64 (+ U (/ J (/ 0.5 (sinh l)))))
double code(double J, double l, double K, double U) {
return U + (J / (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 / (0.5d0 / sinh(l)))
end function
public static double code(double J, double l, double K, double U) {
return U + (J / (0.5 / Math.sinh(l)));
}
def code(J, l, K, U): return U + (J / (0.5 / math.sinh(l)))
function code(J, l, K, U) return Float64(U + Float64(J / Float64(0.5 / sinh(l)))) end
function tmp = code(J, l, K, U) tmp = U + (J / (0.5 / sinh(l))); end
code[J_, l_, K_, U_] := N[(U + N[(J / N[(0.5 / N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \frac{J}{\frac{0.5}{\sinh \ell}}
\end{array}
Initial program 85.8%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
sinh-defN/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
clear-numN/A
associate-*r/N/A
sinh-defN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified81.3%
Final simplification81.3%
(FPCore (J l K U)
:precision binary64
(if (<= l -6e+219)
(* J (* l (* (* l l) 0.3333333333333333)))
(if (<= l -106000000.0)
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
(+ 1.0 (* -0.125 (* K K)))))
(+
U
(*
(* l J)
(+
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 (l <= -6e+219) {
tmp = J * (l * ((l * l) * 0.3333333333333333));
} else if (l <= -106000000.0) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
} else {
tmp = U + ((l * J) * (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 (l <= (-6d+219)) then
tmp = j * (l * ((l * l) * 0.3333333333333333d0))
else if (l <= (-106000000.0d0)) then
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))) * (1.0d0 + ((-0.125d0) * (k * k))))
else
tmp = u + ((l * j) * (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 (l <= -6e+219) {
tmp = J * (l * ((l * l) * 0.3333333333333333));
} else if (l <= -106000000.0) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K))));
} else {
tmp = U + ((l * J) * (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 l <= -6e+219: tmp = J * (l * ((l * l) * 0.3333333333333333)) elif l <= -106000000.0: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))) else: tmp = U + ((l * J) * (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 (l <= -6e+219) tmp = Float64(J * Float64(l * Float64(Float64(l * l) * 0.3333333333333333))); elseif (l <= -106000000.0) 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(l * J) * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968))))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -6e+219) tmp = J * (l * ((l * l) * 0.3333333333333333)); elseif (l <= -106000000.0) tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) * (1.0 + (-0.125 * (K * K)))); else tmp = U + ((l * J) * (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[l, -6e+219], N[(J * N[(l * N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -106000000.0], 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[(l * J), $MachinePrecision] * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6 \cdot 10^{+219}:\\
\;\;\;\;J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{elif}\;\ell \leq -106000000:\\
\;\;\;\;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(\ell \cdot J\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < -5.9999999999999995e219Initial program 100.0%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified100.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.9%
Simplified88.9%
if -5.9999999999999995e219 < l < -1.06e8Initial 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-*.f6472.2%
Simplified72.2%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.6%
Simplified69.6%
if -1.06e8 < l Initial program 80.9%
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-*.f6495.8%
Simplified95.8%
Taylor expanded in K around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.3%
Simplified81.3%
Final simplification79.6%
(FPCore (J l K U)
:precision binary64
(if (<= l -5e+218)
(* J (* l (* (* l l) 0.3333333333333333)))
(if (<= l -250000000.0)
(*
U
(+
1.0
(/
(*
J
(* (* l (* l (* l 0.3333333333333333))) (+ 1.0 (* -0.125 (* K K)))))
U)))
(+
U
(*
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 (l <= -5e+218) {
tmp = J * (l * ((l * l) * 0.3333333333333333));
} else if (l <= -250000000.0) {
tmp = U * (1.0 + ((J * ((l * (l * (l * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) / U));
} else {
tmp = U + (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 (l <= (-5d+218)) then
tmp = j * (l * ((l * l) * 0.3333333333333333d0))
else if (l <= (-250000000.0d0)) then
tmp = u * (1.0d0 + ((j * ((l * (l * (l * 0.3333333333333333d0))) * (1.0d0 + ((-0.125d0) * (k * k))))) / u))
else
tmp = u + (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 (l <= -5e+218) {
tmp = J * (l * ((l * l) * 0.3333333333333333));
} else if (l <= -250000000.0) {
tmp = U * (1.0 + ((J * ((l * (l * (l * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) / U));
} else {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -5e+218: tmp = J * (l * ((l * l) * 0.3333333333333333)) elif l <= -250000000.0: tmp = U * (1.0 + ((J * ((l * (l * (l * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) / U)) else: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -5e+218) tmp = Float64(J * Float64(l * Float64(Float64(l * l) * 0.3333333333333333))); elseif (l <= -250000000.0) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(Float64(l * Float64(l * Float64(l * 0.3333333333333333))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))) / U))); else tmp = Float64(U + 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 (l <= -5e+218) tmp = J * (l * ((l * l) * 0.3333333333333333)); elseif (l <= -250000000.0) tmp = U * (1.0 + ((J * ((l * (l * (l * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) / U)); else tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -5e+218], N[(J * N[(l * N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -250000000.0], N[(U * N[(1.0 + N[(N[(J * N[(N[(l * N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{+218}:\\
\;\;\;\;J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{elif}\;\ell \leq -250000000:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(\left(\ell \cdot \left(\ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;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)\\
\end{array}
\end{array}
if l < -4.99999999999999983e218Initial program 100.0%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified100.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.9%
Simplified88.9%
if -4.99999999999999983e218 < l < -2.5e8Initial program 100.0%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified54.2%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.6%
Simplified53.6%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.6%
Simplified53.6%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-lft-neg-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
Simplified65.4%
if -2.5e8 < l Initial program 80.9%
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.8%
Simplified94.8%
Taylor expanded in K around 0
Simplified80.3%
Final simplification78.1%
(FPCore (J l K U)
:precision binary64
(if (<= J 8e+140)
(+
U
(*
(* l J)
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
(* l l)
(+ 0.016666666666666666 (* l (* l 0.0003968253968253968)))))))))
(+
U
(*
l
(*
(* J (+ 2.0 (* (* l l) 0.3333333333333333)))
(+ 1.0 (* -0.125 (* K K))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (J <= 8e+140) {
tmp = U + ((l * J) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))));
} else {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (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 (j <= 8d+140) then
tmp = u + ((l * j) * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0))))))))
else
tmp = u + (l * ((j * (2.0d0 + ((l * l) * 0.3333333333333333d0))) * (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 (J <= 8e+140) {
tmp = U + ((l * J) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))));
} else {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if J <= 8e+140: tmp = U + ((l * J) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) else: tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (J <= 8e+140) tmp = Float64(U + Float64(Float64(l * J) * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968))))))))); else tmp = Float64(U + Float64(l * Float64(Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))) * 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 (J <= 8e+140) tmp = U + ((l * J) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))); else tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[J, 8e+140], N[(U + N[(N[(l * J), $MachinePrecision] * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;J \leq 8 \cdot 10^{+140}:\\
\;\;\;\;U + \left(\ell \cdot J\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\\
\end{array}
\end{array}
if J < 8.00000000000000047e140Initial program 88.9%
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-*.f6492.3%
Simplified92.3%
Taylor expanded in K around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6478.4%
Simplified78.4%
if 8.00000000000000047e140 < J Initial program 70.3%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified93.3%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.0%
Simplified74.0%
Final simplification77.7%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(*
J
(*
U
(+ (/ 1.0 J) (/ (* l (+ 2.0 (* l (* l 0.3333333333333333)))) U))))))
(if (<= l -6.2e+18) t_0 (if (<= l 1200.0) (+ U (* l (* 2.0 J))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (U * ((1.0 / J) + ((l * (2.0 + (l * (l * 0.3333333333333333)))) / U)));
double tmp;
if (l <= -6.2e+18) {
tmp = t_0;
} else if (l <= 1200.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 = j * (u * ((1.0d0 / j) + ((l * (2.0d0 + (l * (l * 0.3333333333333333d0)))) / u)))
if (l <= (-6.2d+18)) then
tmp = t_0
else if (l <= 1200.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 = J * (U * ((1.0 / J) + ((l * (2.0 + (l * (l * 0.3333333333333333)))) / U)));
double tmp;
if (l <= -6.2e+18) {
tmp = t_0;
} else if (l <= 1200.0) {
tmp = U + (l * (2.0 * J));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (U * ((1.0 / J) + ((l * (2.0 + (l * (l * 0.3333333333333333)))) / U))) tmp = 0 if l <= -6.2e+18: tmp = t_0 elif l <= 1200.0: tmp = U + (l * (2.0 * J)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(U * Float64(Float64(1.0 / J) + Float64(Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333)))) / U)))) tmp = 0.0 if (l <= -6.2e+18) tmp = t_0; elseif (l <= 1200.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 = J * (U * ((1.0 / J) + ((l * (2.0 + (l * (l * 0.3333333333333333)))) / U))); tmp = 0.0; if (l <= -6.2e+18) tmp = t_0; elseif (l <= 1200.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[(J * N[(U * N[(N[(1.0 / J), $MachinePrecision] + N[(N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -6.2e+18], t$95$0, If[LessEqual[l, 1200.0], N[(U + N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(U \cdot \left(\frac{1}{J} + \frac{\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)}{U}\right)\right)\\
\mathbf{if}\;\ell \leq -6.2 \cdot 10^{+18}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 1200:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot J\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -6.2e18 or 1200 < l Initial program 100.0%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified69.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.3%
Simplified51.3%
Taylor expanded in J around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.2%
Simplified54.2%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6466.4%
Simplified66.4%
if -6.2e18 < l < 1200Initial program 73.3%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified95.6%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.9%
Simplified81.9%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6481.9%
Simplified81.9%
Final simplification74.6%
(FPCore (J l K U)
:precision binary64
(if (<= J 8.2e+140)
(+
U
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
(+
U
(*
l
(*
(* J (+ 2.0 (* (* l l) 0.3333333333333333)))
(+ 1.0 (* -0.125 (* K K))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (J <= 8.2e+140) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (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 (j <= 8.2d+140) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
else
tmp = u + (l * ((j * (2.0d0 + ((l * l) * 0.3333333333333333d0))) * (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 (J <= 8.2e+140) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if J <= 8.2e+140: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) else: tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (J <= 8.2e+140) 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(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))) * 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 (J <= 8.2e+140) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); else tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[J, 8.2e+140], 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[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;J \leq 8.2 \cdot 10^{+140}:\\
\;\;\;\;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(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\\
\end{array}
\end{array}
if J < 8.1999999999999998e140Initial program 88.9%
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-*.f6490.0%
Simplified90.0%
Taylor expanded in K around 0
Simplified76.6%
if 8.1999999999999998e140 < J Initial program 70.3%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified93.3%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.0%
Simplified74.0%
Final simplification76.2%
(FPCore (J l K U)
:precision binary64
(if (<= J 2.05e+139)
(+
U
(*
(* l J)
(+
2.0
(* l (* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
(+
U
(*
l
(*
(* J (+ 2.0 (* (* l l) 0.3333333333333333)))
(+ 1.0 (* -0.125 (* K K))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (J <= 2.05e+139) {
tmp = U + ((l * J) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (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 (j <= 2.05d+139) then
tmp = u + ((l * j) * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
else
tmp = u + (l * ((j * (2.0d0 + ((l * l) * 0.3333333333333333d0))) * (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 (J <= 2.05e+139) {
tmp = U + ((l * J) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if J <= 2.05e+139: tmp = U + ((l * J) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) else: tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (J <= 2.05e+139) tmp = Float64(U + Float64(Float64(l * J) * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))); else tmp = Float64(U + Float64(l * Float64(Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))) * 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 (J <= 2.05e+139) tmp = U + ((l * J) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); else tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[J, 2.05e+139], N[(U + N[(N[(l * J), $MachinePrecision] * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;J \leq 2.05 \cdot 10^{+139}:\\
\;\;\;\;U + \left(\ell \cdot J\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\\
\end{array}
\end{array}
if J < 2.0500000000000001e139Initial program 88.9%
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-*.f6490.0%
Simplified90.0%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6475.7%
Simplified75.7%
if 2.0500000000000001e139 < J Initial program 70.3%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified93.3%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.0%
Simplified74.0%
Final simplification75.4%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* J (* l (* (* l l) 0.3333333333333333)))))
(if (<= l -7.7e+68)
t_0
(if (<= l -400.0)
(* (* l (* J (* l l))) (* (* K K) -0.041666666666666664))
(if (<= l 60000.0) (+ U (* l (* 2.0 J))) t_0)))))
double code(double J, double l, double K, double U) {
double t_0 = J * (l * ((l * l) * 0.3333333333333333));
double tmp;
if (l <= -7.7e+68) {
tmp = t_0;
} else if (l <= -400.0) {
tmp = (l * (J * (l * l))) * ((K * K) * -0.041666666666666664);
} else if (l <= 60000.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 = j * (l * ((l * l) * 0.3333333333333333d0))
if (l <= (-7.7d+68)) then
tmp = t_0
else if (l <= (-400.0d0)) then
tmp = (l * (j * (l * l))) * ((k * k) * (-0.041666666666666664d0))
else if (l <= 60000.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 = J * (l * ((l * l) * 0.3333333333333333));
double tmp;
if (l <= -7.7e+68) {
tmp = t_0;
} else if (l <= -400.0) {
tmp = (l * (J * (l * l))) * ((K * K) * -0.041666666666666664);
} else if (l <= 60000.0) {
tmp = U + (l * (2.0 * J));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (l * ((l * l) * 0.3333333333333333)) tmp = 0 if l <= -7.7e+68: tmp = t_0 elif l <= -400.0: tmp = (l * (J * (l * l))) * ((K * K) * -0.041666666666666664) elif l <= 60000.0: tmp = U + (l * (2.0 * J)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(l * Float64(Float64(l * l) * 0.3333333333333333))) tmp = 0.0 if (l <= -7.7e+68) tmp = t_0; elseif (l <= -400.0) tmp = Float64(Float64(l * Float64(J * Float64(l * l))) * Float64(Float64(K * K) * -0.041666666666666664)); elseif (l <= 60000.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 = J * (l * ((l * l) * 0.3333333333333333)); tmp = 0.0; if (l <= -7.7e+68) tmp = t_0; elseif (l <= -400.0) tmp = (l * (J * (l * l))) * ((K * K) * -0.041666666666666664); elseif (l <= 60000.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[(J * N[(l * N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -7.7e+68], t$95$0, If[LessEqual[l, -400.0], N[(N[(l * N[(J * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(K * K), $MachinePrecision] * -0.041666666666666664), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 60000.0], N[(U + N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{if}\;\ell \leq -7.7 \cdot 10^{+68}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq -400:\\
\;\;\;\;\left(\ell \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot \left(\left(K \cdot K\right) \cdot -0.041666666666666664\right)\\
\mathbf{elif}\;\ell \leq 60000:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot J\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -7.6999999999999998e68 or 6e4 < l Initial program 100.0%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified76.2%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.8%
Simplified57.8%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.2%
Simplified64.2%
if -7.6999999999999998e68 < l < -400Initial program 99.9%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified16.8%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.9%
Simplified33.9%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.9%
Simplified33.9%
Taylor expanded in K around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.0%
Simplified33.0%
if -400 < l < 6e4Initial program 72.1%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified99.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6485.6%
Simplified85.6%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6485.6%
Simplified85.6%
Final simplification72.4%
(FPCore (J l K U)
:precision binary64
(if (<= J 1.4e+143)
(+
U
(*
(* l J)
(+
2.0
(* l (* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
(+ U (* l (+ (* 2.0 J) (* (* J (* K K)) -0.25))))))
double code(double J, double l, double K, double U) {
double tmp;
if (J <= 1.4e+143) {
tmp = U + ((l * J) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((2.0 * J) + ((J * (K * K)) * -0.25)));
}
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 (j <= 1.4d+143) then
tmp = u + ((l * j) * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
else
tmp = u + (l * ((2.0d0 * j) + ((j * (k * k)) * (-0.25d0))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (J <= 1.4e+143) {
tmp = U + ((l * J) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((2.0 * J) + ((J * (K * K)) * -0.25)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if J <= 1.4e+143: tmp = U + ((l * J) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) else: tmp = U + (l * ((2.0 * J) + ((J * (K * K)) * -0.25))) return tmp
function code(J, l, K, U) tmp = 0.0 if (J <= 1.4e+143) tmp = Float64(U + Float64(Float64(l * J) * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))); else tmp = Float64(U + Float64(l * Float64(Float64(2.0 * J) + Float64(Float64(J * Float64(K * K)) * -0.25)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (J <= 1.4e+143) tmp = U + ((l * J) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); else tmp = U + (l * ((2.0 * J) + ((J * (K * K)) * -0.25))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[J, 1.4e+143], N[(U + N[(N[(l * J), $MachinePrecision] * N[(2.0 + N[(l * N[(l * 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 * J), $MachinePrecision] + N[(N[(J * N[(K * K), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;J \leq 1.4 \cdot 10^{+143}:\\
\;\;\;\;U + \left(\ell \cdot J\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot J + \left(J \cdot \left(K \cdot K\right)\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if J < 1.39999999999999999e143Initial program 89.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-*.f6490.1%
Simplified90.1%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6475.9%
Simplified75.9%
if 1.39999999999999999e143 < J Initial program 68.8%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified93.0%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified42.7%
Taylor expanded in l around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.7%
Simplified72.7%
Final simplification75.4%
(FPCore (J l K U) :precision binary64 (if (<= J 1.4e+143) (+ U (/ J (/ 0.5 (* l (+ 1.0 (* (* l l) 0.16666666666666666)))))) (+ U (* l (+ (* 2.0 J) (* (* J (* K K)) -0.25))))))
double code(double J, double l, double K, double U) {
double tmp;
if (J <= 1.4e+143) {
tmp = U + (J / (0.5 / (l * (1.0 + ((l * l) * 0.16666666666666666)))));
} else {
tmp = U + (l * ((2.0 * J) + ((J * (K * K)) * -0.25)));
}
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 (j <= 1.4d+143) then
tmp = u + (j / (0.5d0 / (l * (1.0d0 + ((l * l) * 0.16666666666666666d0)))))
else
tmp = u + (l * ((2.0d0 * j) + ((j * (k * k)) * (-0.25d0))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (J <= 1.4e+143) {
tmp = U + (J / (0.5 / (l * (1.0 + ((l * l) * 0.16666666666666666)))));
} else {
tmp = U + (l * ((2.0 * J) + ((J * (K * K)) * -0.25)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if J <= 1.4e+143: tmp = U + (J / (0.5 / (l * (1.0 + ((l * l) * 0.16666666666666666))))) else: tmp = U + (l * ((2.0 * J) + ((J * (K * K)) * -0.25))) return tmp
function code(J, l, K, U) tmp = 0.0 if (J <= 1.4e+143) tmp = Float64(U + Float64(J / Float64(0.5 / Float64(l * Float64(1.0 + Float64(Float64(l * l) * 0.16666666666666666)))))); else tmp = Float64(U + Float64(l * Float64(Float64(2.0 * J) + Float64(Float64(J * Float64(K * K)) * -0.25)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (J <= 1.4e+143) tmp = U + (J / (0.5 / (l * (1.0 + ((l * l) * 0.16666666666666666))))); else tmp = U + (l * ((2.0 * J) + ((J * (K * K)) * -0.25))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[J, 1.4e+143], N[(U + N[(J / N[(0.5 / N[(l * N[(1.0 + N[(N[(l * l), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(2.0 * J), $MachinePrecision] + N[(N[(J * N[(K * K), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;J \leq 1.4 \cdot 10^{+143}:\\
\;\;\;\;U + \frac{J}{\frac{0.5}{\ell \cdot \left(1 + \left(\ell \cdot \ell\right) \cdot 0.16666666666666666\right)}}\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot J + \left(J \cdot \left(K \cdot K\right)\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if J < 1.39999999999999999e143Initial program 89.0%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
sinh-defN/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
clear-numN/A
associate-*r/N/A
sinh-defN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified84.4%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.5%
Simplified71.5%
if 1.39999999999999999e143 < J Initial program 68.8%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified93.0%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified42.7%
Taylor expanded in l around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.7%
Simplified72.7%
Final simplification71.7%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* l (* (* l l) 0.3333333333333333))))) (if (<= l -3.4e+52) t_0 (if (<= l 5200.0) (+ U (* l (* 2.0 J))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (l * ((l * l) * 0.3333333333333333));
double tmp;
if (l <= -3.4e+52) {
tmp = t_0;
} else if (l <= 5200.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 = j * (l * ((l * l) * 0.3333333333333333d0))
if (l <= (-3.4d+52)) then
tmp = t_0
else if (l <= 5200.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 = J * (l * ((l * l) * 0.3333333333333333));
double tmp;
if (l <= -3.4e+52) {
tmp = t_0;
} else if (l <= 5200.0) {
tmp = U + (l * (2.0 * J));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (l * ((l * l) * 0.3333333333333333)) tmp = 0 if l <= -3.4e+52: tmp = t_0 elif l <= 5200.0: tmp = U + (l * (2.0 * J)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(l * Float64(Float64(l * l) * 0.3333333333333333))) tmp = 0.0 if (l <= -3.4e+52) tmp = t_0; elseif (l <= 5200.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 = J * (l * ((l * l) * 0.3333333333333333)); tmp = 0.0; if (l <= -3.4e+52) tmp = t_0; elseif (l <= 5200.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[(J * N[(l * N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.4e+52], t$95$0, If[LessEqual[l, 5200.0], N[(U + N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{if}\;\ell \leq -3.4 \cdot 10^{+52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 5200:\\
\;\;\;\;U + \ell \cdot \left(2 \cdot J\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -3.4e52 or 5200 < l Initial program 100.0%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified75.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.2%
Simplified56.2%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.3%
Simplified62.3%
if -3.4e52 < l < 5200Initial program 75.3%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified88.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.0%
Simplified76.0%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6476.0%
Simplified76.0%
Final simplification70.2%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* (* l l) 0.3333333333333333))) (if (<= l 950.0) (+ U (* l (* J (+ 2.0 t_0)))) (* J (* l t_0)))))
double code(double J, double l, double K, double U) {
double t_0 = (l * l) * 0.3333333333333333;
double tmp;
if (l <= 950.0) {
tmp = U + (l * (J * (2.0 + t_0)));
} else {
tmp = J * (l * 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 * l) * 0.3333333333333333d0
if (l <= 950.0d0) then
tmp = u + (l * (j * (2.0d0 + t_0)))
else
tmp = j * (l * t_0)
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = (l * l) * 0.3333333333333333;
double tmp;
if (l <= 950.0) {
tmp = U + (l * (J * (2.0 + t_0)));
} else {
tmp = J * (l * t_0);
}
return tmp;
}
def code(J, l, K, U): t_0 = (l * l) * 0.3333333333333333 tmp = 0 if l <= 950.0: tmp = U + (l * (J * (2.0 + t_0))) else: tmp = J * (l * t_0) return tmp
function code(J, l, K, U) t_0 = Float64(Float64(l * l) * 0.3333333333333333) tmp = 0.0 if (l <= 950.0) tmp = Float64(U + Float64(l * Float64(J * Float64(2.0 + t_0)))); else tmp = Float64(J * Float64(l * t_0)); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = (l * l) * 0.3333333333333333; tmp = 0.0; if (l <= 950.0) tmp = U + (l * (J * (2.0 + t_0))); else tmp = J * (l * t_0); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]}, If[LessEqual[l, 950.0], N[(U + N[(l * N[(J * N[(2.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\\
\mathbf{if}\;\ell \leq 950:\\
\;\;\;\;U + \ell \cdot \left(J \cdot \left(2 + t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(\ell \cdot t\_0\right)\\
\end{array}
\end{array}
if l < 950Initial program 81.7%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified87.4%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.5%
Simplified71.5%
if 950 < l Initial program 100.0%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified68.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.0%
Simplified54.0%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.1%
Simplified64.1%
Final simplification69.8%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* 2.0 l)))) (if (<= l -3.4e+52) t_0 (if (<= l 950.0) U t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (2.0 * l);
double tmp;
if (l <= -3.4e+52) {
tmp = t_0;
} else if (l <= 950.0) {
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 = j * (2.0d0 * l)
if (l <= (-3.4d+52)) then
tmp = t_0
else if (l <= 950.0d0) 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 = J * (2.0 * l);
double tmp;
if (l <= -3.4e+52) {
tmp = t_0;
} else if (l <= 950.0) {
tmp = U;
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (2.0 * l) tmp = 0 if l <= -3.4e+52: tmp = t_0 elif l <= 950.0: tmp = U else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(2.0 * l)) tmp = 0.0 if (l <= -3.4e+52) tmp = t_0; elseif (l <= 950.0) tmp = U; else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (2.0 * l); tmp = 0.0; if (l <= -3.4e+52) tmp = t_0; elseif (l <= 950.0) tmp = U; else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.4e+52], t$95$0, If[LessEqual[l, 950.0], U, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(2 \cdot \ell\right)\\
\mathbf{if}\;\ell \leq -3.4 \cdot 10^{+52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 950:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -3.4e52 or 950 < l Initial program 100.0%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified75.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.2%
Simplified56.2%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6423.5%
Simplified23.5%
Taylor expanded in l around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6423.6%
Simplified23.6%
if -3.4e52 < l < 950Initial program 75.3%
Taylor expanded in J around 0
Simplified63.4%
Final simplification46.4%
(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 85.8%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Simplified83.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6453.6%
Simplified53.6%
Final simplification53.6%
(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.8%
Taylor expanded in J around 0
Simplified37.3%
herbie shell --seed 2024164
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))