
(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 31 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 (fma (* J (cos (/ K 2.0))) (* 2.0 (sinh l)) U))
double code(double J, double l, double K, double U) {
return fma((J * cos((K / 2.0))), (2.0 * sinh(l)), U);
}
function code(J, l, K, U) return fma(Float64(J * cos(Float64(K / 2.0))), Float64(2.0 * sinh(l)), U) end
code[J_, l_, K_, U_] := N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(J \cdot \cos \left(\frac{K}{2}\right), 2 \cdot \sinh \ell, U\right)
\end{array}
Initial program 89.3%
associate-*l*N/A
*-commutativeN/A
sub-negN/A
neg-mul-1N/A
exp-negN/A
div-invN/A
associate-*l*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr100.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 0.9975)
(+ 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.9975) {
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.9975d0) 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.9975) {
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.9975: 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.9975) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)))))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * 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 return tmp end
function tmp_2 = code(J, l, K, U) t_0 = cos((K / 2.0)); tmp = 0.0; if (t_0 <= 0.9975) 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.9975], N[(U + N[(t$95$0 * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq 0.9975:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.99750000000000005Initial program 86.5%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.4%
Simplified87.4%
if 0.99750000000000005 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 92.2%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6492.2%
Simplified92.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.9%
Simplified93.9%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified94.6%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified94.6%
Final simplification91.0%
(FPCore (J l K U)
:precision binary64
(if (<= (cos (/ K 2.0)) 0.14)
(+ 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.14) {
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.14d0) 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.14) {
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.14: 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.14) tmp = Float64(U + Float64(l * Float64(cos(Float64(K * 0.5)) * Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)))))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * 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 return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (cos((K / 2.0)) <= 0.14) 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.14], N[(U + N[(l * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq 0.14:\\
\;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.14000000000000001Initial program 87.5%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified83.5%
if 0.14000000000000001 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 90.1%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6490.1%
Simplified90.1%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.6%
Simplified94.6%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified92.0%
Final simplification89.3%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.005)
(+ U (* (* J t_0) (* 2.0 l)))
(*
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.005) {
tmp = U + ((J * t_0) * (2.0 * l));
} 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.005d0)) then
tmp = u + ((j * t_0) * (2.0d0 * l))
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.005) {
tmp = U + ((J * t_0) * (2.0 * l));
} 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.005: tmp = U + ((J * t_0) * (2.0 * l)) 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.005) tmp = Float64(U + Float64(Float64(J * t_0) * Float64(2.0 * l))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * 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 return tmp end
function tmp_2 = code(J, l, K, U) t_0 = cos((K / 2.0)); tmp = 0.0; if (t_0 <= -0.005) tmp = U + ((J * t_0) * (2.0 * l)); 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.005], N[(U + N[(N[(J * t$95$0), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.005:\\
\;\;\;\;U + \left(J \cdot t\_0\right) \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0050000000000000001Initial program 87.9%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6487.9%
Simplified87.9%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6463.1%
Simplified63.1%
if -0.0050000000000000001 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 89.9%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6489.9%
Simplified89.9%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.7%
Simplified94.7%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.2%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified91.7%
Final simplification83.3%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.005)
(+ U (* t_0 (* J (* 2.0 l))))
(*
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.005) {
tmp = U + (t_0 * (J * (2.0 * l)));
} 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.005d0)) then
tmp = u + (t_0 * (j * (2.0d0 * l)))
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.005) {
tmp = U + (t_0 * (J * (2.0 * l)));
} 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.005: tmp = U + (t_0 * (J * (2.0 * l))) 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.005) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(2.0 * l)))); else tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * 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 return tmp end
function tmp_2 = code(J, l, K, U) t_0 = cos((K / 2.0)); tmp = 0.0; if (t_0 <= -0.005) tmp = U + (t_0 * (J * (2.0 * l))); 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.005], N[(U + N[(t$95$0 * N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.005:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(2 \cdot \ell\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0050000000000000001Initial program 87.9%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6463.0%
Simplified63.0%
if -0.0050000000000000001 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 89.9%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6489.9%
Simplified89.9%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.7%
Simplified94.7%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.2%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified91.7%
Final simplification83.3%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 1e-30)
(fma J (* 2.0 (sinh l)) U)
(+
U
(*
(* J (cos (/ K 2.0)))
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 1e-30) {
tmp = fma(J, (2.0 * sinh(l)), U);
} else {
tmp = U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
}
return tmp;
}
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 1e-30) tmp = fma(J, Float64(2.0 * sinh(l)), U); else tmp = Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))); end return tmp end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 1e-30], N[(J * N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision], N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 10^{-30}:\\
\;\;\;\;\mathsf{fma}\left(J, 2 \cdot \sinh \ell, U\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 1e-30Initial program 91.1%
associate-*l*N/A
*-commutativeN/A
sub-negN/A
neg-mul-1N/A
exp-negN/A
div-invN/A
associate-*l*N/A
fma-defineN/A
fma-lowering-fma.f64N/A
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified87.0%
if 1e-30 < (/.f64 K #s(literal 2 binary64)) Initial program 84.7%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6484.7%
Simplified84.7%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.0%
Simplified96.0%
Final simplification89.5%
(FPCore (J l K U) :precision binary64 (+ U (* (cos (/ K 2.0)) (* (sinh l) (* J 2.0)))))
double code(double J, double l, double K, double U) {
return U + (cos((K / 2.0)) * (sinh(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 + (cos((k / 2.0d0)) * (sinh(l) * (j * 2.0d0)))
end function
public static double code(double J, double l, double K, double U) {
return U + (Math.cos((K / 2.0)) * (Math.sinh(l) * (J * 2.0)));
}
def code(J, l, K, U): return U + (math.cos((K / 2.0)) * (math.sinh(l) * (J * 2.0)))
function code(J, l, K, U) return Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(sinh(l) * Float64(J * 2.0)))) end
function tmp = code(J, l, K, U) tmp = U + (cos((K / 2.0)) * (sinh(l) * (J * 2.0))); end
code[J_, l_, K_, U_] := N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sinh[l], $MachinePrecision] * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \cos \left(\frac{K}{2}\right) \cdot \left(\sinh \ell \cdot \left(J \cdot 2\right)\right)
\end{array}
Initial program 89.3%
sinh-undefN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(*
J
(*
(* l (cos (* K 0.5)))
(+
2.0
(*
l
(*
l
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))))
(if (<= l -6.6e+66)
t_0
(if (<= l -0.0078)
(*
U
(+
1.0
(/
(*
l
(*
J
(+
2.0
(*
l
(*
l
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968))))))))))
U)))
(if (<= l 1250.0) (+ U (* (* J (cos (/ K 2.0))) (* 2.0 l))) t_0)))))
double code(double J, double l, double K, double U) {
double t_0 = J * ((l * cos((K * 0.5))) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
double tmp;
if (l <= -6.6e+66) {
tmp = t_0;
} else if (l <= -0.0078) {
tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
} else if (l <= 1250.0) {
tmp = U + ((J * cos((K / 2.0))) * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * ((l * cos((k * 0.5d0))) * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
if (l <= (-6.6d+66)) then
tmp = t_0
else if (l <= (-0.0078d0)) then
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
else if (l <= 1250.0d0) then
tmp = u + ((j * cos((k / 2.0d0))) * (2.0d0 * l))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = J * ((l * Math.cos((K * 0.5))) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
double tmp;
if (l <= -6.6e+66) {
tmp = t_0;
} else if (l <= -0.0078) {
tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
} else if (l <= 1250.0) {
tmp = U + ((J * Math.cos((K / 2.0))) * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * ((l * math.cos((K * 0.5))) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) tmp = 0 if l <= -6.6e+66: tmp = t_0 elif l <= -0.0078: tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U)) elif l <= 1250.0: tmp = U + ((J * math.cos((K / 2.0))) * (2.0 * l)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(Float64(l * cos(Float64(K * 0.5))) * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))) tmp = 0.0 if (l <= -6.6e+66) tmp = t_0; elseif (l <= -0.0078) tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U))); elseif (l <= 1250.0) tmp = Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(2.0 * l))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * ((l * cos((K * 0.5))) * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); tmp = 0.0; if (l <= -6.6e+66) tmp = t_0; elseif (l <= -0.0078) tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U)); elseif (l <= 1250.0) tmp = U + ((J * cos((K / 2.0))) * (2.0 * l)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(N[(l * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -6.6e+66], t$95$0, If[LessEqual[l, -0.0078], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1250.0], N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\
\mathbf{if}\;\ell \leq -6.6 \cdot 10^{+66}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq -0.0078:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\mathbf{elif}\;\ell \leq 1250:\\
\;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -6.6000000000000003e66 or 1250 < l Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.1%
Simplified94.1%
Taylor expanded in J around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.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-*.f6494.2%
Simplified94.2%
if -6.6000000000000003e66 < l < -0.0077999999999999996Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.6%
Simplified64.6%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified76.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified63.1%
if -0.0077999999999999996 < l < 1250Initial program 77.9%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6477.9%
Simplified77.9%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
Final simplification95.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* (* (cos (* K 0.5)) (* J (* l l))) (* l 0.3333333333333333))))
(if (<= l -2.3e+131)
t_0
(if (<= l -0.14)
(*
U
(+
1.0
(/
(*
l
(*
J
(+
2.0
(*
l
(*
l
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968))))))))))
U)))
(if (<= l 950.0)
(+ U (* (* J (cos (/ K 2.0))) (* 2.0 l)))
(if (<= l 3.6e+149)
(*
J
(*
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
(* l (+ 1.0 (* -0.125 (* K K))))))
t_0))))))
double code(double J, double l, double K, double U) {
double t_0 = (cos((K * 0.5)) * (J * (l * l))) * (l * 0.3333333333333333);
double tmp;
if (l <= -2.3e+131) {
tmp = t_0;
} else if (l <= -0.14) {
tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
} else if (l <= 950.0) {
tmp = U + ((J * cos((K / 2.0))) * (2.0 * l));
} else if (l <= 3.6e+149) {
tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
} 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 = (cos((k * 0.5d0)) * (j * (l * l))) * (l * 0.3333333333333333d0)
if (l <= (-2.3d+131)) then
tmp = t_0
else if (l <= (-0.14d0)) then
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
else if (l <= 950.0d0) then
tmp = u + ((j * cos((k / 2.0d0))) * (2.0d0 * l))
else if (l <= 3.6d+149) then
tmp = j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
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 = (Math.cos((K * 0.5)) * (J * (l * l))) * (l * 0.3333333333333333);
double tmp;
if (l <= -2.3e+131) {
tmp = t_0;
} else if (l <= -0.14) {
tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
} else if (l <= 950.0) {
tmp = U + ((J * Math.cos((K / 2.0))) * (2.0 * l));
} else if (l <= 3.6e+149) {
tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = (math.cos((K * 0.5)) * (J * (l * l))) * (l * 0.3333333333333333) tmp = 0 if l <= -2.3e+131: tmp = t_0 elif l <= -0.14: tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U)) elif l <= 950.0: tmp = U + ((J * math.cos((K / 2.0))) * (2.0 * l)) elif l <= 3.6e+149: tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K))))) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(Float64(cos(Float64(K * 0.5)) * Float64(J * Float64(l * l))) * Float64(l * 0.3333333333333333)) tmp = 0.0 if (l <= -2.3e+131) tmp = t_0; elseif (l <= -0.14) tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U))); elseif (l <= 950.0) tmp = Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(2.0 * l))); elseif (l <= 3.6e+149) tmp = Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = (cos((K * 0.5)) * (J * (l * l))) * (l * 0.3333333333333333); tmp = 0.0; if (l <= -2.3e+131) tmp = t_0; elseif (l <= -0.14) tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U)); elseif (l <= 950.0) tmp = U + ((J * cos((K / 2.0))) * (2.0 * l)); elseif (l <= 3.6e+149) tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K))))); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2.3e+131], t$95$0, If[LessEqual[l, -0.14], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 950.0], N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.6e+149], N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot \left(\ell \cdot 0.3333333333333333\right)\\
\mathbf{if}\;\ell \leq -2.3 \cdot 10^{+131}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq -0.14:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\mathbf{elif}\;\ell \leq 950:\\
\;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(2 \cdot \ell\right)\\
\mathbf{elif}\;\ell \leq 3.6 \cdot 10^{+149}:\\
\;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -2.29999999999999992e131 or 3.59999999999999995e149 < l Initial program 100.0%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified98.8%
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
*-lowering-*.f6498.8%
Simplified98.8%
if -2.29999999999999992e131 < l < -0.14000000000000001Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.5%
Simplified80.5%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified86.7%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified69.3%
if -0.14000000000000001 < l < 950Initial program 77.9%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6477.9%
Simplified77.9%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
if 950 < l < 3.59999999999999995e149Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.8%
Simplified74.8%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.4%
Simplified67.4%
Taylor expanded in J around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.4%
Simplified67.4%
Final simplification92.7%
(FPCore (J l K U)
:precision binary64
(if (<= l -950.0)
(*
(* l (cos (* K 0.5)))
(*
J
(+
2.0
(*
l
(*
l
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
(+
U
(*
(* J (cos (/ K 2.0)))
(*
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 <= -950.0) {
tmp = (l * cos((K * 0.5))) * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + ((J * cos((K / 2.0))) * (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 <= (-950.0d0)) then
tmp = (l * cos((k * 0.5d0))) * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
else
tmp = u + ((j * cos((k / 2.0d0))) * (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 <= -950.0) {
tmp = (l * Math.cos((K * 0.5))) * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + ((J * Math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -950.0: tmp = (l * math.cos((K * 0.5))) * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) else: tmp = U + ((J * math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -950.0) tmp = Float64(Float64(l * cos(Float64(K * 0.5))) * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))); else tmp = Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -950.0) tmp = (l * cos((K * 0.5))) * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); else tmp = U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -950.0], N[(N[(l * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(J * 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], N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -950:\\
\;\;\;\;\left(\ell \cdot \cos \left(K \cdot 0.5\right)\right) \cdot \left(J \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)\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if l < -950Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.4%
Simplified91.4%
Taylor expanded in J around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Simplified88.5%
if -950 < l Initial program 85.6%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6485.6%
Simplified85.6%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.4%
Simplified96.4%
Final simplification94.3%
(FPCore (J l K U)
:precision binary64
(+
U
(*
(* J (cos (/ K 2.0)))
(*
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 + ((J * cos((K / 2.0))) * (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 + ((j * cos((k / 2.0d0))) * (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 + ((J * Math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
}
def code(J, l, K, U): return U + ((J * math.cos((K / 2.0))) * (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(Float64(J * cos(Float64(K / 2.0))) * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) end
function tmp = code(J, l, K, U) tmp = U + ((J * cos((K / 2.0))) * (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[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)
\end{array}
Initial program 89.3%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6489.3%
Simplified89.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.5%
Simplified95.5%
Final simplification95.5%
(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(l * Float64(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[(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}
\\
U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)
\end{array}
Initial program 89.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.5%
Simplified95.5%
Final simplification95.5%
(FPCore (J l K U)
:precision binary64
(+
U
(*
(* J (cos (/ K 2.0)))
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
double code(double J, double l, double K, double U) {
return U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + ((j * cos((k / 2.0d0))) * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
end function
public static double code(double J, double l, double K, double U) {
return U + ((J * Math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
}
def code(J, l, K, U): return U + ((J * math.cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))
function code(J, l, K, U) return Float64(U + Float64(Float64(J * cos(Float64(K / 2.0))) * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))) end
function tmp = code(J, l, K, U) tmp = U + ((J * cos((K / 2.0))) * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); end
code[J_, l_, K_, U_] := N[(U + N[(N[(J * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \left(J \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)
\end{array}
Initial program 89.3%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6489.3%
Simplified89.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.5%
Simplified92.5%
Final simplification92.5%
(FPCore (J l K U)
:precision binary64
(+
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) {
return U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))))
end function
public static double code(double J, double l, double K, double U) {
return U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
}
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)))))))
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) * 0.016666666666666666)))))))) 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))))))); 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] * 0.016666666666666666), $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 0.016666666666666666\right)\right)\right)\right)
\end{array}
Initial program 89.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.5%
Simplified92.5%
Final simplification92.5%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* 2.0 (* (cos (* K 0.5)) (* J l)))))
(if (<= J -6e+205)
t_0
(if (<= J 6e+258)
(*
U
(+
1.0
(/
(*
l
(*
J
(+
2.0
(*
l
(*
l
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968))))))))))
U)))
t_0))))
double code(double J, double l, double K, double U) {
double t_0 = 2.0 * (cos((K * 0.5)) * (J * l));
double tmp;
if (J <= -6e+205) {
tmp = t_0;
} else if (J <= 6e+258) {
tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / 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 * (cos((k * 0.5d0)) * (j * l))
if (j <= (-6d+205)) then
tmp = t_0
else if (j <= 6d+258) then
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / 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 * (Math.cos((K * 0.5)) * (J * l));
double tmp;
if (J <= -6e+205) {
tmp = t_0;
} else if (J <= 6e+258) {
tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 2.0 * (math.cos((K * 0.5)) * (J * l)) tmp = 0 if J <= -6e+205: tmp = t_0 elif J <= 6e+258: tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(2.0 * Float64(cos(Float64(K * 0.5)) * Float64(J * l))) tmp = 0.0 if (J <= -6e+205) tmp = t_0; elseif (J <= 6e+258) tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 2.0 * (cos((K * 0.5)) * (J * l)); tmp = 0.0; if (J <= -6e+205) tmp = t_0; elseif (J <= 6e+258) tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(2.0 * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(J * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[J, -6e+205], t$95$0, If[LessEqual[J, 6e+258], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(J \cdot \ell\right)\right)\\
\mathbf{if}\;J \leq -6 \cdot 10^{+205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;J \leq 6 \cdot 10^{+258}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if J < -5.9999999999999999e205 or 5.9999999999999999e258 < J Initial program 61.3%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified99.9%
Taylor expanded in J around inf
associate-*r*N/A
associate-*r*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
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.2%
Simplified87.2%
Taylor expanded in l around 0
Simplified87.2%
if -5.9999999999999999e205 < J < 5.9999999999999999e258Initial program 93.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6493.0%
Simplified93.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.9%
Simplified94.9%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified95.7%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified79.0%
Final simplification80.0%
(FPCore (J l K U)
:precision binary64
(if (<= l 3.8e+47)
(*
U
(+
1.0
(/
(*
l
(*
J
(+
2.0
(*
l
(*
l
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968))))))))))
U)))
(*
J
(*
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
(* l (+ 1.0 (* -0.125 (* K K))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 3.8e+47) {
tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
} else {
tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 3.8d+47) then
tmp = u * (1.0d0 + ((l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))) / u))
else
tmp = j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 3.8e+47) {
tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U));
} else {
tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 3.8e+47: tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U)) else: tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 3.8e+47) tmp = Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))) / U))); else tmp = Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 3.8e+47) tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) / U)); else tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 3.8e+47], N[(U * N[(1.0 + N[(N[(l * N[(J * 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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.8 \cdot 10^{+47}:\\
\;\;\;\;U \cdot \left(1 + \frac{\ell \cdot \left(J \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)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 3.8000000000000003e47Initial program 86.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6486.0%
Simplified86.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.1%
Simplified94.1%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified93.6%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified78.7%
if 3.8000000000000003e47 < l Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.3%
Simplified98.3%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Taylor expanded in J around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Final simplification77.8%
(FPCore (J l K U)
:precision binary64
(if (<= l 2.65e+50)
(+
U
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
(*
J
(*
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
(* l (+ 1.0 (* -0.125 (* K K))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2.65e+50) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 2.65d+50) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
else
tmp = j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2.65e+50) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 2.65e+50: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) else: tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 2.65e+50) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968)))))))))); else tmp = Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 2.65e+50) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); else tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 2.65e+50], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.65 \cdot 10^{+50}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 2.6500000000000001e50Initial program 86.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6486.0%
Simplified86.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.1%
Simplified94.1%
Taylor expanded in K around 0
Simplified77.9%
if 2.6500000000000001e50 < l Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.3%
Simplified98.3%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Taylor expanded in J around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Final simplification77.2%
(FPCore (J l K U)
:precision binary64
(if (<= l 1.8e+44)
(+
U
(*
l
(*
J
(+
2.0
(*
l
(*
l
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968)))))))))))
(*
J
(*
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
(* l (+ 1.0 (* -0.125 (* K K))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 1.8e+44) {
tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
} else {
tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 1.8d+44) then
tmp = u + (l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))))
else
tmp = j * ((2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 1.8e+44) {
tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
} else {
tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 1.8e+44: tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) else: tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 1.8e+44) tmp = Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))))); else tmp = Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 1.8e+44) tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))); else tmp = J * ((2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (l * (1.0 + (-0.125 * (K * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 1.8e+44], N[(U + N[(l * N[(J * 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], N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.8 \cdot 10^{+44}:\\
\;\;\;\;U + \ell \cdot \left(J \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)\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 1.8e44Initial program 86.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6486.0%
Simplified86.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.1%
Simplified94.1%
Taylor expanded in K around 0
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Simplified77.4%
if 1.8e44 < l Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.3%
Simplified98.3%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Taylor expanded in J around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Final simplification76.8%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))
(if (<= l 1820.0)
(+ U (* J (* l t_0)))
(* J (* t_0 (* l (+ 1.0 (* -0.125 (* K K)))))))))
double code(double J, double l, double K, double U) {
double t_0 = 2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)));
double tmp;
if (l <= 1820.0) {
tmp = U + (J * (l * t_0));
} else {
tmp = J * (t_0 * (l * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))
if (l <= 1820.0d0) then
tmp = u + (j * (l * t_0))
else
tmp = j * (t_0 * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = 2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)));
double tmp;
if (l <= 1820.0) {
tmp = U + (J * (l * t_0));
} else {
tmp = J * (t_0 * (l * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
def code(J, l, K, U): t_0 = 2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))) tmp = 0 if l <= 1820.0: tmp = U + (J * (l * t_0)) else: tmp = J * (t_0 * (l * (1.0 + (-0.125 * (K * K))))) return tmp
function code(J, l, K, U) t_0 = Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) tmp = 0.0 if (l <= 1820.0) tmp = Float64(U + Float64(J * Float64(l * t_0))); else tmp = Float64(J * Float64(t_0 * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K)))))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))); tmp = 0.0; if (l <= 1820.0) tmp = U + (J * (l * t_0)); else tmp = J * (t_0 * (l * (1.0 + (-0.125 * (K * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 1820.0], N[(U + N[(J * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(t$95$0 * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\\
\mathbf{if}\;\ell \leq 1820:\\
\;\;\;\;U + J \cdot \left(\ell \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(t\_0 \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 1820Initial program 85.6%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6485.6%
Simplified85.6%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.5%
Simplified93.5%
Taylor expanded in K around 0
Simplified78.2%
if 1820 < l Initial program 100.0%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.7%
Simplified89.7%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.5%
Simplified68.5%
Taylor expanded in J around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.5%
Simplified68.5%
Final simplification75.7%
(FPCore (J l K U)
:precision binary64
(let* ((t_0
(*
(* J (+ 1.0 (* K (* K -0.125))))
(* l (+ 2.0 (* l (* l 0.3333333333333333)))))))
(if (<= l -1350.0) t_0 (if (<= l 800.0) (+ U (* l (* J 2.0))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = (J * (1.0 + (K * (K * -0.125)))) * (l * (2.0 + (l * (l * 0.3333333333333333))));
double tmp;
if (l <= -1350.0) {
tmp = t_0;
} else if (l <= 800.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 = (j * (1.0d0 + (k * (k * (-0.125d0))))) * (l * (2.0d0 + (l * (l * 0.3333333333333333d0))))
if (l <= (-1350.0d0)) then
tmp = t_0
else if (l <= 800.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 = (J * (1.0 + (K * (K * -0.125)))) * (l * (2.0 + (l * (l * 0.3333333333333333))));
double tmp;
if (l <= -1350.0) {
tmp = t_0;
} else if (l <= 800.0) {
tmp = U + (l * (J * 2.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = (J * (1.0 + (K * (K * -0.125)))) * (l * (2.0 + (l * (l * 0.3333333333333333)))) tmp = 0 if l <= -1350.0: tmp = t_0 elif l <= 800.0: tmp = U + (l * (J * 2.0)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(Float64(J * Float64(1.0 + Float64(K * Float64(K * -0.125)))) * Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))) tmp = 0.0 if (l <= -1350.0) tmp = t_0; elseif (l <= 800.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 = (J * (1.0 + (K * (K * -0.125)))) * (l * (2.0 + (l * (l * 0.3333333333333333)))); tmp = 0.0; if (l <= -1350.0) tmp = t_0; elseif (l <= 800.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[(N[(J * N[(1.0 + N[(K * N[(K * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1350.0], t$95$0, If[LessEqual[l, 800.0], N[(U + N[(l * N[(J * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(J \cdot \left(1 + K \cdot \left(K \cdot -0.125\right)\right)\right) \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\
\mathbf{if}\;\ell \leq -1350:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 800:\\
\;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -1350 or 800 < l Initial program 100.0%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified69.0%
Taylor expanded in J around inf
associate-*r*N/A
associate-*r*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
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6469.1%
Simplified69.1%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.0%
Simplified57.0%
associate-*r*N/A
+-commutativeN/A
distribute-rgt1-inN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Applied egg-rr60.5%
if -1350 < l < 800Initial program 77.9%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified99.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.4%
Simplified86.4%
Taylor expanded in l around 0
Simplified86.4%
Final simplification73.1%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* J (* l (* l l))))))
(if (<= l -1.1e+62)
t_0
(if (<= l 13800.0)
(* U (+ 1.0 (/ (* J (* 2.0 l)) U)))
(if (<= l 7.5e+89)
(* J (* 2.0 (* l (+ 1.0 (* -0.125 (* K K))))))
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 <= -1.1e+62) {
tmp = t_0;
} else if (l <= 13800.0) {
tmp = U * (1.0 + ((J * (2.0 * l)) / U));
} else if (l <= 7.5e+89) {
tmp = J * (2.0 * (l * (1.0 + (-0.125 * (K * K)))));
} 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 <= (-1.1d+62)) then
tmp = t_0
else if (l <= 13800.0d0) then
tmp = u * (1.0d0 + ((j * (2.0d0 * l)) / u))
else if (l <= 7.5d+89) then
tmp = j * (2.0d0 * (l * (1.0d0 + ((-0.125d0) * (k * k)))))
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 <= -1.1e+62) {
tmp = t_0;
} else if (l <= 13800.0) {
tmp = U * (1.0 + ((J * (2.0 * l)) / U));
} else if (l <= 7.5e+89) {
tmp = J * (2.0 * (l * (1.0 + (-0.125 * (K * K)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 * (J * (l * (l * l))) tmp = 0 if l <= -1.1e+62: tmp = t_0 elif l <= 13800.0: tmp = U * (1.0 + ((J * (2.0 * l)) / U)) elif l <= 7.5e+89: tmp = J * (2.0 * (l * (1.0 + (-0.125 * (K * K))))) 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 <= -1.1e+62) tmp = t_0; elseif (l <= 13800.0) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(2.0 * l)) / U))); elseif (l <= 7.5e+89) tmp = Float64(J * Float64(2.0 * Float64(l * Float64(1.0 + Float64(-0.125 * Float64(K * K)))))); 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 <= -1.1e+62) tmp = t_0; elseif (l <= 13800.0) tmp = U * (1.0 + ((J * (2.0 * l)) / U)); elseif (l <= 7.5e+89) tmp = J * (2.0 * (l * (1.0 + (-0.125 * (K * K))))); 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, -1.1e+62], t$95$0, If[LessEqual[l, 13800.0], N[(U * N[(1.0 + N[(N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 7.5e+89], N[(J * N[(2.0 * N[(l * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -1.1 \cdot 10^{+62}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 13800:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)\\
\mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+89}:\\
\;\;\;\;J \cdot \left(2 \cdot \left(\ell \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -1.10000000000000007e62 or 7.49999999999999947e89 < l Initial program 100.0%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified86.2%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.4%
Simplified64.4%
Taylor expanded in l around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.8%
Simplified69.8%
if -1.10000000000000007e62 < l < 13800Initial program 80.3%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified89.6%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.5%
Simplified77.5%
Taylor expanded in l around 0
Simplified77.4%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6477.9%
Simplified77.9%
if 13800 < l < 7.49999999999999947e89Initial program 100.0%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified17.1%
Taylor expanded in J around inf
associate-*r*N/A
associate-*r*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
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6417.8%
Simplified17.8%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.2%
Simplified42.2%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.4%
Simplified35.4%
Final simplification72.2%
(FPCore (J l K U)
:precision binary64
(if (<= U 4.8e+196)
(+
U
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
(+
U
(*
l
(*
(* J (+ 2.0 (* (* l l) 0.3333333333333333)))
(+ 1.0 (* -0.125 (* K K))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (U <= 4.8e+196) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (u <= 4.8d+196) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
else
tmp = u + (l * ((j * (2.0d0 + ((l * l) * 0.3333333333333333d0))) * (1.0d0 + ((-0.125d0) * (k * k)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (U <= 4.8e+196) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if U <= 4.8e+196: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) else: tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (U <= 4.8e+196) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))); else tmp = Float64(U + Float64(l * Float64(Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))) * Float64(1.0 + Float64(-0.125 * Float64(K * K)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (U <= 4.8e+196) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); else tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * (1.0 + (-0.125 * (K * K))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[U, 4.8e+196], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 4.8 \cdot 10^{+196}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \cdot \left(1 + -0.125 \cdot \left(K \cdot K\right)\right)\right)\\
\end{array}
\end{array}
if U < 4.8000000000000001e196Initial program 88.3%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6488.3%
Simplified88.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.8%
Simplified91.8%
Taylor expanded in K around 0
Simplified74.8%
if 4.8000000000000001e196 < U Initial program 100.0%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified91.3%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.0%
Simplified81.0%
Final simplification75.3%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* J (* l (* l l))))))
(if (<= l -5e+63)
t_0
(if (<= l 1.68e+16) (* U (+ 1.0 (/ (* J (* 2.0 l)) U))) 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 <= -5e+63) {
tmp = t_0;
} else if (l <= 1.68e+16) {
tmp = U * (1.0 + ((J * (2.0 * l)) / 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 = 0.3333333333333333d0 * (j * (l * (l * l)))
if (l <= (-5d+63)) then
tmp = t_0
else if (l <= 1.68d+16) then
tmp = u * (1.0d0 + ((j * (2.0d0 * l)) / 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 = 0.3333333333333333 * (J * (l * (l * l)));
double tmp;
if (l <= -5e+63) {
tmp = t_0;
} else if (l <= 1.68e+16) {
tmp = U * (1.0 + ((J * (2.0 * l)) / U));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 * (J * (l * (l * l))) tmp = 0 if l <= -5e+63: tmp = t_0 elif l <= 1.68e+16: tmp = U * (1.0 + ((J * (2.0 * l)) / U)) 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 <= -5e+63) tmp = t_0; elseif (l <= 1.68e+16) tmp = Float64(U * Float64(1.0 + Float64(Float64(J * Float64(2.0 * l)) / U))); 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 <= -5e+63) tmp = t_0; elseif (l <= 1.68e+16) tmp = U * (1.0 + ((J * (2.0 * l)) / U)); 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, -5e+63], t$95$0, If[LessEqual[l, 1.68e+16], N[(U * N[(1.0 + N[(N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] / U), $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 -5 \cdot 10^{+63}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 1.68 \cdot 10^{+16}:\\
\;\;\;\;U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -5.00000000000000011e63 or 1.68e16 < l Initial program 100.0%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified78.7%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.2%
Simplified58.2%
Taylor expanded in l around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.0%
Simplified63.0%
if -5.00000000000000011e63 < l < 1.68e16Initial program 80.6%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified88.3%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6476.4%
Simplified76.4%
Taylor expanded in l around 0
Simplified76.3%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.8%
Simplified76.8%
Final simplification70.6%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* 0.3333333333333333 (* J (* l (* l l)))))) (if (<= l -880000.0) t_0 (if (<= l 3.9e+14) (+ 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 <= -880000.0) {
tmp = t_0;
} else if (l <= 3.9e+14) {
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 <= (-880000.0d0)) then
tmp = t_0
else if (l <= 3.9d+14) 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 <= -880000.0) {
tmp = t_0;
} else if (l <= 3.9e+14) {
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 <= -880000.0: tmp = t_0 elif l <= 3.9e+14: 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 <= -880000.0) tmp = t_0; elseif (l <= 3.9e+14) 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 <= -880000.0) tmp = t_0; elseif (l <= 3.9e+14) 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, -880000.0], t$95$0, If[LessEqual[l, 3.9e+14], 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 -880000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+14}:\\
\;\;\;\;U + \ell \cdot \left(J \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -8.8e5 or 3.9e14 < l Initial program 100.0%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified70.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.9%
Simplified51.9%
Taylor expanded in l around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.1%
Simplified56.1%
if -8.8e5 < l < 3.9e14Initial program 78.3%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified98.3%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.1%
Simplified85.1%
Taylor expanded in l around 0
Simplified85.1%
Final simplification70.4%
(FPCore (J l K U)
:precision binary64
(+
U
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
double code(double J, double l, double K, double U) {
return U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
end function
public static double code(double J, double l, double K, double U) {
return U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
}
def code(J, l, K, U): return U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))
function code(J, l, K, U) return Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))) end
function tmp = code(J, l, K, U) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); end
code[J_, l_, K_, U_] := N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)
\end{array}
Initial program 89.3%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6489.3%
Simplified89.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.5%
Simplified92.5%
Taylor expanded in K around 0
Simplified73.7%
Final simplification73.7%
(FPCore (J l K U)
:precision binary64
(+
U
(*
l
(*
J
(+
2.0
(* l (* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))))
double code(double J, double l, double K, double U) {
return U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + (l * (j * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))))
end function
public static double code(double J, double l, double K, double U) {
return U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))));
}
def code(J, l, K, U): return U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))))
function code(J, l, K, U) return Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))))) end
function tmp = code(J, l, K, U) tmp = U + (l * (J * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))); end
code[J_, l_, K_, U_] := N[(U + N[(l * N[(J * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)
\end{array}
Initial program 89.3%
+-lowering-+.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f6489.3%
Simplified89.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.5%
Simplified92.5%
Taylor expanded in K around 0
*-commutativeN/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-*.f6472.6%
Simplified72.6%
Final simplification72.6%
(FPCore (J l K U) :precision binary64 (* U (+ 1.0 (/ (* l (* J (+ 2.0 (* l (* l 0.3333333333333333))))) U))))
double code(double J, double l, double K, double U) {
return U * (1.0 + ((l * (J * (2.0 + (l * (l * 0.3333333333333333))))) / 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 + ((l * (j * (2.0d0 + (l * (l * 0.3333333333333333d0))))) / u))
end function
public static double code(double J, double l, double K, double U) {
return U * (1.0 + ((l * (J * (2.0 + (l * (l * 0.3333333333333333))))) / U));
}
def code(J, l, K, U): return U * (1.0 + ((l * (J * (2.0 + (l * (l * 0.3333333333333333))))) / U))
function code(J, l, K, U) return Float64(U * Float64(1.0 + Float64(Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))) / U))) end
function tmp = code(J, l, K, U) tmp = U * (1.0 + ((l * (J * (2.0 + (l * (l * 0.3333333333333333))))) / U)); end
code[J_, l_, K_, U_] := N[(U * N[(1.0 + N[(N[(l * N[(J * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U \cdot \left(1 + \frac{\ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)}{U}\right)
\end{array}
Initial program 89.3%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified84.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.2%
Simplified68.2%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6469.6%
Simplified69.6%
Final simplification69.6%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* 2.0 l)))) (if (<= l -1020.0) t_0 (if (<= l 4600000000000.0) U t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (2.0 * l);
double tmp;
if (l <= -1020.0) {
tmp = t_0;
} else if (l <= 4600000000000.0) {
tmp = U;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * (2.0d0 * l)
if (l <= (-1020.0d0)) then
tmp = t_0
else if (l <= 4600000000000.0d0) then
tmp = u
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = J * (2.0 * l);
double tmp;
if (l <= -1020.0) {
tmp = t_0;
} else if (l <= 4600000000000.0) {
tmp = U;
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (2.0 * l) tmp = 0 if l <= -1020.0: tmp = t_0 elif l <= 4600000000000.0: tmp = U else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(2.0 * l)) tmp = 0.0 if (l <= -1020.0) tmp = t_0; elseif (l <= 4600000000000.0) tmp = U; else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (2.0 * l); tmp = 0.0; if (l <= -1020.0) tmp = t_0; elseif (l <= 4600000000000.0) tmp = U; else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1020.0], t$95$0, If[LessEqual[l, 4600000000000.0], U, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(2 \cdot \ell\right)\\
\mathbf{if}\;\ell \leq -1020:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 4600000000000:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -1020 or 4.6e12 < l Initial program 100.0%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified70.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.9%
Simplified51.9%
Taylor expanded in l around 0
Simplified21.2%
Taylor expanded in l around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6420.8%
Simplified20.8%
if -1020 < l < 4.6e12Initial program 78.3%
Taylor expanded in J around 0
Simplified76.2%
Final simplification48.1%
(FPCore (J l K U) :precision binary64 (+ U (* l (* J (+ 2.0 (* l (* l 0.3333333333333333)))))))
double code(double J, double l, double K, double U) {
return U + (l * (J * (2.0 + (l * (l * 0.3333333333333333)))));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + (l * (j * (2.0d0 + (l * (l * 0.3333333333333333d0)))))
end function
public static double code(double J, double l, double K, double U) {
return U + (l * (J * (2.0 + (l * (l * 0.3333333333333333)))));
}
def code(J, l, K, U): return U + (l * (J * (2.0 + (l * (l * 0.3333333333333333)))))
function code(J, l, K, U) return Float64(U + Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333)))))) end
function tmp = code(J, l, K, U) tmp = U + (l * (J * (2.0 + (l * (l * 0.3333333333333333))))); end
code[J_, l_, K_, U_] := N[(U + N[(l * N[(J * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)
\end{array}
Initial program 89.3%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified84.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.2%
Simplified68.2%
Final simplification68.2%
(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 89.3%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified84.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.2%
Simplified68.2%
Taylor expanded in l around 0
Simplified52.6%
Final simplification52.6%
(FPCore (J l K U) :precision binary64 U)
double code(double J, double l, double K, double U) {
return U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u
end function
public static double code(double J, double l, double K, double U) {
return U;
}
def code(J, l, K, U): return U
function code(J, l, K, U) return U end
function tmp = code(J, l, K, U) tmp = U; end
code[J_, l_, K_, U_] := U
\begin{array}{l}
\\
U
\end{array}
Initial program 89.3%
Taylor expanded in J around 0
Simplified38.8%
herbie shell --seed 2024288
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))