
(FPCore (J l K U) :precision binary64 (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))
double code(double J, double l, double K, double U) {
return ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = ((j * (exp(l) - exp(-l))) * cos((k / 2.0d0))) + u
end function
public static double code(double J, double l, double K, double U) {
return ((J * (Math.exp(l) - Math.exp(-l))) * Math.cos((K / 2.0))) + U;
}
def code(J, l, K, U): return ((J * (math.exp(l) - math.exp(-l))) * math.cos((K / 2.0))) + U
function code(J, l, K, U) return Float64(Float64(Float64(J * Float64(exp(l) - exp(Float64(-l)))) * cos(Float64(K / 2.0))) + U) end
function tmp = code(J, l, K, U) tmp = ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(J * N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (J l K U) :precision binary64 (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))
double code(double J, double l, double K, double U) {
return ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = ((j * (exp(l) - exp(-l))) * cos((k / 2.0d0))) + u
end function
public static double code(double J, double l, double K, double U) {
return ((J * (Math.exp(l) - Math.exp(-l))) * Math.cos((K / 2.0))) + U;
}
def code(J, l, K, U): return ((J * (math.exp(l) - math.exp(-l))) * math.cos((K / 2.0))) + U
function code(J, l, K, U) return Float64(Float64(Float64(J * Float64(exp(l) - exp(Float64(-l)))) * cos(Float64(K / 2.0))) + U) end
function tmp = code(J, l, K, U) tmp = ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(J * N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U
\end{array}
(FPCore (J l K U) :precision binary64 (+ (* (* (cos (/ K 2.0)) (* 2.0 (sinh l))) J) U))
double code(double J, double l, double K, double U) {
return ((cos((K / 2.0)) * (2.0 * sinh(l))) * J) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = ((cos((k / 2.0d0)) * (2.0d0 * sinh(l))) * j) + u
end function
public static double code(double J, double l, double K, double U) {
return ((Math.cos((K / 2.0)) * (2.0 * Math.sinh(l))) * J) + U;
}
def code(J, l, K, U): return ((math.cos((K / 2.0)) * (2.0 * math.sinh(l))) * J) + U
function code(J, l, K, U) return Float64(Float64(Float64(cos(Float64(K / 2.0)) * Float64(2.0 * sinh(l))) * J) + U) end
function tmp = code(J, l, K, U) tmp = ((cos((K / 2.0)) * (2.0 * sinh(l))) * J) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * J), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(\cos \left(\frac{K}{2}\right) \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot J + U
\end{array}
Initial program 88.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.77)
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
(* l l)
(+ 0.016666666666666666 (* l (* l 0.0003968253968253968)))))))))
(+ (* -0.125 (* K K)) 1.0)))
(if (<= t_0 -0.05)
(+ U (* t_0 (* l (* 2.0 J))))
(+ U (* (sinh l) (/ J 0.5)))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.77) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
} else if (t_0 <= -0.05) {
tmp = U + (t_0 * (l * (2.0 * J)));
} else {
tmp = U + (sinh(l) * (J / 0.5));
}
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.77d0)) then
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0))))))))) * (((-0.125d0) * (k * k)) + 1.0d0))
else if (t_0 <= (-0.05d0)) then
tmp = u + (t_0 * (l * (2.0d0 * j)))
else
tmp = u + (sinh(l) * (j / 0.5d0))
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.77) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
} else if (t_0 <= -0.05) {
tmp = U + (t_0 * (l * (2.0 * J)));
} else {
tmp = U + (Math.sinh(l) * (J / 0.5));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.77: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0)) elif t_0 <= -0.05: tmp = U + (t_0 * (l * (2.0 * J))) else: tmp = U + (math.sinh(l) * (J / 0.5)) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.77) tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968))))))))) * Float64(Float64(-0.125 * Float64(K * K)) + 1.0))); elseif (t_0 <= -0.05) tmp = Float64(U + Float64(t_0 * Float64(l * Float64(2.0 * J)))); else tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5))); 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.77) tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0)); elseif (t_0 <= -0.05) tmp = U + (t_0 * (l * (2.0 * J))); else tmp = U + (sinh(l) * (J / 0.5)); 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.77], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, -0.05], N[(U + N[(t$95$0 * N[(l * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.77:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\\
\mathbf{elif}\;t\_0 \leq -0.05:\\
\;\;\;\;U + t\_0 \cdot \left(\ell \cdot \left(2 \cdot J\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.77000000000000002Initial program 95.9%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6497.2%
Simplified97.2%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.5%
Simplified80.5%
if -0.77000000000000002 < (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.050000000000000003Initial program 85.9%
Taylor expanded in l around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6481.9%
Simplified81.9%
if -0.050000000000000003 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 87.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified95.3%
*-lft-identityN/A
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6495.3%
Applied egg-rr95.3%
Final simplification91.2%
(FPCore (J l K U) :precision binary64 (if (<= (cos (/ K 2.0)) 0.06) (+ U (* l (* (* J (+ 2.0 (* (* l l) 0.3333333333333333))) (cos (* K 0.5))))) (+ U (* (sinh l) (/ J 0.5)))))
double code(double J, double l, double K, double U) {
double tmp;
if (cos((K / 2.0)) <= 0.06) {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * cos((K * 0.5))));
} else {
tmp = U + (sinh(l) * (J / 0.5));
}
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.06d0) then
tmp = u + (l * ((j * (2.0d0 + ((l * l) * 0.3333333333333333d0))) * cos((k * 0.5d0))))
else
tmp = u + (sinh(l) * (j / 0.5d0))
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.06) {
tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * Math.cos((K * 0.5))));
} else {
tmp = U + (Math.sinh(l) * (J / 0.5));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if math.cos((K / 2.0)) <= 0.06: tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * math.cos((K * 0.5)))) else: tmp = U + (math.sinh(l) * (J / 0.5)) return tmp
function code(J, l, K, U) tmp = 0.0 if (cos(Float64(K / 2.0)) <= 0.06) tmp = Float64(U + Float64(l * Float64(Float64(J * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))) * cos(Float64(K * 0.5))))); else tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (cos((K / 2.0)) <= 0.06) tmp = U + (l * ((J * (2.0 + ((l * l) * 0.3333333333333333))) * cos((K * 0.5)))); else tmp = U + (sinh(l) * (J / 0.5)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision], 0.06], N[(U + N[(l * N[(N[(J * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq 0.06:\\
\;\;\;\;U + \ell \cdot \left(\left(J \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right) \cdot \cos \left(K \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.059999999999999998Initial program 90.1%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified91.3%
if 0.059999999999999998 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 87.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified95.8%
*-lft-identityN/A
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6495.8%
Applied egg-rr95.8%
Final simplification94.4%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 3.2e-7)
(+ U (* (sinh l) (/ J 0.5)))
(+
U
(*
(cos (/ K 2.0))
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
(* l l)
(+ 0.016666666666666666 (* l (* l 0.0003968253968253968)))))))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 3.2e-7) {
tmp = U + (sinh(l) * (J / 0.5));
} else {
tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if ((k / 2.0d0) <= 3.2d-7) then
tmp = u + (sinh(l) * (j / 0.5d0))
else
tmp = u + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0))))))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 3.2e-7) {
tmp = U + (Math.sinh(l) * (J / 0.5));
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (K / 2.0) <= 3.2e-7: tmp = U + (math.sinh(l) * (J / 0.5)) else: tmp = U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 3.2e-7) tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5))); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968))))))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((K / 2.0) <= 3.2e-7) tmp = U + (sinh(l) * (J / 0.5)); else tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968)))))))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 3.2e-7], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 3.2 \cdot 10^{-7}:\\
\;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 3.2000000000000001e-7Initial program 89.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified86.6%
*-lft-identityN/A
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6486.6%
Applied egg-rr86.6%
if 3.2000000000000001e-7 < (/.f64 K #s(literal 2 binary64)) Initial program 84.5%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.9%
Simplified96.9%
Final simplification89.2%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 3.2e-7)
(+ U (* (sinh l) (/ J 0.5)))
(+
U
(*
(cos (/ K 2.0))
(*
J
(*
l
(+
2.0
(*
l
(* l (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 3.2e-7) {
tmp = U + (sinh(l) * (J / 0.5));
} else {
tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if ((k / 2.0d0) <= 3.2d-7) then
tmp = u + (sinh(l) * (j / 0.5d0))
else
tmp = u + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + (l * (l * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 3.2e-7) {
tmp = U + (Math.sinh(l) * (J / 0.5));
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (K / 2.0) <= 3.2e-7: tmp = U + (math.sinh(l) * (J / 0.5)) else: tmp = U + (math.cos((K / 2.0)) * (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 3.2e-7) tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5))); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((K / 2.0) <= 3.2e-7) tmp = U + (sinh(l) * (J / 0.5)); else tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + (l * (l * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 3.2e-7], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * N[(2.0 + N[(l * N[(l * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 3.2 \cdot 10^{-7}:\\
\;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 3.2000000000000001e-7Initial program 89.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified86.6%
*-lft-identityN/A
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6486.6%
Applied egg-rr86.6%
if 3.2000000000000001e-7 < (/.f64 K #s(literal 2 binary64)) Initial program 84.5%
Taylor expanded in l around 0
*-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.8%
Simplified96.8%
Final simplification89.2%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 3.2e-7)
(+ U (* (sinh l) (/ J 0.5)))
(+
U
(* (cos (/ K 2.0)) (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 3.2e-7) {
tmp = U + (sinh(l) * (J / 0.5));
} else {
tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if ((k / 2.0d0) <= 3.2d-7) then
tmp = u + (sinh(l) * (j / 0.5d0))
else
tmp = u + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 3.2e-7) {
tmp = U + (Math.sinh(l) * (J / 0.5));
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (K / 2.0) <= 3.2e-7: tmp = U + (math.sinh(l) * (J / 0.5)) else: tmp = U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * 0.3333333333333333))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 3.2e-7) tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5))); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((K / 2.0) <= 3.2e-7) tmp = U + (sinh(l) * (J / 0.5)); else tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * 0.3333333333333333))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 3.2e-7], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 3.2 \cdot 10^{-7}:\\
\;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 3.2000000000000001e-7Initial program 89.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified86.6%
*-lft-identityN/A
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6486.6%
Applied egg-rr86.6%
if 3.2000000000000001e-7 < (/.f64 K #s(literal 2 binary64)) Initial program 84.5%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.3%
Simplified89.3%
Final simplification87.3%
(FPCore (J l K U)
:precision binary64
(if (<= l -0.00083)
(+ U (* (sinh l) (/ J 0.5)))
(if (<= l 7.5e-6)
(+ U (* l (* (cos (* K 0.5)) (* 2.0 J))))
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
(* l l)
(+ 0.016666666666666666 (* l (* l 0.0003968253968253968)))))))))
(+ (* -0.125 (* K K)) 1.0))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -0.00083) {
tmp = U + (sinh(l) * (J / 0.5));
} else if (l <= 7.5e-6) {
tmp = U + (l * (cos((K * 0.5)) * (2.0 * J)));
} else {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= (-0.00083d0)) then
tmp = u + (sinh(l) * (j / 0.5d0))
else if (l <= 7.5d-6) then
tmp = u + (l * (cos((k * 0.5d0)) * (2.0d0 * j)))
else
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0))))))))) * (((-0.125d0) * (k * k)) + 1.0d0))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -0.00083) {
tmp = U + (Math.sinh(l) * (J / 0.5));
} else if (l <= 7.5e-6) {
tmp = U + (l * (Math.cos((K * 0.5)) * (2.0 * J)));
} else {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -0.00083: tmp = U + (math.sinh(l) * (J / 0.5)) elif l <= 7.5e-6: tmp = U + (l * (math.cos((K * 0.5)) * (2.0 * J))) else: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0)) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -0.00083) tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5))); elseif (l <= 7.5e-6) tmp = Float64(U + Float64(l * Float64(cos(Float64(K * 0.5)) * Float64(2.0 * J)))); else tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968))))))))) * Float64(Float64(-0.125 * Float64(K * K)) + 1.0))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -0.00083) tmp = U + (sinh(l) * (J / 0.5)); elseif (l <= 7.5e-6) tmp = U + (l * (cos((K * 0.5)) * (2.0 * J))); else tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -0.00083], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 7.5e-6], N[(U + N[(l * N[(N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision] * N[(2.0 * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -0.00083:\\
\;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
\mathbf{elif}\;\ell \leq 7.5 \cdot 10^{-6}:\\
\;\;\;\;U + \ell \cdot \left(\cos \left(K \cdot 0.5\right) \cdot \left(2 \cdot J\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\\
\end{array}
\end{array}
if l < -8.3000000000000001e-4Initial program 100.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified77.2%
*-lft-identityN/A
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6477.2%
Applied egg-rr77.2%
if -8.3000000000000001e-4 < l < 7.50000000000000019e-6Initial program 77.8%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified99.9%
Taylor expanded in l around 0
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.5%
Simplified99.5%
if 7.50000000000000019e-6 < l Initial program 99.7%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.8%
Simplified93.8%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.6%
Simplified76.6%
Final simplification88.8%
(FPCore (J l K U) :precision binary64 (if (<= l 2.5e+148) (+ U (* (sinh l) (/ J 0.5))) (* (* J 0.3333333333333333) (* (+ (* -0.125 (* K K)) 1.0) (* l (* l l))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2.5e+148) {
tmp = U + (sinh(l) * (J / 0.5));
} else {
tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 2.5d+148) then
tmp = u + (sinh(l) * (j / 0.5d0))
else
tmp = (j * 0.3333333333333333d0) * ((((-0.125d0) * (k * k)) + 1.0d0) * (l * (l * l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2.5e+148) {
tmp = U + (Math.sinh(l) * (J / 0.5));
} else {
tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 2.5e+148: tmp = U + (math.sinh(l) * (J / 0.5)) else: tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 2.5e+148) tmp = Float64(U + Float64(sinh(l) * Float64(J / 0.5))); else tmp = Float64(Float64(J * 0.3333333333333333) * Float64(Float64(Float64(-0.125 * Float64(K * K)) + 1.0) * Float64(l * Float64(l * l)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 2.5e+148) tmp = U + (sinh(l) * (J / 0.5)); else tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 2.5e+148], N[(U + N[(N[Sinh[l], $MachinePrecision] * N[(J / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(J * 0.3333333333333333), $MachinePrecision] * N[(N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.5 \cdot 10^{+148}:\\
\;\;\;\;U + \sinh \ell \cdot \frac{J}{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\end{array}
\end{array}
if l < 2.50000000000000012e148Initial program 86.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified82.6%
*-lft-identityN/A
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sinh-lowering-sinh.f6482.6%
Applied egg-rr82.6%
if 2.50000000000000012e148 < 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
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified97.2%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.2%
Simplified88.2%
Taylor expanded in l around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.2%
Simplified88.2%
Final simplification83.4%
(FPCore (J l K U)
:precision binary64
(if (<= K 3.6e+49)
(+
U
(*
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
(* l l)
(+ 0.016666666666666666 (* l (* l 0.0003968253968253968)))))))))
(+ (* -0.125 (* K K)) 1.0)))
(+
U
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (K <= 3.6e+49) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
} else {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (k <= 3.6d+49) then
tmp = u + ((j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * (0.016666666666666666d0 + (l * (l * 0.0003968253968253968d0))))))))) * (((-0.125d0) * (k * k)) + 1.0d0))
else
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (K <= 3.6e+49) {
tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0));
} else {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if K <= 3.6e+49: tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0)) else: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (K <= 3.6e+49) tmp = Float64(U + Float64(Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * Float64(0.016666666666666666 + Float64(l * Float64(l * 0.0003968253968253968))))))))) * Float64(Float64(-0.125 * Float64(K * K)) + 1.0))); else 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)))))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (K <= 3.6e+49) tmp = U + ((J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * (0.016666666666666666 + (l * (l * 0.0003968253968253968))))))))) * ((-0.125 * (K * K)) + 1.0)); else tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[K, 3.6e+49], N[(U + N[(N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * N[(0.016666666666666666 + N[(l * N[(l * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;K \leq 3.6 \cdot 10^{+49}:\\
\;\;\;\;U + \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot \left(0.016666666666666666 + \ell \cdot \left(\ell \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right) \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;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)\\
\end{array}
\end{array}
if K < 3.59999999999999996e49Initial program 88.9%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6496.6%
Simplified96.6%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.5%
Simplified72.5%
if 3.59999999999999996e49 < K Initial program 85.3%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.9%
Simplified95.9%
Taylor expanded in K around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.5%
Simplified65.5%
Final simplification71.2%
(FPCore (J l K U)
:precision binary64
(if (<= l 1.05e+60)
(+
U
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
(*
J
(*
(* l (+ (* -0.125 (* K K)) 1.0))
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 1.05e+60) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 1.05d+60) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
else
tmp = j * ((l * (((-0.125d0) * (k * k)) + 1.0d0)) * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 1.05e+60) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 1.05e+60: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) else: tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 1.05e+60) 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(l * Float64(Float64(-0.125 * Float64(K * K)) + 1.0)) * 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 <= 1.05e+60) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); else tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 1.05e+60], 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[(l * N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.05 \cdot 10^{+60}:\\
\;\;\;\;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(\ell \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\right) \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 < 1.0500000000000001e60Initial program 84.8%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.5%
Simplified95.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.2%
Simplified80.2%
if 1.0500000000000001e60 < l Initial program 100.0%
Taylor expanded in l around 0
*-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-*.f6498.4%
Simplified98.4%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.1%
Simplified79.1%
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-*.f6480.7%
Simplified80.7%
Final simplification80.3%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
(if (<= l 3.2e-7)
(+ U (* (+ 2.0 (* l (* l t_0))) (* l J)))
(* J (* (* l (+ (* -0.125 (* K K)) 1.0)) (+ 2.0 (* (* l l) t_0)))))))
double code(double J, double l, double K, double U) {
double t_0 = 0.3333333333333333 + ((l * l) * 0.016666666666666666);
double tmp;
if (l <= 3.2e-7) {
tmp = U + ((2.0 + (l * (l * t_0))) * (l * J));
} else {
tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * t_0)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = 0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)
if (l <= 3.2d-7) then
tmp = u + ((2.0d0 + (l * (l * t_0))) * (l * j))
else
tmp = j * ((l * (((-0.125d0) * (k * k)) + 1.0d0)) * (2.0d0 + ((l * l) * 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 + ((l * l) * 0.016666666666666666);
double tmp;
if (l <= 3.2e-7) {
tmp = U + ((2.0 + (l * (l * t_0))) * (l * J));
} else {
tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * t_0)));
}
return tmp;
}
def code(J, l, K, U): t_0 = 0.3333333333333333 + ((l * l) * 0.016666666666666666) tmp = 0 if l <= 3.2e-7: tmp = U + ((2.0 + (l * (l * t_0))) * (l * J)) else: tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * t_0))) return tmp
function code(J, l, K, U) t_0 = Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)) tmp = 0.0 if (l <= 3.2e-7) tmp = Float64(U + Float64(Float64(2.0 + Float64(l * Float64(l * t_0))) * Float64(l * J))); else tmp = Float64(J * Float64(Float64(l * Float64(Float64(-0.125 * Float64(K * K)) + 1.0)) * Float64(2.0 + Float64(Float64(l * l) * t_0)))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 0.3333333333333333 + ((l * l) * 0.016666666666666666); tmp = 0.0; if (l <= 3.2e-7) tmp = U + ((2.0 + (l * (l * t_0))) * (l * J)); else tmp = J * ((l * ((-0.125 * (K * K)) + 1.0)) * (2.0 + ((l * l) * t_0))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 3.2e-7], N[(U + N[(N[(2.0 + N[(l * N[(l * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(J * N[(N[(l * N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(l * l), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\\
\mathbf{if}\;\ell \leq 3.2 \cdot 10^{-7}:\\
\;\;\;\;U + \left(2 + \ell \cdot \left(\ell \cdot t\_0\right)\right) \cdot \left(\ell \cdot J\right)\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(\left(\ell \cdot \left(-0.125 \cdot \left(K \cdot K\right) + 1\right)\right) \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if l < 3.2000000000000001e-7Initial program 84.5%
Taylor expanded in l around 0
*-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.7%
Simplified96.7%
Taylor expanded in K around 0
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.3%
Simplified81.3%
if 3.2000000000000001e-7 < l Initial program 99.2%
Taylor expanded in l around 0
*-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-*.f6490.9%
Simplified90.9%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.6%
Simplified72.6%
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-*.f6474.1%
Simplified74.1%
Final simplification79.5%
(FPCore (J l K U)
:precision binary64
(if (<= l 2e+148)
(+
U
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
(* (* J 0.3333333333333333) (* (+ (* -0.125 (* K K)) 1.0) (* l (* l l))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2e+148) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 2d+148) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
else
tmp = (j * 0.3333333333333333d0) * ((((-0.125d0) * (k * k)) + 1.0d0) * (l * (l * l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2e+148) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 2e+148: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) else: tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 2e+148) 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(Float64(J * 0.3333333333333333) * Float64(Float64(Float64(-0.125 * Float64(K * K)) + 1.0) * Float64(l * Float64(l * l)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 2e+148) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); else tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 2e+148], 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[(N[(J * 0.3333333333333333), $MachinePrecision] * N[(N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2 \cdot 10^{+148}:\\
\;\;\;\;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}:\\
\;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\end{array}
\end{array}
if l < 2.0000000000000001e148Initial program 86.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified82.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-*.f6478.1%
Simplified78.1%
if 2.0000000000000001e148 < 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
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified97.2%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.2%
Simplified88.2%
Taylor expanded in l around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.2%
Simplified88.2%
Final simplification79.5%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* U (/ (* J (* l (* (* l l) 0.3333333333333333))) U)))) (if (<= l -1.95e+18) t_0 (if (<= l 940.0) (+ U (* J (* 2.0 l))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = U * ((J * (l * ((l * l) * 0.3333333333333333))) / U);
double tmp;
if (l <= -1.95e+18) {
tmp = t_0;
} else if (l <= 940.0) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = u * ((j * (l * ((l * l) * 0.3333333333333333d0))) / u)
if (l <= (-1.95d+18)) then
tmp = t_0
else if (l <= 940.0d0) then
tmp = u + (j * (2.0d0 * l))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = U * ((J * (l * ((l * l) * 0.3333333333333333))) / U);
double tmp;
if (l <= -1.95e+18) {
tmp = t_0;
} else if (l <= 940.0) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = U * ((J * (l * ((l * l) * 0.3333333333333333))) / U) tmp = 0 if l <= -1.95e+18: tmp = t_0 elif l <= 940.0: tmp = U + (J * (2.0 * l)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(U * Float64(Float64(J * Float64(l * Float64(Float64(l * l) * 0.3333333333333333))) / U)) tmp = 0.0 if (l <= -1.95e+18) tmp = t_0; elseif (l <= 940.0) tmp = Float64(U + Float64(J * Float64(2.0 * l))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = U * ((J * (l * ((l * l) * 0.3333333333333333))) / U); tmp = 0.0; if (l <= -1.95e+18) tmp = t_0; elseif (l <= 940.0) tmp = U + (J * (2.0 * l)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(U * N[(N[(J * N[(l * N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.95e+18], t$95$0, If[LessEqual[l, 940.0], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := U \cdot \frac{J \cdot \left(\ell \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)}{U}\\
\mathbf{if}\;\ell \leq -1.95 \cdot 10^{+18}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 940:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -1.95e18 or 940 < 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
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified76.7%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6456.7%
Simplified56.7%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.2%
Simplified59.2%
Taylor expanded in l around inf
associate-*r/N/A
associate-*r*N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.3%
Simplified63.3%
if -1.95e18 < l < 940Initial program 78.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified87.5%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6485.4%
Simplified85.4%
Final simplification75.4%
(FPCore (J l K U) :precision binary64 (if (<= l 3.1e+148) (* U (+ (* J (* (+ 2.0 (* (* l l) 0.3333333333333333)) (/ l U))) 1.0)) (* (* J 0.3333333333333333) (* (+ (* -0.125 (* K K)) 1.0) (* l (* l l))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 3.1e+148) {
tmp = U * ((J * ((2.0 + ((l * l) * 0.3333333333333333)) * (l / U))) + 1.0);
} else {
tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 3.1d+148) then
tmp = u * ((j * ((2.0d0 + ((l * l) * 0.3333333333333333d0)) * (l / u))) + 1.0d0)
else
tmp = (j * 0.3333333333333333d0) * ((((-0.125d0) * (k * k)) + 1.0d0) * (l * (l * l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 3.1e+148) {
tmp = U * ((J * ((2.0 + ((l * l) * 0.3333333333333333)) * (l / U))) + 1.0);
} else {
tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 3.1e+148: tmp = U * ((J * ((2.0 + ((l * l) * 0.3333333333333333)) * (l / U))) + 1.0) else: tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 3.1e+148) tmp = Float64(U * Float64(Float64(J * Float64(Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)) * Float64(l / U))) + 1.0)); else tmp = Float64(Float64(J * 0.3333333333333333) * Float64(Float64(Float64(-0.125 * Float64(K * K)) + 1.0) * Float64(l * Float64(l * l)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 3.1e+148) tmp = U * ((J * ((2.0 + ((l * l) * 0.3333333333333333)) * (l / U))) + 1.0); else tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 3.1e+148], N[(U * N[(N[(J * N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[(l / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(J * 0.3333333333333333), $MachinePrecision] * N[(N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.1 \cdot 10^{+148}:\\
\;\;\;\;U \cdot \left(J \cdot \left(\left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right) \cdot \frac{\ell}{U}\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\end{array}
\end{array}
if l < 3.09999999999999975e148Initial program 86.4%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified87.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6472.4%
Simplified72.4%
Taylor expanded in U around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified75.4%
if 3.09999999999999975e148 < 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
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified97.2%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.2%
Simplified88.2%
Taylor expanded in l around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.2%
Simplified88.2%
Final simplification77.1%
(FPCore (J l K U) :precision binary64 (if (<= l 2500.0) (+ U (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333))))) (* (* J 0.3333333333333333) (* (+ (* -0.125 (* K K)) 1.0) (* l (* l l))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2500.0) {
tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 2500.0d0) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0))))
else
tmp = (j * 0.3333333333333333d0) * ((((-0.125d0) * (k * k)) + 1.0d0) * (l * (l * l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2500.0) {
tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 2500.0: tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))) else: tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 2500.0) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))); else tmp = Float64(Float64(J * 0.3333333333333333) * Float64(Float64(Float64(-0.125 * Float64(K * K)) + 1.0) * Float64(l * Float64(l * l)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 2500.0) tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))); else tmp = (J * 0.3333333333333333) * (((-0.125 * (K * K)) + 1.0) * (l * (l * l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 2500.0], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(J * 0.3333333333333333), $MachinePrecision] * N[(N[(N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2500:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(J \cdot 0.3333333333333333\right) \cdot \left(\left(-0.125 \cdot \left(K \cdot K\right) + 1\right) \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\end{array}
\end{array}
if l < 2500Initial program 84.4%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified93.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6478.4%
Simplified78.4%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6479.9%
Applied egg-rr79.9%
if 2500 < 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
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified74.0%
Taylor expanded in K around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.1%
Simplified67.1%
Taylor expanded in l around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.7%
Simplified68.7%
Final simplification77.1%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333)))))) (if (<= l -0.102) t_0 (if (<= l 3.2e-7) (+ U (* J (* 2.0 l))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (l * (2.0 + ((l * l) * 0.3333333333333333)));
double tmp;
if (l <= -0.102) {
tmp = t_0;
} else if (l <= 3.2e-7) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0)))
if (l <= (-0.102d0)) then
tmp = t_0
else if (l <= 3.2d-7) then
tmp = u + (j * (2.0d0 * l))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = J * (l * (2.0 + ((l * l) * 0.3333333333333333)));
double tmp;
if (l <= -0.102) {
tmp = t_0;
} else if (l <= 3.2e-7) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (l * (2.0 + ((l * l) * 0.3333333333333333))) tmp = 0 if l <= -0.102: tmp = t_0 elif l <= 3.2e-7: tmp = U + (J * (2.0 * l)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333)))) tmp = 0.0 if (l <= -0.102) tmp = t_0; elseif (l <= 3.2e-7) tmp = Float64(U + Float64(J * Float64(2.0 * l))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (l * (2.0 + ((l * l) * 0.3333333333333333))); tmp = 0.0; if (l <= -0.102) tmp = t_0; elseif (l <= 3.2e-7) tmp = U + (J * (2.0 * l)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -0.102], t$95$0, If[LessEqual[l, 3.2e-7], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{if}\;\ell \leq -0.102:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 3.2 \cdot 10^{-7}:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -0.101999999999999993 or 3.2000000000000001e-7 < l Initial program 99.5%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified75.6%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6455.7%
Simplified55.7%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.0%
Simplified58.0%
Taylor expanded in U around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.6%
Simplified59.6%
if -0.101999999999999993 < l < 3.2000000000000001e-7Initial program 78.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified87.7%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6487.7%
Simplified87.7%
Final simplification74.4%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* 0.3333333333333333 (* l (* l l)))))) (if (<= l -6.8e+18) t_0 (if (<= l 5000000.0) (+ U (* J (* 2.0 l))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (0.3333333333333333 * (l * (l * l)));
double tmp;
if (l <= -6.8e+18) {
tmp = t_0;
} else if (l <= 5000000.0) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = j * (0.3333333333333333d0 * (l * (l * l)))
if (l <= (-6.8d+18)) then
tmp = t_0
else if (l <= 5000000.0d0) then
tmp = u + (j * (2.0d0 * l))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = J * (0.3333333333333333 * (l * (l * l)));
double tmp;
if (l <= -6.8e+18) {
tmp = t_0;
} else if (l <= 5000000.0) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (0.3333333333333333 * (l * (l * l))) tmp = 0 if l <= -6.8e+18: tmp = t_0 elif l <= 5000000.0: tmp = U + (J * (2.0 * l)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(J * Float64(0.3333333333333333 * Float64(l * Float64(l * l)))) tmp = 0.0 if (l <= -6.8e+18) tmp = t_0; elseif (l <= 5000000.0) tmp = Float64(U + Float64(J * Float64(2.0 * l))); else tmp = t_0; end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = J * (0.3333333333333333 * (l * (l * l))); tmp = 0.0; if (l <= -6.8e+18) tmp = t_0; elseif (l <= 5000000.0) tmp = U + (J * (2.0 * l)); else tmp = t_0; end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(J * N[(0.3333333333333333 * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -6.8e+18], t$95$0, If[LessEqual[l, 5000000.0], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(0.3333333333333333 \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)\\
\mathbf{if}\;\ell \leq -6.8 \cdot 10^{+18}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 5000000:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -6.8e18 or 5e6 < 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
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified76.7%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6456.7%
Simplified56.7%
Taylor expanded in l around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.8%
Simplified60.8%
if -6.8e18 < l < 5e6Initial program 78.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified87.5%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6485.4%
Simplified85.4%
Final simplification74.3%
(FPCore (J l K U) :precision binary64 (* U (+ (* (* l J) (/ (+ 2.0 (* l (* l 0.3333333333333333))) U)) 1.0)))
double code(double J, double l, double K, double U) {
return U * (((l * J) * ((2.0 + (l * (l * 0.3333333333333333))) / U)) + 1.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 + (l * (l * 0.3333333333333333d0))) / u)) + 1.0d0)
end function
public static double code(double J, double l, double K, double U) {
return U * (((l * J) * ((2.0 + (l * (l * 0.3333333333333333))) / U)) + 1.0);
}
def code(J, l, K, U): return U * (((l * J) * ((2.0 + (l * (l * 0.3333333333333333))) / U)) + 1.0)
function code(J, l, K, U) return Float64(U * Float64(Float64(Float64(l * J) * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) / U)) + 1.0)) end
function tmp = code(J, l, K, U) tmp = U * (((l * J) * ((2.0 + (l * (l * 0.3333333333333333))) / U)) + 1.0); end
code[J_, l_, K_, U_] := N[(U * N[(N[(N[(l * J), $MachinePrecision] * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U \cdot \left(\left(\ell \cdot J\right) \cdot \frac{2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)}{U} + 1\right)
\end{array}
Initial program 88.2%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified88.4%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6472.6%
Simplified72.6%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.3%
Simplified73.3%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6474.8%
Applied egg-rr74.8%
Final simplification74.8%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* 2.0 l)))) (if (<= l -1.1e-19) t_0 (if (<= l 7.5e-6) U t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (2.0 * l);
double tmp;
if (l <= -1.1e-19) {
tmp = t_0;
} else if (l <= 7.5e-6) {
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 <= (-1.1d-19)) then
tmp = t_0
else if (l <= 7.5d-6) 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 <= -1.1e-19) {
tmp = t_0;
} else if (l <= 7.5e-6) {
tmp = U;
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (2.0 * l) tmp = 0 if l <= -1.1e-19: tmp = t_0 elif l <= 7.5e-6: 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 <= -1.1e-19) tmp = t_0; elseif (l <= 7.5e-6) 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 <= -1.1e-19) tmp = t_0; elseif (l <= 7.5e-6) 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, -1.1e-19], t$95$0, If[LessEqual[l, 7.5e-6], U, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(2 \cdot \ell\right)\\
\mathbf{if}\;\ell \leq -1.1 \cdot 10^{-19}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 7.5 \cdot 10^{-6}:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -1.0999999999999999e-19 or 7.50000000000000019e-6 < l Initial program 97.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified74.1%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6426.1%
Simplified26.1%
Taylor expanded in l around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6425.5%
Simplified25.5%
if -1.0999999999999999e-19 < l < 7.50000000000000019e-6Initial program 79.0%
Taylor expanded in J around 0
Simplified78.4%
Final simplification52.4%
(FPCore (J l K U) :precision binary64 (+ U (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333))))))
double code(double J, double l, double K, double U) {
return U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0))))
end function
public static double code(double J, double l, double K, double U) {
return U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
}
def code(J, l, K, U): return U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))))
function code(J, l, K, U) return Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))) end
function tmp = code(J, l, K, U) tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))); end
code[J_, l_, K_, U_] := N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)
\end{array}
Initial program 88.2%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified88.4%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6472.6%
Simplified72.6%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6474.4%
Applied egg-rr74.4%
Final simplification74.4%
(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 88.2%
Taylor expanded in l around 0
distribute-rgt-inN/A
fma-defineN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
fma-undefineN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
Simplified88.4%
Taylor expanded in K around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6472.6%
Simplified72.6%
Final simplification72.6%
(FPCore (J l K U) :precision binary64 (+ U (* J (* 2.0 l))))
double code(double J, double l, double K, double U) {
return U + (J * (2.0 * l));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u + (j * (2.0d0 * l))
end function
public static double code(double J, double l, double K, double U) {
return U + (J * (2.0 * l));
}
def code(J, l, K, U): return U + (J * (2.0 * l))
function code(J, l, K, U) return Float64(U + Float64(J * Float64(2.0 * l))) end
function tmp = code(J, l, K, U) tmp = U + (J * (2.0 * l)); end
code[J_, l_, K_, U_] := N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \left(2 \cdot \ell\right)
\end{array}
Initial program 88.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-undefN/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6499.9%
Applied egg-rr99.9%
Taylor expanded in K around 0
Simplified81.4%
Taylor expanded in l around 0
*-commutativeN/A
*-lowering-*.f6457.8%
Simplified57.8%
Final simplification57.8%
(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 88.2%
Taylor expanded in J around 0
Simplified41.2%
herbie shell --seed 2024139
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))