
(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 23 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 (+ (* (* (* J (sinh l)) 2.0) (cos (/ K 2.0))) U))
double code(double J, double l, double K, double U) {
return (((J * sinh(l)) * 2.0) * 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 * sinh(l)) * 2.0d0) * cos((k / 2.0d0))) + u
end function
public static double code(double J, double l, double K, double U) {
return (((J * Math.sinh(l)) * 2.0) * Math.cos((K / 2.0))) + U;
}
def code(J, l, K, U): return (((J * math.sinh(l)) * 2.0) * math.cos((K / 2.0))) + U
function code(J, l, K, U) return Float64(Float64(Float64(Float64(J * sinh(l)) * 2.0) * cos(Float64(K / 2.0))) + U) end
function tmp = code(J, l, K, U) tmp = (((J * sinh(l)) * 2.0) * cos((K / 2.0))) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(J \cdot \sinh \ell\right) \cdot 2\right) \cdot \cos \left(\frac{K}{2}\right) + U
\end{array}
Initial program 84.4%
*-commutativeN/A
sinh-undefN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 0.9996)
(+ U (* t_0 (* J (* l (+ 2.0 (* l (* l 0.3333333333333333)))))))
(*
U
(+
1.0
(/
(*
l
(*
J
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968)))))))))
U))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= 0.9996) {
tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333))))));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = cos((k / 2.0d0))
if (t_0 <= 0.9996d0) then
tmp = u + (t_0 * (j * (l * (2.0d0 + (l * (l * 0.3333333333333333d0))))))
else
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))) / u))
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.9996) {
tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333))))));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= 0.9996: tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333)))))) else: tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U)) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= 0.9996) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))) / U))); 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.9996) tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333)))))); else tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U)); 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.9996], N[(U + N[(t$95$0 * N[(J * N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq 0.9996:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.99960000000000004Initial program 83.8%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.2%
Simplified91.2%
if 0.99960000000000004 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 85.2%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.0%
Simplified93.0%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.3%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.3%
Final simplification93.2%
(FPCore (J l K U)
:precision binary64
(if (<= (cos (/ K 2.0)) 0.9996)
(+ U (* l (* (cos (* K 0.5)) (* J (+ 2.0 (* l (* l 0.3333333333333333)))))))
(*
U
(+
1.0
(/
(*
l
(*
J
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968)))))))))
U)))))
double code(double J, double l, double K, double U) {
double tmp;
if (cos((K / 2.0)) <= 0.9996) {
tmp = U + (l * (cos((K * 0.5)) * (J * (2.0 + (l * (l * 0.3333333333333333))))));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (cos((k / 2.0d0)) <= 0.9996d0) then
tmp = u + (l * (cos((k * 0.5d0)) * (j * (2.0d0 + (l * (l * 0.3333333333333333d0))))))
else
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))) / u))
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.9996) {
tmp = U + (l * (Math.cos((K * 0.5)) * (J * (2.0 + (l * (l * 0.3333333333333333))))));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if math.cos((K / 2.0)) <= 0.9996: tmp = U + (l * (math.cos((K * 0.5)) * (J * (2.0 + (l * (l * 0.3333333333333333)))))) else: tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U)) return tmp
function code(J, l, K, U) tmp = 0.0 if (cos(Float64(K / 2.0)) <= 0.9996) tmp = Float64(U + Float64(l * Float64(cos(Float64(K * 0.5)) * Float64(J * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))) / U))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (cos((K / 2.0)) <= 0.9996) tmp = U + (l * (cos((K * 0.5)) * (J * (2.0 + (l * (l * 0.3333333333333333)))))); else tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision], 0.9996], N[(U + N[(l * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq 0.9996:\\
\;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.99960000000000004Initial program 83.8%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified86.9%
if 0.99960000000000004 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 85.2%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.0%
Simplified93.0%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.3%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.3%
Final simplification90.9%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(+
0.3333333333333333
(*
l
(* l (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))
(t_1 (* (* l 0.3333333333333333) (* (cos (* K 0.5)) (* J (* l l)))))
(t_2 (* (* l l) t_0)))
(if (<= l -1.02e+132)
t_1
(if (<= l -8.6e+51)
(*
U
(+
1.0
(/
(* J (* (* l (+ 2.0 (* l (* l t_0)))) (+ 1.0 (* -0.125 (* K K)))))
U)))
(if (<= l -125000000000.0)
(*
U
(+
1.0
(/ (/ (* (* J l) (- 4.0 (* (* l l) (* t_0 t_2)))) (- 2.0 t_2)) U)))
(if (<= l 950.0)
(+ U (* (cos (/ K 2.0)) (* J (* l 2.0))))
(if (<= l 8.5e+130)
(*
U
(*
J
(*
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* l (* l 0.0003968253968253968))))))))
(/ l U))))
t_1)))))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))));
double t_1 = (l * 0.3333333333333333) * (cos((K * 0.5)) * (J * (l * l)));
double t_2 = (l * l) * t_0;
double tmp;
if (l <= -1.02e+132) {
tmp = t_1;
} else if (l <= -8.6e+51) {
tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U));
} else if (l <= -125000000000.0) {
tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_2)))) / (2.0 - t_2)) / U));
} else if (l <= 950.0) {
tmp = U + (cos((K / 2.0)) * (J * (l * 2.0)));
} else if (l <= 8.5e+130) {
tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))
t_1 = (l * 0.3333333333333333d0) * (cos((k * 0.5d0)) * (j * (l * l)))
t_2 = (l * l) * t_0
if (l <= (-1.02d+132)) then
tmp = t_1
else if (l <= (-8.6d+51)) then
tmp = u * (1.0d0 + ((j * ((l * (2.0d0 + (l * (l * t_0)))) * (1.0d0 + ((-0.125d0) * (k * k))))) / u))
else if (l <= (-125000000000.0d0)) then
tmp = u * (1.0d0 + ((((j * l) * (4.0d0 - ((l * l) * (t_0 * t_2)))) / (2.0d0 - t_2)) / u))
else if (l <= 950.0d0) then
tmp = u + (cos((k / 2.0d0)) * (j * (l * 2.0d0)))
else if (l <= 8.5d+130) then
tmp = u * (j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0)))))))) * (l / u)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))));
double t_1 = (l * 0.3333333333333333) * (Math.cos((K * 0.5)) * (J * (l * l)));
double t_2 = (l * l) * t_0;
double tmp;
if (l <= -1.02e+132) {
tmp = t_1;
} else if (l <= -8.6e+51) {
tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U));
} else if (l <= -125000000000.0) {
tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_2)))) / (2.0 - t_2)) / U));
} else if (l <= 950.0) {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * 2.0)));
} else if (l <= 8.5e+130) {
tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U)));
} else {
tmp = t_1;
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))) t_1 = (l * 0.3333333333333333) * (math.cos((K * 0.5)) * (J * (l * l))) t_2 = (l * l) * t_0 tmp = 0 if l <= -1.02e+132: tmp = t_1 elif l <= -8.6e+51: tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U)) elif l <= -125000000000.0: tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_2)))) / (2.0 - t_2)) / U)) elif l <= 950.0: tmp = U + (math.cos((K / 2.0)) * (J * (l * 2.0))) elif l <= 8.5e+130: tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U))) else: tmp = t_1 return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))) t_1 = Float64(Float64(l * 0.3333333333333333) * Float64(cos(Float64(K * 0.5)) * Float64(J * Float64(l * l)))) t_2 = Float64(Float64(l * l) * t_0) tmp = 0.0 if (l <= -1.02e+132) tmp = t_1; elseif (l <= -8.6e+51) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(Float64(l * Float64(2.0 + Float64(l * Float64(l * t_0)))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))) / U))); elseif (l <= -125000000000.0) tmp = Float64(U * Float64(1.0 + Float64(Float64(Float64(Float64(J * l) * Float64(4.0 - Float64(Float64(l * l) * Float64(t_0 * t_2)))) / Float64(2.0 - t_2)) / U))); elseif (l <= 950.0) tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * 2.0)))); elseif (l <= 8.5e+130) tmp = Float64(U * Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968)))))))) * Float64(l / U)))); else tmp = t_1; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))); t_1 = (l * 0.3333333333333333) * (cos((K * 0.5)) * (J * (l * l))); t_2 = (l * l) * t_0; tmp = 0.0; if (l <= -1.02e+132) tmp = t_1; elseif (l <= -8.6e+51) tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U)); elseif (l <= -125000000000.0) tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_2)))) / (2.0 - t_2)) / U)); elseif (l <= 950.0) tmp = U + (cos((K / 2.0)) * (J * (l * 2.0))); elseif (l <= 8.5e+130) tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U))); else tmp = t_1; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(l * 0.3333333333333333), $MachinePrecision] * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[l, -1.02e+132], t$95$1, If[LessEqual[l, -8.6e+51], N[(U * N[(1.0 + N[(N[(J * N[(N[(l * N[(2.0 + N[(l * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -125000000000.0], N[(U * N[(1.0 + N[(N[(N[(N[(J * l), $MachinePrecision] * N[(4.0 - N[(N[(l * l), $MachinePrecision] * N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 - t$95$2), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 950.0], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 8.5e+130], N[(U * N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\\
t_1 := \left(\ell \cdot 0.3333333333333333\right) \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right)\\
t_2 := \left(\ell \cdot \ell\right) \cdot t\_0\\
\mathbf{if}\;\ell \leq -1.02 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\ell \leq -8.6 \cdot 10^{+51}:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(\left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot t\_0\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)}{U}\right)\\
\mathbf{elif}\;\ell \leq -125000000000:\\
\;\;\;\;U \cdot \left(1 + \frac{\frac{\left(J \cdot \ell\right) \cdot \left(4 - \left(\ell \cdot \ell\right) \cdot \left(t\_0 \cdot t\_2\right)\right)}{2 - t\_2}}{U}\right)\\
\mathbf{elif}\;\ell \leq 950:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\mathbf{elif}\;\ell \leq 8.5 \cdot 10^{+130}:\\
\;\;\;\;U \cdot \left(J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot \frac{\ell}{U}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if l < -1.0200000000000001e132 or 8.49999999999999965e130 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified96.2%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
Simplified96.2%
if -1.0200000000000001e132 < l < -8.5999999999999994e51Initial 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
*-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 U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6482.4%
Simplified82.4%
if -8.5999999999999994e51 < l < -1.25e11Initial 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.1%
Simplified36.1%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified59.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified43.9%
Applied egg-rr75.4%
if -1.25e11 < l < 950Initial program 68.4%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6498.2%
Simplified98.2%
if 950 < l < 8.49999999999999965e130Initial 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.5%
Simplified90.5%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified96.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified80.1%
Taylor expanded in J around inf
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.3%
Final simplification93.8%
(FPCore (J l K U)
:precision binary64
(*
U
(+
1.0
(/
(*
J
(*
(cos (* K 0.5))
(*
l
(+
2.0
(*
l
(*
l
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968)))))))))))
U))))
double code(double J, double l, double K, double U) {
return U * (1.0 + ((J * (cos((K * 0.5)) * (l * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))))) / 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 * (1.0d0 + ((j * (cos((k * 0.5d0)) * (l * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))))) / u))
end function
public static double code(double J, double l, double K, double U) {
return U * (1.0 + ((J * (Math.cos((K * 0.5)) * (l * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))))) / U));
}
def code(J, l, K, U): return U * (1.0 + ((J * (math.cos((K * 0.5)) * (l * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))))) / U))
function code(J, l, K, U) return Float64(U * Float64(1.0 + Float64(Float64(J * Float64(cos(Float64(K * 0.5)) * Float64(l * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))))) / U))) end
function tmp = code(J, l, K, U) tmp = U * (1.0 + ((J * (cos((K * 0.5)) * (l * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))))) / U)); end
code[J_, l_, K_, U_] := N[(U * N[(1.0 + N[(N[(J * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(l * N[(2.0 + N[(l * N[(l * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U \cdot \left(1 + \frac{J \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \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)\right)}{U}\right)
\end{array}
Initial program 84.4%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.1%
Simplified95.1%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.4%
Final simplification95.4%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 1e-98)
(*
U
(+
1.0
(/
(*
l
(*
J
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968)))))))))
U)))
(+
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) <= 1e-98) {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U));
} 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) <= 1d-98) then
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))) / u))
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) <= 1e-98) {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U));
} 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) <= 1e-98: tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U)) 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) <= 1e-98) tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))) / U))); 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 * 0.016666666666666666))))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((K / 2.0) <= 1e-98) tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U)); 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], 1e-98], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $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 * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 10^{-98}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\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 0.016666666666666666\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 9.99999999999999939e-99Initial program 85.3%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.3%
Simplified95.3%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified79.5%
if 9.99999999999999939e-99 < (/.f64 K #s(literal 2 binary64)) Initial program 82.4%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.3%
Simplified93.3%
Final simplification83.4%
(FPCore (J l K U)
:precision binary64
(+
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) {
return U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
}
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 + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
end function
public static double code(double J, double l, double K, double U) {
return U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
}
def code(J, l, K, U): return U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))
function code(J, l, K, U) return 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) * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) end
function tmp = code(J, l, K, U) tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); end
code[J_, l_, K_, U_] := 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] * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
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 \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)
\end{array}
Initial program 84.4%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.1%
Simplified95.1%
Final simplification95.1%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(+
0.3333333333333333
(*
l
(* l (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))
(t_1 (* (* l l) t_0)))
(if (<= l -8.6e+51)
(*
U
(+
1.0
(/
(* J (* (* l (+ 2.0 (* l (* l t_0)))) (+ 1.0 (* -0.125 (* K K)))))
U)))
(if (<= l -125000000000.0)
(*
U
(+
1.0
(/ (/ (* (* J l) (- 4.0 (* (* l l) (* t_0 t_1)))) (- 2.0 t_1)) U)))
(if (<= l 950.0)
(+ U (* (cos (/ K 2.0)) (* J (* l 2.0))))
(*
U
(*
J
(*
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* l (* l 0.0003968253968253968))))))))
(/ l U)))))))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))));
double t_1 = (l * l) * t_0;
double tmp;
if (l <= -8.6e+51) {
tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U));
} else if (l <= -125000000000.0) {
tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_1)))) / (2.0 - t_1)) / U));
} else if (l <= 950.0) {
tmp = U + (cos((K / 2.0)) * (J * (l * 2.0)));
} else {
tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))
t_1 = (l * l) * t_0
if (l <= (-8.6d+51)) then
tmp = u * (1.0d0 + ((j * ((l * (2.0d0 + (l * (l * t_0)))) * (1.0d0 + ((-0.125d0) * (k * k))))) / u))
else if (l <= (-125000000000.0d0)) then
tmp = u * (1.0d0 + ((((j * l) * (4.0d0 - ((l * l) * (t_0 * t_1)))) / (2.0d0 - t_1)) / u))
else if (l <= 950.0d0) then
tmp = u + (cos((k / 2.0d0)) * (j * (l * 2.0d0)))
else
tmp = u * (j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0)))))))) * (l / u)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))));
double t_1 = (l * l) * t_0;
double tmp;
if (l <= -8.6e+51) {
tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U));
} else if (l <= -125000000000.0) {
tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_1)))) / (2.0 - t_1)) / U));
} else if (l <= 950.0) {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * 2.0)));
} else {
tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U)));
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))) t_1 = (l * l) * t_0 tmp = 0 if l <= -8.6e+51: tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U)) elif l <= -125000000000.0: tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_1)))) / (2.0 - t_1)) / U)) elif l <= 950.0: tmp = U + (math.cos((K / 2.0)) * (J * (l * 2.0))) else: tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U))) return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))) t_1 = Float64(Float64(l * l) * t_0) tmp = 0.0 if (l <= -8.6e+51) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(Float64(l * Float64(2.0 + Float64(l * Float64(l * t_0)))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))) / U))); elseif (l <= -125000000000.0) tmp = Float64(U * Float64(1.0 + Float64(Float64(Float64(Float64(J * l) * Float64(4.0 - Float64(Float64(l * l) * Float64(t_0 * t_1)))) / Float64(2.0 - t_1)) / U))); elseif (l <= 950.0) tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * 2.0)))); else tmp = Float64(U * Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968)))))))) * Float64(l / U)))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))); t_1 = (l * l) * t_0; tmp = 0.0; if (l <= -8.6e+51) tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U)); elseif (l <= -125000000000.0) tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_1)))) / (2.0 - t_1)) / U)); elseif (l <= 950.0) tmp = U + (cos((K / 2.0)) * (J * (l * 2.0))); else tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[l, -8.6e+51], N[(U * N[(1.0 + N[(N[(J * N[(N[(l * N[(2.0 + N[(l * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -125000000000.0], N[(U * N[(1.0 + N[(N[(N[(N[(J * l), $MachinePrecision] * N[(4.0 - N[(N[(l * l), $MachinePrecision] * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 - t$95$1), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 950.0], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\\
t_1 := \left(\ell \cdot \ell\right) \cdot t\_0\\
\mathbf{if}\;\ell \leq -8.6 \cdot 10^{+51}:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(\left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot t\_0\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)}{U}\right)\\
\mathbf{elif}\;\ell \leq -125000000000:\\
\;\;\;\;U \cdot \left(1 + \frac{\frac{\left(J \cdot \ell\right) \cdot \left(4 - \left(\ell \cdot \ell\right) \cdot \left(t\_0 \cdot t\_1\right)\right)}{2 - t\_1}}{U}\right)\\
\mathbf{elif}\;\ell \leq 950:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot \frac{\ell}{U}\right)\right)\\
\end{array}
\end{array}
if l < -8.5999999999999994e51Initial 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
*-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 U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.6%
Simplified78.6%
if -8.5999999999999994e51 < l < -1.25e11Initial 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.1%
Simplified36.1%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified59.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified43.9%
Applied egg-rr75.4%
if -1.25e11 < l < 950Initial program 68.4%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6498.2%
Simplified98.2%
if 950 < 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.4%
Simplified95.4%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified98.4%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified79.1%
Taylor expanded in J around inf
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.6%
Final simplification88.6%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(+
0.3333333333333333
(*
l
(* l (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))
(t_1 (* (* l l) t_0)))
(if (<= l -8.6e+51)
(*
U
(+
1.0
(/
(* J (* (* l (+ 2.0 (* l (* l t_0)))) (+ 1.0 (* -0.125 (* K K)))))
U)))
(if (<= l -125000000000.0)
(*
U
(+
1.0
(/ (/ (* (* J l) (- 4.0 (* (* l l) (* t_0 t_1)))) (- 2.0 t_1)) U)))
(if (<= l 950.0)
(+ U (* l (* (cos (* K 0.5)) (* J 2.0))))
(*
U
(*
J
(*
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* l (* l 0.0003968253968253968))))))))
(/ l U)))))))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))));
double t_1 = (l * l) * t_0;
double tmp;
if (l <= -8.6e+51) {
tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U));
} else if (l <= -125000000000.0) {
tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_1)))) / (2.0 - t_1)) / U));
} else if (l <= 950.0) {
tmp = U + (l * (cos((K * 0.5)) * (J * 2.0)));
} else {
tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))
t_1 = (l * l) * t_0
if (l <= (-8.6d+51)) then
tmp = u * (1.0d0 + ((j * ((l * (2.0d0 + (l * (l * t_0)))) * (1.0d0 + ((-0.125d0) * (k * k))))) / u))
else if (l <= (-125000000000.0d0)) then
tmp = u * (1.0d0 + ((((j * l) * (4.0d0 - ((l * l) * (t_0 * t_1)))) / (2.0d0 - t_1)) / u))
else if (l <= 950.0d0) then
tmp = u + (l * (cos((k * 0.5d0)) * (j * 2.0d0)))
else
tmp = u * (j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0)))))))) * (l / u)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))));
double t_1 = (l * l) * t_0;
double tmp;
if (l <= -8.6e+51) {
tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U));
} else if (l <= -125000000000.0) {
tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_1)))) / (2.0 - t_1)) / U));
} else if (l <= 950.0) {
tmp = U + (l * (Math.cos((K * 0.5)) * (J * 2.0)));
} else {
tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U)));
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))) t_1 = (l * l) * t_0 tmp = 0 if l <= -8.6e+51: tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U)) elif l <= -125000000000.0: tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_1)))) / (2.0 - t_1)) / U)) elif l <= 950.0: tmp = U + (l * (math.cos((K * 0.5)) * (J * 2.0))) else: tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U))) return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))) t_1 = Float64(Float64(l * l) * t_0) tmp = 0.0 if (l <= -8.6e+51) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(Float64(l * Float64(2.0 + Float64(l * Float64(l * t_0)))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))) / U))); elseif (l <= -125000000000.0) tmp = Float64(U * Float64(1.0 + Float64(Float64(Float64(Float64(J * l) * Float64(4.0 - Float64(Float64(l * l) * Float64(t_0 * t_1)))) / Float64(2.0 - t_1)) / U))); elseif (l <= 950.0) tmp = Float64(U + Float64(l * Float64(cos(Float64(K * 0.5)) * Float64(J * 2.0)))); else tmp = Float64(U * Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968)))))))) * Float64(l / U)))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))); t_1 = (l * l) * t_0; tmp = 0.0; if (l <= -8.6e+51) tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U)); elseif (l <= -125000000000.0) tmp = U * (1.0 + ((((J * l) * (4.0 - ((l * l) * (t_0 * t_1)))) / (2.0 - t_1)) / U)); elseif (l <= 950.0) tmp = U + (l * (cos((K * 0.5)) * (J * 2.0))); else tmp = U * (J * ((2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))) * (l / U))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[l, -8.6e+51], N[(U * N[(1.0 + N[(N[(J * N[(N[(l * N[(2.0 + N[(l * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -125000000000.0], N[(U * N[(1.0 + N[(N[(N[(N[(J * l), $MachinePrecision] * N[(4.0 - N[(N[(l * l), $MachinePrecision] * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 - t$95$1), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 950.0], N[(U + N[(l * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\\
t_1 := \left(\ell \cdot \ell\right) \cdot t\_0\\
\mathbf{if}\;\ell \leq -8.6 \cdot 10^{+51}:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(\left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot t\_0\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)}{U}\right)\\
\mathbf{elif}\;\ell \leq -125000000000:\\
\;\;\;\;U \cdot \left(1 + \frac{\frac{\left(J \cdot \ell\right) \cdot \left(4 - \left(\ell \cdot \ell\right) \cdot \left(t\_0 \cdot t\_1\right)\right)}{2 - t\_1}}{U}\right)\\
\mathbf{elif}\;\ell \leq 950:\\
\;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right) \cdot \frac{\ell}{U}\right)\right)\\
\end{array}
\end{array}
if l < -8.5999999999999994e51Initial 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
*-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 U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.6%
Simplified78.6%
if -8.5999999999999994e51 < l < -1.25e11Initial 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.1%
Simplified36.1%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified59.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified43.9%
Applied egg-rr75.4%
if -1.25e11 < l < 950Initial program 68.4%
*-commutativeN/A
sinh-undefN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6498.2%
Simplified98.2%
if 950 < 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.4%
Simplified95.4%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified98.4%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified79.1%
Taylor expanded in J around inf
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.6%
Final simplification88.6%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(+
0.3333333333333333
(*
l
(* l (+ 0.016666666666666666 (* (* l l) 0.0003968253968253968)))))))
(if (<= l -1.5e+72)
(*
U
(+
1.0
(/
(* J (* (* l (+ 2.0 (* l (* l t_0)))) (+ 1.0 (* -0.125 (* K K)))))
U)))
(* U (+ 1.0 (/ (* l (* J (+ 2.0 (* (* l l) t_0)))) U))))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))));
double tmp;
if (l <= -1.5e+72) {
tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * t_0)))) / U));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = 0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))
if (l <= (-1.5d+72)) then
tmp = u * (1.0d0 + ((j * ((l * (2.0d0 + (l * (l * t_0)))) * (1.0d0 + ((-0.125d0) * (k * k))))) / u))
else
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + ((l * l) * t_0)))) / u))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))));
double tmp;
if (l <= -1.5e+72) {
tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * t_0)))) / U));
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))) tmp = 0 if l <= -1.5e+72: tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U)) else: tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * t_0)))) / U)) return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))) tmp = 0.0 if (l <= -1.5e+72) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(Float64(l * Float64(2.0 + Float64(l * Float64(l * t_0)))) * Float64(1.0 + Float64(-0.125 * Float64(K * K))))) / U))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * t_0)))) / U))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))); tmp = 0.0; if (l <= -1.5e+72) tmp = U * (1.0 + ((J * ((l * (2.0 + (l * (l * t_0)))) * (1.0 + (-0.125 * (K * K))))) / U)); else tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * t_0)))) / U)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.5e+72], N[(U * N[(1.0 + N[(N[(J * N[(N[(l * N[(2.0 + N[(l * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\\
\mathbf{if}\;\ell \leq -1.5 \cdot 10^{+72}:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(\left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot t\_0\right)\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot t\_0\right)\right)}{U}\right)\\
\end{array}
\end{array}
if l < -1.50000000000000001e72Initial 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
*-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 U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.6%
Simplified79.6%
if -1.50000000000000001e72 < l Initial program 80.3%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.8%
Simplified93.8%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified94.2%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified78.2%
Final simplification78.5%
(FPCore (J l K U)
:precision binary64
(if (<= l -2e+171)
(*
(* l (* l l))
(+ (* J 0.3333333333333333) (* (* J (* K K)) -0.041666666666666664)))
(*
U
(+
1.0
(/
(*
l
(*
J
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968)))))))))
U)))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -2e+171) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= (-2d+171)) then
tmp = (l * (l * l)) * ((j * 0.3333333333333333d0) + ((j * (k * k)) * (-0.041666666666666664d0)))
else
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))) / u))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -2e+171) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -2e+171: tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)) else: tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U)) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -2e+171) tmp = Float64(Float64(l * Float64(l * l)) * Float64(Float64(J * 0.3333333333333333) + Float64(Float64(J * Float64(K * K)) * -0.041666666666666664))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))) / U))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -2e+171) tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)); else tmp = U * (1.0 + ((l * (J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) / U)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -2e+171], N[(N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(J * 0.3333333333333333), $MachinePrecision] + N[(N[(J * N[(K * K), $MachinePrecision]), $MachinePrecision] * -0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2 \cdot 10^{+171}:\\
\;\;\;\;\left(\ell \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(J \cdot 0.3333333333333333 + \left(J \cdot \left(K \cdot K\right)\right) \cdot -0.041666666666666664\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\end{array}
\end{array}
if l < -1.99999999999999991e171Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified100.0%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
Simplified0.0%
Taylor expanded in l around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.0%
Simplified76.0%
if -1.99999999999999991e171 < l Initial 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.6%
Simplified94.6%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified94.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified78.3%
(FPCore (J l K U)
:precision binary64
(if (<= l -5e+169)
(*
(* l (* l l))
(+ (* J 0.3333333333333333) (* (* J (* K K)) -0.041666666666666664)))
(*
U
(+
1.0
(*
(*
J
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))
(/ l U))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -5e+169) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else {
tmp = U * (1.0 + ((J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))) * (l / U)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= (-5d+169)) then
tmp = (l * (l * l)) * ((j * 0.3333333333333333d0) + ((j * (k * k)) * (-0.041666666666666664d0)))
else
tmp = u * (1.0d0 + ((j * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))) * (l / u)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -5e+169) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else {
tmp = U * (1.0 + ((J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))) * (l / U)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -5e+169: tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)) else: tmp = U * (1.0 + ((J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))) * (l / U))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -5e+169) tmp = Float64(Float64(l * Float64(l * l)) * Float64(Float64(J * 0.3333333333333333) + Float64(Float64(J * Float64(K * K)) * -0.041666666666666664))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))) * Float64(l / U)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -5e+169) tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)); else tmp = U * (1.0 + ((J * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))) * (l / U))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -5e+169], N[(N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(J * 0.3333333333333333), $MachinePrecision] + N[(N[(J * N[(K * K), $MachinePrecision]), $MachinePrecision] * -0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(J * 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] * N[(l / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{+169}:\\
\;\;\;\;\left(\ell \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(J \cdot 0.3333333333333333 + \left(J \cdot \left(K \cdot K\right)\right) \cdot -0.041666666666666664\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \left(J \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) \cdot \frac{\ell}{U}\right)\\
\end{array}
\end{array}
if l < -5.00000000000000017e169Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified100.0%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
Simplified0.0%
Taylor expanded in l around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.0%
Simplified76.0%
if -5.00000000000000017e169 < l Initial 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.6%
Simplified94.6%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified94.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified78.3%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr78.3%
Final simplification78.0%
(FPCore (J l K U)
:precision binary64
(if (<= l -8.4e+71)
(*
(* l (* l l))
(+ (* J 0.3333333333333333) (* (* J (* K K)) -0.041666666666666664)))
(if (<= l 1.9e+14)
(* U (+ 1.0 (/ (* l (* J (+ 2.0 (* 0.3333333333333333 (* l l))))) U)))
(*
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 (l <= -8.4e+71) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else if (l <= 1.9e+14) {
tmp = U * (1.0 + ((l * (J * (2.0 + (0.3333333333333333 * (l * l))))) / U));
} else {
tmp = 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 (l <= (-8.4d+71)) then
tmp = (l * (l * l)) * ((j * 0.3333333333333333d0) + ((j * (k * k)) * (-0.041666666666666664d0)))
else if (l <= 1.9d+14) then
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (0.3333333333333333d0 * (l * l))))) / u))
else
tmp = 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 (l <= -8.4e+71) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else if (l <= 1.9e+14) {
tmp = U * (1.0 + ((l * (J * (2.0 + (0.3333333333333333 * (l * l))))) / U));
} else {
tmp = 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 l <= -8.4e+71: tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)) elif l <= 1.9e+14: tmp = U * (1.0 + ((l * (J * (2.0 + (0.3333333333333333 * (l * l))))) / U)) else: tmp = 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 (l <= -8.4e+71) tmp = Float64(Float64(l * Float64(l * l)) * Float64(Float64(J * 0.3333333333333333) + Float64(Float64(J * Float64(K * K)) * -0.041666666666666664))); elseif (l <= 1.9e+14) tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(0.3333333333333333 * Float64(l * l))))) / U))); else tmp = Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(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 <= -8.4e+71) tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)); elseif (l <= 1.9e+14) tmp = U * (1.0 + ((l * (J * (2.0 + (0.3333333333333333 * (l * l))))) / U)); else tmp = 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[l, -8.4e+71], N[(N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(J * 0.3333333333333333), $MachinePrecision] + N[(N[(J * N[(K * K), $MachinePrecision]), $MachinePrecision] * -0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.9e+14], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(0.3333333333333333 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $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[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -8.4 \cdot 10^{+71}:\\
\;\;\;\;\left(\ell \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(J \cdot 0.3333333333333333 + \left(J \cdot \left(K \cdot K\right)\right) \cdot -0.041666666666666664\right)\\
\mathbf{elif}\;\ell \leq 1.9 \cdot 10^{+14}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < -8.39999999999999957e71Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified82.7%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
Simplified6.3%
Taylor expanded in l around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.1%
Simplified76.1%
if -8.39999999999999957e71 < l < 1.9e14Initial program 72.3%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.9%
Simplified91.9%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified92.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified77.7%
Taylor expanded in l around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.7%
Simplified75.7%
if 1.9e14 < 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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.3%
Simplified98.3%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified98.3%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified79.4%
Taylor expanded in U around 0
*-lowering-*.f64N/A
*-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
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6479.4%
Simplified79.4%
(FPCore (J l K U)
:precision binary64
(if (<= l -4e+177)
(*
(* l (* l l))
(+ (* J 0.3333333333333333) (* (* J (* K K)) -0.041666666666666664)))
(+
U
(*
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 (l <= -4e+177) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else {
tmp = U + (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 (l <= (-4d+177)) then
tmp = (l * (l * l)) * ((j * 0.3333333333333333d0) + ((j * (k * k)) * (-0.041666666666666664d0)))
else
tmp = u + (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 (l <= -4e+177) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else {
tmp = U + (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 l <= -4e+177: tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)) else: tmp = U + (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 (l <= -4e+177) tmp = Float64(Float64(l * Float64(l * l)) * Float64(Float64(J * 0.3333333333333333) + Float64(Float64(J * Float64(K * K)) * -0.041666666666666664))); else tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(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 (l <= -4e+177) tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)); else tmp = U + (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[l, -4e+177], N[(N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(J * 0.3333333333333333), $MachinePrecision] + N[(N[(J * N[(K * K), $MachinePrecision]), $MachinePrecision] * -0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(J * N[(l * N[(2.0 + N[(l * N[(l * 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}\;\ell \leq -4 \cdot 10^{+177}:\\
\;\;\;\;\left(\ell \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(J \cdot 0.3333333333333333 + \left(J \cdot \left(K \cdot K\right)\right) \cdot -0.041666666666666664\right)\\
\mathbf{else}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \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 l < -4e177Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified100.0%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
Simplified0.0%
Taylor expanded in l around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.3%
Simplified78.3%
if -4e177 < l Initial program 82.9%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.6%
Simplified94.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
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6477.0%
Simplified77.0%
Final simplification77.1%
(FPCore (J l K U)
:precision binary64
(if (<= l -1.18e+72)
(*
(* l (* l l))
(+ (* J 0.3333333333333333) (* (* J (* K K)) -0.041666666666666664)))
(+
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 <= -1.18e+72) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} 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 <= (-1.18d+72)) then
tmp = (l * (l * l)) * ((j * 0.3333333333333333d0) + ((j * (k * k)) * (-0.041666666666666664d0)))
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 <= -1.18e+72) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} 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 <= -1.18e+72: tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)) 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 <= -1.18e+72) tmp = Float64(Float64(l * Float64(l * l)) * Float64(Float64(J * 0.3333333333333333) + Float64(Float64(J * Float64(K * K)) * -0.041666666666666664))); else tmp = Float64(U + Float64(Float64(J * l) * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * 0.016666666666666666)))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -1.18e+72) tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)); 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, -1.18e+72], N[(N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(J * 0.3333333333333333), $MachinePrecision] + N[(N[(J * N[(K * K), $MachinePrecision]), $MachinePrecision] * -0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * l), $MachinePrecision] * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(l * N[(l * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.18 \cdot 10^{+72}:\\
\;\;\;\;\left(\ell \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(J \cdot 0.3333333333333333 + \left(J \cdot \left(K \cdot K\right)\right) \cdot -0.041666666666666664\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \ell\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot 0.016666666666666666\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < -1.18e72Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified82.7%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
Simplified6.3%
Taylor expanded in l around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.1%
Simplified76.1%
if -1.18e72 < l Initial program 80.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.4%
Simplified91.4%
Taylor expanded in K around 0
associate-*r*N/A
*-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
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6474.1%
Simplified74.1%
Final simplification74.5%
(FPCore (J l K U)
:precision binary64
(if (<= l -7.4e+43)
(*
J
(*
(+ 1.0 (* -0.125 (* K K)))
(* l (+ 2.0 (* 0.3333333333333333 (* l l))))))
(+ U (* J (* l (+ 2.0 (* l (* l 0.3333333333333333))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -7.4e+43) {
tmp = J * ((1.0 + (-0.125 * (K * K))) * (l * (2.0 + (0.3333333333333333 * (l * l)))));
} else {
tmp = U + (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 (l <= (-7.4d+43)) then
tmp = j * ((1.0d0 + ((-0.125d0) * (k * k))) * (l * (2.0d0 + (0.3333333333333333d0 * (l * l)))))
else
tmp = u + (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 (l <= -7.4e+43) {
tmp = J * ((1.0 + (-0.125 * (K * K))) * (l * (2.0 + (0.3333333333333333 * (l * l)))));
} else {
tmp = U + (J * (l * (2.0 + (l * (l * 0.3333333333333333)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -7.4e+43: tmp = J * ((1.0 + (-0.125 * (K * K))) * (l * (2.0 + (0.3333333333333333 * (l * l))))) else: tmp = U + (J * (l * (2.0 + (l * (l * 0.3333333333333333))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -7.4e+43) tmp = Float64(J * Float64(Float64(1.0 + Float64(-0.125 * Float64(K * K))) * Float64(l * Float64(2.0 + Float64(0.3333333333333333 * Float64(l * l)))))); else tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -7.4e+43) tmp = J * ((1.0 + (-0.125 * (K * K))) * (l * (2.0 + (0.3333333333333333 * (l * l))))); else tmp = U + (J * (l * (2.0 + (l * (l * 0.3333333333333333))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -7.4e+43], N[(J * N[(N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(0.3333333333333333 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(J * N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -7.4 \cdot 10^{+43}:\\
\;\;\;\;J \cdot \left(\left(1 + -0.125 \cdot \left(K \cdot K\right)\right) \cdot \left(\ell \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if l < -7.4000000000000002e43Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified77.3%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
Simplified6.1%
Taylor expanded in J around inf
*-lowering-*.f64N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.6%
Simplified72.6%
if -7.4000000000000002e43 < l Initial program 79.9%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified84.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.1%
Simplified70.1%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.6%
Applied egg-rr71.6%
Final simplification71.8%
(FPCore (J l K U)
:precision binary64
(if (<= l -4.6e+71)
(*
(* l (* l l))
(+ (* J 0.3333333333333333) (* (* J (* K K)) -0.041666666666666664)))
(* U (+ 1.0 (/ (* l (* J (+ 2.0 (* 0.3333333333333333 (* l l))))) U)))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -4.6e+71) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + (0.3333333333333333 * (l * l))))) / U));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= (-4.6d+71)) then
tmp = (l * (l * l)) * ((j * 0.3333333333333333d0) + ((j * (k * k)) * (-0.041666666666666664d0)))
else
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (0.3333333333333333d0 * (l * l))))) / u))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -4.6e+71) {
tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664));
} else {
tmp = U * (1.0 + ((l * (J * (2.0 + (0.3333333333333333 * (l * l))))) / U));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -4.6e+71: tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)) else: tmp = U * (1.0 + ((l * (J * (2.0 + (0.3333333333333333 * (l * l))))) / U)) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -4.6e+71) tmp = Float64(Float64(l * Float64(l * l)) * Float64(Float64(J * 0.3333333333333333) + Float64(Float64(J * Float64(K * K)) * -0.041666666666666664))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(0.3333333333333333 * Float64(l * l))))) / U))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -4.6e+71) tmp = (l * (l * l)) * ((J * 0.3333333333333333) + ((J * (K * K)) * -0.041666666666666664)); else tmp = U * (1.0 + ((l * (J * (2.0 + (0.3333333333333333 * (l * l))))) / U)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -4.6e+71], N[(N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(J * 0.3333333333333333), $MachinePrecision] + N[(N[(J * N[(K * K), $MachinePrecision]), $MachinePrecision] * -0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(0.3333333333333333 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4.6 \cdot 10^{+71}:\\
\;\;\;\;\left(\ell \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(J \cdot 0.3333333333333333 + \left(J \cdot \left(K \cdot K\right)\right) \cdot -0.041666666666666664\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)}{U}\right)\\
\end{array}
\end{array}
if l < -4.6000000000000005e71Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified82.7%
Taylor expanded in K around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
Simplified6.3%
Taylor expanded in l around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.1%
Simplified76.1%
if -4.6000000000000005e71 < l Initial program 80.3%
Taylor expanded in l around 0
*-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
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.8%
Simplified93.8%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified94.2%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified78.2%
Taylor expanded in l around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.5%
Simplified70.5%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* 0.3333333333333333 (* J (* l (* l l)))))) (if (<= l -5000.0) t_0 (if (<= l 980.0) (+ U (* l (* J 2.0))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 * (J * (l * (l * l)));
double tmp;
if (l <= -5000.0) {
tmp = t_0;
} else if (l <= 980.0) {
tmp = U + (l * (J * 2.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = 0.3333333333333333d0 * (j * (l * (l * l)))
if (l <= (-5000.0d0)) then
tmp = t_0
else if (l <= 980.0d0) then
tmp = u + (l * (j * 2.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 * (J * (l * (l * l)));
double tmp;
if (l <= -5000.0) {
tmp = t_0;
} else if (l <= 980.0) {
tmp = U + (l * (J * 2.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 * (J * (l * (l * l))) tmp = 0 if l <= -5000.0: tmp = t_0 elif l <= 980.0: tmp = U + (l * (J * 2.0)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 * Float64(J * Float64(l * Float64(l * l)))) tmp = 0.0 if (l <= -5000.0) tmp = t_0; elseif (l <= 980.0) tmp = Float64(U + Float64(l * Float64(J * 2.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 * (J * (l * (l * l))); tmp = 0.0; if (l <= -5000.0) tmp = t_0; elseif (l <= 980.0) tmp = U + (l * (J * 2.0)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(J * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -5000.0], t$95$0, If[LessEqual[l, 980.0], N[(U + N[(l * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\mathbf{if}\;\ell \leq -5000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 980:\\
\;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -5e3 or 980 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified67.3%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.6%
Simplified49.6%
Taylor expanded in l around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6455.5%
Simplified55.5%
Taylor expanded in l around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.5%
Simplified55.5%
if -5e3 < l < 980Initial program 67.9%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified99.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.0%
Simplified83.0%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6483.0%
Simplified83.0%
Final simplification68.8%
(FPCore (J l K U) :precision binary64 (if (<= l -740000.0) (* 0.3333333333333333 (* J (* l (* l l)))) (+ U (* l (* J (+ 2.0 (* 0.3333333333333333 (* l l))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -740000.0) {
tmp = 0.3333333333333333 * (J * (l * (l * l)));
} else {
tmp = U + (l * (J * (2.0 + (0.3333333333333333 * (l * l)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= (-740000.0d0)) then
tmp = 0.3333333333333333d0 * (j * (l * (l * l)))
else
tmp = u + (l * (j * (2.0d0 + (0.3333333333333333d0 * (l * l)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -740000.0) {
tmp = 0.3333333333333333 * (J * (l * (l * l)));
} else {
tmp = U + (l * (J * (2.0 + (0.3333333333333333 * (l * l)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -740000.0: tmp = 0.3333333333333333 * (J * (l * (l * l))) else: tmp = U + (l * (J * (2.0 + (0.3333333333333333 * (l * l))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -740000.0) tmp = Float64(0.3333333333333333 * Float64(J * Float64(l * Float64(l * l)))); else tmp = Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(0.3333333333333333 * Float64(l * l)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -740000.0) tmp = 0.3333333333333333 * (J * (l * (l * l))); else tmp = U + (l * (J * (2.0 + (0.3333333333333333 * (l * l))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -740000.0], N[(0.3333333333333333 * N[(J * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(J * N[(2.0 + N[(0.3333333333333333 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -740000:\\
\;\;\;\;0.3333333333333333 \cdot \left(J \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(J \cdot \left(2 + 0.3333333333333333 \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\end{array}
\end{array}
if l < -7.4e5Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified66.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6444.3%
Simplified44.3%
Taylor expanded in l around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6450.9%
Simplified50.9%
Taylor expanded in l around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.9%
Simplified50.9%
if -7.4e5 < l Initial program 78.6%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified89.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.9%
Simplified73.9%
Final simplification67.6%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* 2.0 (* J l)))) (if (<= l -34000.0) t_0 (if (<= l 2900.0) U t_0))))
double code(double J, double l, double K, double U) {
double t_0 = 2.0 * (J * l);
double tmp;
if (l <= -34000.0) {
tmp = t_0;
} else if (l <= 2900.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 = 2.0d0 * (j * l)
if (l <= (-34000.0d0)) then
tmp = t_0
else if (l <= 2900.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 = 2.0 * (J * l);
double tmp;
if (l <= -34000.0) {
tmp = t_0;
} else if (l <= 2900.0) {
tmp = U;
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 2.0 * (J * l) tmp = 0 if l <= -34000.0: tmp = t_0 elif l <= 2900.0: tmp = U else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(2.0 * Float64(J * l)) tmp = 0.0 if (l <= -34000.0) tmp = t_0; elseif (l <= 2900.0) tmp = U; else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 2.0 * (J * l); tmp = 0.0; if (l <= -34000.0) tmp = t_0; elseif (l <= 2900.0) tmp = U; else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(2.0 * N[(J * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -34000.0], t$95$0, If[LessEqual[l, 2900.0], U, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(J \cdot \ell\right)\\
\mathbf{if}\;\ell \leq -34000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 2900:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -34000 or 2900 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified67.3%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.6%
Simplified49.6%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6417.2%
Simplified17.2%
Taylor expanded in l around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.2%
Simplified17.2%
if -34000 < l < 2900Initial program 67.9%
Taylor expanded in J around 0
Simplified66.6%
Final simplification41.1%
(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(l * Float64(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[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)
\end{array}
Initial program 84.4%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified83.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.8%
Simplified65.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6468.7%
Applied egg-rr68.7%
Final simplification68.7%
(FPCore (J l K U) :precision binary64 (+ U (* l (* J 2.0))))
double code(double J, double l, double K, double U) {
return U + (l * (J * 2.0));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + (l * (j * 2.0d0))
end function
public static double code(double J, double l, double K, double U) {
return U + (l * (J * 2.0));
}
def code(J, l, K, U): return U + (l * (J * 2.0))
function code(J, l, K, U) return Float64(U + Float64(l * Float64(J * 2.0))) end
function tmp = code(J, l, K, U) tmp = U + (l * (J * 2.0)); end
code[J_, l_, K_, U_] := N[(U + N[(l * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \ell \cdot \left(J \cdot 2\right)
\end{array}
Initial program 84.4%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified83.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.8%
Simplified65.8%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6449.0%
Simplified49.0%
Final simplification49.0%
(FPCore (J l K U) :precision binary64 U)
double code(double J, double l, double K, double U) {
return U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u
end function
public static double code(double J, double l, double K, double U) {
return U;
}
def code(J, l, K, U): return U
function code(J, l, K, U) return U end
function tmp = code(J, l, K, U) tmp = U; end
code[J_, l_, K_, U_] := U
\begin{array}{l}
\\
U
\end{array}
Initial program 84.4%
Taylor expanded in J around 0
Simplified33.4%
herbie shell --seed 2024162
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))