
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (J l K U) :precision binary64 (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))
double code(double J, double l, double K, double U) {
return ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = ((j * (exp(l) - exp(-l))) * cos((k / 2.0d0))) + u
end function
public static double code(double J, double l, double K, double U) {
return ((J * (Math.exp(l) - Math.exp(-l))) * Math.cos((K / 2.0))) + U;
}
def code(J, l, K, U): return ((J * (math.exp(l) - math.exp(-l))) * math.cos((K / 2.0))) + U
function code(J, l, K, U) return Float64(Float64(Float64(J * Float64(exp(l) - exp(Float64(-l)))) * cos(Float64(K / 2.0))) + U) end
function tmp = code(J, l, K, U) tmp = ((J * (exp(l) - exp(-l))) * cos((K / 2.0))) + U; end
code[J_, l_, K_, U_] := N[(N[(N[(J * N[(N[Exp[l], $MachinePrecision] - N[Exp[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U
\end{array}
(FPCore (J l K U) :precision binary64 (+ (* 2.0 (* (* (cos (/ K 2.0)) J) (sinh l))) U))
double code(double J, double l, double K, double U) {
return (2.0 * ((cos((K / 2.0)) * J) * sinh(l))) + U;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = (2.0d0 * ((cos((k / 2.0d0)) * j) * sinh(l))) + u
end function
public static double code(double J, double l, double K, double U) {
return (2.0 * ((Math.cos((K / 2.0)) * J) * Math.sinh(l))) + U;
}
def code(J, l, K, U): return (2.0 * ((math.cos((K / 2.0)) * J) * math.sinh(l))) + U
function code(J, l, K, U) return Float64(Float64(2.0 * Float64(Float64(cos(Float64(K / 2.0)) * J) * sinh(l))) + U) end
function tmp = code(J, l, K, U) tmp = (2.0 * ((cos((K / 2.0)) * J) * sinh(l))) + U; end
code[J_, l_, K_, U_] := N[(N[(2.0 * N[(N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * J), $MachinePrecision] * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + U), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(\cos \left(\frac{K}{2}\right) \cdot J\right) \cdot \sinh \ell\right) + U
\end{array}
Initial program 84.8%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 0.998)
(+
U
(*
t_0
(*
J
(*
l
(+
2.0
(*
(* l l)
(+ 0.3333333333333333 (* l (* l 0.016666666666666666)))))))))
(+ U (* 2.0 (* J (sinh l)))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= 0.998) {
tmp = U + (t_0 * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * 0.016666666666666666))))))));
} else {
tmp = U + (2.0 * (J * sinh(l)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = cos((k / 2.0d0))
if (t_0 <= 0.998d0) then
tmp = u + (t_0 * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * 0.016666666666666666d0))))))))
else
tmp = u + (2.0d0 * (j * sinh(l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = Math.cos((K / 2.0));
double tmp;
if (t_0 <= 0.998) {
tmp = U + (t_0 * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * 0.016666666666666666))))))));
} else {
tmp = U + (2.0 * (J * Math.sinh(l)));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= 0.998: tmp = U + (t_0 * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * 0.016666666666666666)))))))) else: tmp = U + (2.0 * (J * math.sinh(l))) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= 0.998) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * 0.016666666666666666))))))))); else tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = cos((K / 2.0)); tmp = 0.0; if (t_0 <= 0.998) tmp = U + (t_0 * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * 0.016666666666666666)))))))); else tmp = U + (2.0 * (J * sinh(l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, 0.998], N[(U + N[(t$95$0 * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq 0.998:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot 0.016666666666666666\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < 0.998Initial program 85.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6494.4%
Simplified94.4%
if 0.998 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 84.4%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified100.0%
Final simplification97.4%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (cos (/ K 2.0))))
(if (<= t_0 -0.02)
(+ U (* t_0 (* J (* l (+ 2.0 (* l (* l 0.3333333333333333)))))))
(+ U (* 2.0 (* J (sinh l)))))))
double code(double J, double l, double K, double U) {
double t_0 = cos((K / 2.0));
double tmp;
if (t_0 <= -0.02) {
tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333))))));
} else {
tmp = U + (2.0 * (J * sinh(l)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = cos((k / 2.0d0))
if (t_0 <= (-0.02d0)) then
tmp = u + (t_0 * (j * (l * (2.0d0 + (l * (l * 0.3333333333333333d0))))))
else
tmp = u + (2.0d0 * (j * sinh(l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double t_0 = Math.cos((K / 2.0));
double tmp;
if (t_0 <= -0.02) {
tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333))))));
} else {
tmp = U + (2.0 * (J * Math.sinh(l)));
}
return tmp;
}
def code(J, l, K, U): t_0 = math.cos((K / 2.0)) tmp = 0 if t_0 <= -0.02: tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333)))))) else: tmp = U + (2.0 * (J * math.sinh(l))) return tmp
function code(J, l, K, U) t_0 = cos(Float64(K / 2.0)) tmp = 0.0 if (t_0 <= -0.02) tmp = Float64(U + Float64(t_0 * Float64(J * Float64(l * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))))); else tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = cos((K / 2.0)); tmp = 0.0; if (t_0 <= -0.02) tmp = U + (t_0 * (J * (l * (2.0 + (l * (l * 0.3333333333333333)))))); else tmp = U + (2.0 * (J * sinh(l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -0.02], N[(U + N[(t$95$0 * N[(J * N[(l * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\frac{K}{2}\right)\\
\mathbf{if}\;t\_0 \leq -0.02:\\
\;\;\;\;U + t\_0 \cdot \left(J \cdot \left(\ell \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0200000000000000004Initial program 79.9%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.2%
Simplified88.2%
if -0.0200000000000000004 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 86.2%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified97.2%
Final simplification95.2%
(FPCore (J l K U) :precision binary64 (if (<= (cos (/ K 2.0)) -0.02) (+ U (* l (* (+ 2.0 (* l (* l 0.3333333333333333))) (* J (cos (* K 0.5)))))) (+ U (* 2.0 (* J (sinh l))))))
double code(double J, double l, double K, double U) {
double tmp;
if (cos((K / 2.0)) <= -0.02) {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J * cos((K * 0.5)))));
} else {
tmp = U + (2.0 * (J * sinh(l)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (cos((k / 2.0d0)) <= (-0.02d0)) then
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j * cos((k * 0.5d0)))))
else
tmp = u + (2.0d0 * (j * sinh(l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (Math.cos((K / 2.0)) <= -0.02) {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J * Math.cos((K * 0.5)))));
} else {
tmp = U + (2.0 * (J * Math.sinh(l)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if math.cos((K / 2.0)) <= -0.02: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J * math.cos((K * 0.5))))) else: tmp = U + (2.0 * (J * math.sinh(l))) return tmp
function code(J, l, K, U) tmp = 0.0 if (cos(Float64(K / 2.0)) <= -0.02) tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J * cos(Float64(K * 0.5)))))); else tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (cos((K / 2.0)) <= -0.02) tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J * cos((K * 0.5))))); else tmp = U + (2.0 * (J * sinh(l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision], -0.02], N[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J * N[Cos[N[(K * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq -0.02:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J \cdot \cos \left(K \cdot 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0200000000000000004Initial program 79.9%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified86.6%
if -0.0200000000000000004 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 86.2%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified97.2%
Final simplification94.8%
(FPCore (J l K U)
:precision binary64
(if (<= (cos (/ K 2.0)) -0.02)
(+
U
(*
l
(*
(+ 2.0 (* l (* l 0.3333333333333333)))
(+ J (* J (* -0.125 (* K K)))))))
(+ U (* 2.0 (* J (sinh l))))))
double code(double J, double l, double K, double U) {
double tmp;
if (cos((K / 2.0)) <= -0.02) {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
} else {
tmp = U + (2.0 * (J * sinh(l)));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (cos((k / 2.0d0)) <= (-0.02d0)) then
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j + (j * ((-0.125d0) * (k * k))))))
else
tmp = u + (2.0d0 * (j * sinh(l)))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (Math.cos((K / 2.0)) <= -0.02) {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
} else {
tmp = U + (2.0 * (J * Math.sinh(l)));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if math.cos((K / 2.0)) <= -0.02: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))) else: tmp = U + (2.0 * (J * math.sinh(l))) return tmp
function code(J, l, K, U) tmp = 0.0 if (cos(Float64(K / 2.0)) <= -0.02) tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); else tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (cos((K / 2.0)) <= -0.02) tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))); else tmp = U + (2.0 * (J * sinh(l))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision], -0.02], N[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos \left(\frac{K}{2}\right) \leq -0.02:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\end{array}
\end{array}
if (cos.f64 (/.f64 K #s(literal 2 binary64))) < -0.0200000000000000004Initial program 79.9%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified86.6%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.2%
Simplified65.2%
if -0.0200000000000000004 < (cos.f64 (/.f64 K #s(literal 2 binary64))) Initial program 86.2%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified97.2%
Final simplification90.0%
(FPCore (J l K U)
:precision binary64
(if (<= (/ K 2.0) 4.1e-79)
(+ U (* 2.0 (* J (sinh l))))
(+
U
(*
(cos (/ K 2.0))
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+
0.016666666666666666
(* (* l l) 0.0003968253968253968)))))))))))))
double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 4.1e-79) {
tmp = U + (2.0 * (J * sinh(l)));
} else {
tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if ((k / 2.0d0) <= 4.1d-79) then
tmp = u + (2.0d0 * (j * sinh(l)))
else
tmp = u + (cos((k / 2.0d0)) * (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0))))))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if ((K / 2.0) <= 4.1e-79) {
tmp = U + (2.0 * (J * Math.sinh(l)));
} else {
tmp = U + (Math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if (K / 2.0) <= 4.1e-79: tmp = U + (2.0 * (J * math.sinh(l))) else: tmp = U + (math.cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (Float64(K / 2.0) <= 4.1e-79) tmp = Float64(U + Float64(2.0 * Float64(J * sinh(l)))); else tmp = Float64(U + Float64(cos(Float64(K / 2.0)) * Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(l * Float64(l * Float64(0.016666666666666666 + Float64(Float64(l * l) * 0.0003968253968253968))))))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if ((K / 2.0) <= 4.1e-79) tmp = U + (2.0 * (J * sinh(l))); else tmp = U + (cos((K / 2.0)) * (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[N[(K / 2.0), $MachinePrecision], 4.1e-79], N[(U + N[(2.0 * N[(J * N[Sinh[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(N[Cos[N[(K / 2.0), $MachinePrecision]], $MachinePrecision] * N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(l * N[(l * N[(0.016666666666666666 + N[(N[(l * l), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{K}{2} \leq 4.1 \cdot 10^{-79}:\\
\;\;\;\;U + 2 \cdot \left(J \cdot \sinh \ell\right)\\
\mathbf{else}:\\
\;\;\;\;U + \cos \left(\frac{K}{2}\right) \cdot \left(J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \ell \cdot \left(\ell \cdot \left(0.016666666666666666 + \left(\ell \cdot \ell\right) \cdot 0.0003968253968253968\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 K #s(literal 2 binary64)) < 4.09999999999999994e-79Initial program 86.1%
*-commutativeN/A
associate-*r*N/A
sinh-undefN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in K around 0
Simplified88.6%
if 4.09999999999999994e-79 < (/.f64 K #s(literal 2 binary64)) Initial program 82.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-*.f6498.8%
Simplified98.8%
Final simplification92.1%
(FPCore (J l K U)
:precision binary64
(if (<= l 4e+129)
(+
U
(*
J
(*
l
(+
2.0
(*
(* l l)
(+
0.3333333333333333
(*
l
(*
l
(+ 0.016666666666666666 (* (* l l) 0.0003968253968253968))))))))))
(+
U
(*
l
(*
(+ 2.0 (* l (* l 0.3333333333333333)))
(+ J (* J (* -0.125 (* K K)))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 4e+129) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-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 <= 4d+129) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + (l * (l * (0.016666666666666666d0 + ((l * l) * 0.0003968253968253968d0)))))))))
else
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j + (j * ((-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 <= 4e+129) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968)))))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 4e+129: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))) else: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 4e+129) 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(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 4e+129) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + (l * (l * (0.016666666666666666 + ((l * l) * 0.0003968253968253968))))))))); else tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 4e+129], 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[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4 \cdot 10^{+129}:\\
\;\;\;\;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}:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 4e129Initial program 82.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.8%
Simplified71.8%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.5%
Simplified79.5%
if 4e129 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.5%
Simplified89.5%
Final simplification81.0%
(FPCore (J l K U)
:precision binary64
(if (<= l 5.4e+129)
(*
U
(+
1.0
(*
J
(/
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))
U))))
(+
U
(*
l
(*
(+ 2.0 (* l (* l 0.3333333333333333)))
(+ J (* J (* -0.125 (* K K)))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 5.4e+129) {
tmp = U * (1.0 + (J * ((l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))) / U)));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-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 <= 5.4d+129) then
tmp = u * (1.0d0 + (j * ((l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))) / u)))
else
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j + (j * ((-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 <= 5.4e+129) {
tmp = U * (1.0 + (J * ((l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))) / U)));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 5.4e+129: tmp = U * (1.0 + (J * ((l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))) / U))) else: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 5.4e+129) tmp = Float64(U * Float64(1.0 + Float64(J * Float64(Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666))))) / U)))); else tmp = Float64(U + Float64(l * Float64(Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 5.4e+129) tmp = U * (1.0 + (J * ((l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))) / U))); else tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 5.4e+129], N[(U * N[(1.0 + N[(J * N[(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] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(l * N[(N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.4 \cdot 10^{+129}:\\
\;\;\;\;U \cdot \left(1 + J \cdot \frac{\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)}{U}\right)\\
\mathbf{else}:\\
\;\;\;\;U + \ell \cdot \left(\left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 5.4000000000000002e129Initial program 82.1%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.2%
Simplified92.2%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6475.1%
Simplified75.1%
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6475.1%
Applied egg-rr75.1%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified76.8%
if 5.4000000000000002e129 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.5%
Simplified89.5%
Final simplification78.6%
(FPCore (J l K U)
:precision binary64
(if (<= l 2.2e+129)
(+
U
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666)))))))
(+
U
(*
l
(*
(+ 2.0 (* l (* l 0.3333333333333333)))
(+ J (* J (* -0.125 (* K K)))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 2.2e+129) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-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.2d+129) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0))))))
else
tmp = u + (l * ((2.0d0 + (l * (l * 0.3333333333333333d0))) * (j + (j * ((-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.2e+129) {
tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))));
} else {
tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 2.2e+129: tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))) else: tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 2.2e+129) 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(2.0 + Float64(l * Float64(l * 0.3333333333333333))) * Float64(J + Float64(J * Float64(-0.125 * Float64(K * K))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 2.2e+129) tmp = U + (J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))))); else tmp = U + (l * ((2.0 + (l * (l * 0.3333333333333333))) * (J + (J * (-0.125 * (K * K)))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 2.2e+129], 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[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J + N[(J * N[(-0.125 * N[(K * K), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.2 \cdot 10^{+129}:\\
\;\;\;\;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(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right) \cdot \left(J + J \cdot \left(-0.125 \cdot \left(K \cdot K\right)\right)\right)\right)\\
\end{array}
\end{array}
if l < 2.1999999999999999e129Initial program 82.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.8%
Simplified71.8%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.9%
Simplified75.9%
if 2.1999999999999999e129 < l Initial program 100.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in K around 0
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.5%
Simplified89.5%
Final simplification78.0%
(FPCore (J l K U)
:precision binary64
(if (<= K 7e+38)
(+ U (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333)))))
(+
U
(*
J
(*
l
(+
1.0
(*
l
(+ 0.5 (* l (+ 0.16666666666666666 (* l 0.041666666666666664)))))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (K <= 7e+38) {
tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = U + (J * (l * (1.0 + (l * (0.5 + (l * (0.16666666666666666 + (l * 0.041666666666666664))))))));
}
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 <= 7d+38) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0))))
else
tmp = u + (j * (l * (1.0d0 + (l * (0.5d0 + (l * (0.16666666666666666d0 + (l * 0.041666666666666664d0))))))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (K <= 7e+38) {
tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = U + (J * (l * (1.0 + (l * (0.5 + (l * (0.16666666666666666 + (l * 0.041666666666666664))))))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if K <= 7e+38: tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))) else: tmp = U + (J * (l * (1.0 + (l * (0.5 + (l * (0.16666666666666666 + (l * 0.041666666666666664)))))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (K <= 7e+38) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))); else tmp = Float64(U + Float64(J * Float64(l * Float64(1.0 + Float64(l * Float64(0.5 + Float64(l * Float64(0.16666666666666666 + Float64(l * 0.041666666666666664))))))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (K <= 7e+38) tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))); else tmp = U + (J * (l * (1.0 + (l * (0.5 + (l * (0.16666666666666666 + (l * 0.041666666666666664)))))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[K, 7e+38], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(J * N[(l * N[(1.0 + N[(l * N[(0.5 + N[(l * N[(0.16666666666666666 + N[(l * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;K \leq 7 \cdot 10^{+38}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(1 + \ell \cdot \left(0.5 + \ell \cdot \left(0.16666666666666666 + \ell \cdot 0.041666666666666664\right)\right)\right)\right)\\
\end{array}
\end{array}
if K < 7.00000000000000003e38Initial program 84.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6477.2%
Simplified77.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.8%
Simplified79.8%
if 7.00000000000000003e38 < K Initial program 85.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6454.8%
Simplified54.8%
Taylor expanded in l around 0
Simplified42.6%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6451.7%
Simplified51.7%
Final simplification72.9%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* (* J l) (* (* l l) (* (* l l) 0.016666666666666666))))) (if (<= l -7.2e+15) t_0 (if (<= l 1.25e+14) (+ U (* J (* 2.0 l))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = (J * l) * ((l * l) * ((l * l) * 0.016666666666666666));
double tmp;
if (l <= -7.2e+15) {
tmp = t_0;
} else if (l <= 1.25e+14) {
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) * ((l * l) * ((l * l) * 0.016666666666666666d0))
if (l <= (-7.2d+15)) then
tmp = t_0
else if (l <= 1.25d+14) 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) * ((l * l) * ((l * l) * 0.016666666666666666));
double tmp;
if (l <= -7.2e+15) {
tmp = t_0;
} else if (l <= 1.25e+14) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = (J * l) * ((l * l) * ((l * l) * 0.016666666666666666)) tmp = 0 if l <= -7.2e+15: tmp = t_0 elif l <= 1.25e+14: tmp = U + (J * (2.0 * l)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(Float64(J * l) * Float64(Float64(l * l) * Float64(Float64(l * l) * 0.016666666666666666))) tmp = 0.0 if (l <= -7.2e+15) tmp = t_0; elseif (l <= 1.25e+14) 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) * ((l * l) * ((l * l) * 0.016666666666666666)); tmp = 0.0; if (l <= -7.2e+15) tmp = t_0; elseif (l <= 1.25e+14) 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[(N[(J * l), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -7.2e+15], t$95$0, If[LessEqual[l, 1.25e+14], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(J \cdot \ell\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\\
\mathbf{if}\;\ell \leq -7.2 \cdot 10^{+15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 1.25 \cdot 10^{+14}:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -7.2e15 or 1.25e14 < l Initial program 100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6489.5%
Simplified89.5%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6464.9%
Simplified64.9%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.9%
Simplified64.9%
Taylor expanded in l around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.9%
Simplified64.9%
if -7.2e15 < l < 1.25e14Initial program 70.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6468.1%
Simplified68.1%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6483.2%
Simplified83.2%
Final simplification74.2%
(FPCore (J l K U)
:precision binary64
(if (<= l 0.036)
(+ U (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333)))))
(*
(+ 2.0 (* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))
(* J l))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 0.036) {
tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (J * 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 <= 0.036d0) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0))))
else
tmp = (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))) * (j * l)
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 0.036) {
tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (J * l);
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 0.036: tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))) else: tmp = (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (J * l) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 0.036) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))); else tmp = Float64(Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))) * Float64(J * l)); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 0.036) tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))); else tmp = (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))) * (J * l); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 0.036], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 + N[(N[(l * l), $MachinePrecision] * N[(0.3333333333333333 + N[(N[(l * l), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(J * l), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 0.036:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right) \cdot \left(J \cdot \ell\right)\\
\end{array}
\end{array}
if l < 0.0359999999999999973Initial program 79.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6470.4%
Simplified70.4%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.7%
Simplified76.7%
if 0.0359999999999999973 < l Initial program 100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6465.6%
Simplified65.6%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.5%
Simplified65.5%
Final simplification73.7%
(FPCore (J l K U)
:precision binary64
(if (<= l 0.036)
(+ U (* J (* l (+ 2.0 (* (* l l) 0.3333333333333333)))))
(*
J
(*
l
(+
2.0
(* (* l l) (+ 0.3333333333333333 (* (* l l) 0.016666666666666666))))))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= 0.036) {
tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))));
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: tmp
if (l <= 0.036d0) then
tmp = u + (j * (l * (2.0d0 + ((l * l) * 0.3333333333333333d0))))
else
tmp = j * (l * (2.0d0 + ((l * l) * (0.3333333333333333d0 + ((l * l) * 0.016666666666666666d0)))))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= 0.036) {
tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333))));
} else {
tmp = J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666)))));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= 0.036: tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))) else: tmp = J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= 0.036) tmp = Float64(U + Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * 0.3333333333333333))))); else tmp = Float64(J * Float64(l * Float64(2.0 + Float64(Float64(l * l) * Float64(0.3333333333333333 + Float64(Float64(l * l) * 0.016666666666666666)))))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= 0.036) tmp = U + (J * (l * (2.0 + ((l * l) * 0.3333333333333333)))); else tmp = J * (l * (2.0 + ((l * l) * (0.3333333333333333 + ((l * l) * 0.016666666666666666))))); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, 0.036], N[(U + N[(J * N[(l * N[(2.0 + N[(N[(l * l), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 0.036:\\
\;\;\;\;U + J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot 0.3333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;J \cdot \left(\ell \cdot \left(2 + \left(\ell \cdot \ell\right) \cdot \left(0.3333333333333333 + \left(\ell \cdot \ell\right) \cdot 0.016666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if l < 0.0359999999999999973Initial program 79.1%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6470.4%
Simplified70.4%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.7%
Simplified76.7%
if 0.0359999999999999973 < l Initial program 100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6465.6%
Simplified65.6%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.5%
Simplified65.5%
Taylor expanded in J around 0
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
pow-sqrN/A
metadata-evalN/A
distribute-rgt-inN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified65.5%
Final simplification73.7%
(FPCore (J l K U)
:precision binary64
(let* ((t_0 (+ 2.0 (* l (* l 0.3333333333333333)))))
(if (<= l -1.85e-7)
(* l (* J t_0))
(if (<= l 0.036) (+ U (* J (* 2.0 l))) (* t_0 (* J l))))))
double code(double J, double l, double K, double U) {
double t_0 = 2.0 + (l * (l * 0.3333333333333333));
double tmp;
if (l <= -1.85e-7) {
tmp = l * (J * t_0);
} else if (l <= 0.036) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0 * (J * l);
}
return tmp;
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (l * (l * 0.3333333333333333d0))
if (l <= (-1.85d-7)) then
tmp = l * (j * t_0)
else if (l <= 0.036d0) then
tmp = u + (j * (2.0d0 * l))
else
tmp = t_0 * (j * l)
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));
double tmp;
if (l <= -1.85e-7) {
tmp = l * (J * t_0);
} else if (l <= 0.036) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0 * (J * l);
}
return tmp;
}
def code(J, l, K, U): t_0 = 2.0 + (l * (l * 0.3333333333333333)) tmp = 0 if l <= -1.85e-7: tmp = l * (J * t_0) elif l <= 0.036: tmp = U + (J * (2.0 * l)) else: tmp = t_0 * (J * l) return tmp
function code(J, l, K, U) t_0 = Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))) tmp = 0.0 if (l <= -1.85e-7) tmp = Float64(l * Float64(J * t_0)); elseif (l <= 0.036) tmp = Float64(U + Float64(J * Float64(2.0 * l))); else tmp = Float64(t_0 * Float64(J * l)); end return tmp end
function tmp_2 = code(J, l, K, U) t_0 = 2.0 + (l * (l * 0.3333333333333333)); tmp = 0.0; if (l <= -1.85e-7) tmp = l * (J * t_0); elseif (l <= 0.036) tmp = U + (J * (2.0 * l)); else tmp = t_0 * (J * l); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := Block[{t$95$0 = N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.85e-7], N[(l * N[(J * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 0.036], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(J * l), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\\
\mathbf{if}\;\ell \leq -1.85 \cdot 10^{-7}:\\
\;\;\;\;\ell \cdot \left(J \cdot t\_0\right)\\
\mathbf{elif}\;\ell \leq 0.036:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(J \cdot \ell\right)\\
\end{array}
\end{array}
if l < -1.85000000000000002e-7Initial program 99.5%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.6%
Simplified88.6%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6462.2%
Simplified62.2%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.2%
Simplified62.2%
Taylor expanded in l around 0
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
distribute-lft-outN/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-*.f6454.8%
Simplified54.8%
if -1.85000000000000002e-7 < l < 0.0359999999999999973Initial program 68.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6468.3%
Simplified68.3%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6485.9%
Simplified85.9%
if 0.0359999999999999973 < l Initial program 100.0%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.0%
Simplified86.0%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6465.6%
Simplified65.6%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.5%
Simplified65.5%
Taylor expanded in l around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6454.4%
Simplified54.4%
Final simplification69.6%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* l (* J (+ 2.0 (* l (* l 0.3333333333333333))))))) (if (<= l -1.85e-7) t_0 (if (<= l 0.036) (+ U (* J (* 2.0 l))) t_0))))
double code(double J, double l, double K, double U) {
double t_0 = l * (J * (2.0 + (l * (l * 0.3333333333333333))));
double tmp;
if (l <= -1.85e-7) {
tmp = t_0;
} else if (l <= 0.036) {
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 = l * (j * (2.0d0 + (l * (l * 0.3333333333333333d0))))
if (l <= (-1.85d-7)) then
tmp = t_0
else if (l <= 0.036d0) 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 = l * (J * (2.0 + (l * (l * 0.3333333333333333))));
double tmp;
if (l <= -1.85e-7) {
tmp = t_0;
} else if (l <= 0.036) {
tmp = U + (J * (2.0 * l));
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = l * (J * (2.0 + (l * (l * 0.3333333333333333)))) tmp = 0 if l <= -1.85e-7: tmp = t_0 elif l <= 0.036: tmp = U + (J * (2.0 * l)) else: tmp = t_0 return tmp
function code(J, l, K, U) t_0 = Float64(l * Float64(J * Float64(2.0 + Float64(l * Float64(l * 0.3333333333333333))))) tmp = 0.0 if (l <= -1.85e-7) tmp = t_0; elseif (l <= 0.036) 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 = l * (J * (2.0 + (l * (l * 0.3333333333333333)))); tmp = 0.0; if (l <= -1.85e-7) tmp = t_0; elseif (l <= 0.036) 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[(l * N[(J * N[(2.0 + N[(l * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.85e-7], t$95$0, If[LessEqual[l, 0.036], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \ell \cdot \left(J \cdot \left(2 + \ell \cdot \left(\ell \cdot 0.3333333333333333\right)\right)\right)\\
\mathbf{if}\;\ell \leq -1.85 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \leq 0.036:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -1.85000000000000002e-7 or 0.0359999999999999973 < l Initial program 99.8%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.2%
Simplified87.2%
Taylor expanded in K around 0
associate-*r*N/A
*-commutativeN/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-*.f64N/A
*-lowering-*.f6463.9%
Simplified63.9%
Taylor expanded in J around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.9%
Simplified63.9%
Taylor expanded in l around 0
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
distribute-lft-outN/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-*.f6454.6%
Simplified54.6%
if -1.85000000000000002e-7 < l < 0.0359999999999999973Initial program 68.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6468.3%
Simplified68.3%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6485.9%
Simplified85.9%
Final simplification69.6%
(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 84.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.7%
Simplified71.7%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.2%
Simplified75.2%
Final simplification75.2%
(FPCore (J l K U) :precision binary64 (let* ((t_0 (* J (* 2.0 l)))) (if (<= J -1.96e+80) t_0 (if (<= J 3.6e+39) U t_0))))
double code(double J, double l, double K, double U) {
double t_0 = J * (2.0 * l);
double tmp;
if (J <= -1.96e+80) {
tmp = t_0;
} else if (J <= 3.6e+39) {
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 (j <= (-1.96d+80)) then
tmp = t_0
else if (j <= 3.6d+39) 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 (J <= -1.96e+80) {
tmp = t_0;
} else if (J <= 3.6e+39) {
tmp = U;
} else {
tmp = t_0;
}
return tmp;
}
def code(J, l, K, U): t_0 = J * (2.0 * l) tmp = 0 if J <= -1.96e+80: tmp = t_0 elif J <= 3.6e+39: 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 (J <= -1.96e+80) tmp = t_0; elseif (J <= 3.6e+39) 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 (J <= -1.96e+80) tmp = t_0; elseif (J <= 3.6e+39) 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[J, -1.96e+80], t$95$0, If[LessEqual[J, 3.6e+39], U, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := J \cdot \left(2 \cdot \ell\right)\\
\mathbf{if}\;J \leq -1.96 \cdot 10^{+80}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;J \leq 3.6 \cdot 10^{+39}:\\
\;\;\;\;U\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if J < -1.9599999999999999e80 or 3.59999999999999984e39 < J Initial program 72.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6461.0%
Simplified61.0%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6454.4%
Simplified54.4%
Taylor expanded in J around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6442.8%
Simplified42.8%
if -1.9599999999999999e80 < J < 3.59999999999999984e39Initial program 93.1%
Taylor expanded in J around 0
Simplified47.6%
Final simplification45.6%
(FPCore (J l K U) :precision binary64 (if (<= l -1.7e+26) (* J (+ (* 2.0 l) (/ U J))) (+ U (* J (* 2.0 l)))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -1.7e+26) {
tmp = J * ((2.0 * l) + (U / J));
} else {
tmp = U + (J * (2.0 * 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 <= (-1.7d+26)) then
tmp = j * ((2.0d0 * l) + (u / j))
else
tmp = u + (j * (2.0d0 * l))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -1.7e+26) {
tmp = J * ((2.0 * l) + (U / J));
} else {
tmp = U + (J * (2.0 * l));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -1.7e+26: tmp = J * ((2.0 * l) + (U / J)) else: tmp = U + (J * (2.0 * l)) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -1.7e+26) tmp = Float64(J * Float64(Float64(2.0 * l) + Float64(U / J))); else tmp = Float64(U + Float64(J * Float64(2.0 * l))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -1.7e+26) tmp = J * ((2.0 * l) + (U / J)); else tmp = U + (J * (2.0 * l)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -1.7e+26], N[(J * N[(N[(2.0 * l), $MachinePrecision] + N[(U / J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.7 \cdot 10^{+26}:\\
\;\;\;\;J \cdot \left(2 \cdot \ell + \frac{U}{J}\right)\\
\mathbf{else}:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\end{array}
\end{array}
if l < -1.7000000000000001e26Initial program 100.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6473.2%
Simplified73.2%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6420.5%
Simplified20.5%
Taylor expanded in J around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6428.9%
Simplified28.9%
if -1.7000000000000001e26 < l Initial program 80.5%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.3%
Simplified71.3%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6462.0%
Simplified62.0%
Final simplification54.8%
(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 84.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.7%
Simplified71.7%
Taylor expanded in l around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.1%
Simplified72.1%
Final simplification72.1%
(FPCore (J l K U) :precision binary64 (if (<= l -2.8e+44) (* J (+ l (/ U J))) (+ U (* J (* 2.0 l)))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -2.8e+44) {
tmp = J * (l + (U / J));
} else {
tmp = U + (J * (2.0 * 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.8d+44)) then
tmp = j * (l + (u / j))
else
tmp = u + (j * (2.0d0 * l))
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -2.8e+44) {
tmp = J * (l + (U / J));
} else {
tmp = U + (J * (2.0 * l));
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -2.8e+44: tmp = J * (l + (U / J)) else: tmp = U + (J * (2.0 * l)) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -2.8e+44) tmp = Float64(J * Float64(l + Float64(U / J))); else tmp = Float64(U + Float64(J * Float64(2.0 * l))); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -2.8e+44) tmp = J * (l + (U / J)); else tmp = U + (J * (2.0 * l)); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -2.8e+44], N[(J * N[(l + N[(U / J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.8 \cdot 10^{+44}:\\
\;\;\;\;J \cdot \left(\ell + \frac{U}{J}\right)\\
\mathbf{else}:\\
\;\;\;\;U + J \cdot \left(2 \cdot \ell\right)\\
\end{array}
\end{array}
if l < -2.8000000000000001e44Initial program 100.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6472.2%
Simplified72.2%
Taylor expanded in l around 0
Simplified3.1%
Taylor expanded in J around inf
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
expm1-defineN/A
expm1-lowering-expm1.f6411.8%
Simplified11.8%
Taylor expanded in l around 0
Simplified29.8%
if -2.8000000000000001e44 < l Initial program 80.7%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.6%
Simplified71.6%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6461.5%
Simplified61.5%
Final simplification54.8%
(FPCore (J l K U) :precision binary64 (if (<= l -4e+45) (* J (+ l (/ U J))) (+ U (* J l))))
double code(double J, double l, double K, double U) {
double tmp;
if (l <= -4e+45) {
tmp = J * (l + (U / J));
} else {
tmp = U + (J * 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 <= (-4d+45)) then
tmp = j * (l + (u / j))
else
tmp = u + (j * l)
end if
code = tmp
end function
public static double code(double J, double l, double K, double U) {
double tmp;
if (l <= -4e+45) {
tmp = J * (l + (U / J));
} else {
tmp = U + (J * l);
}
return tmp;
}
def code(J, l, K, U): tmp = 0 if l <= -4e+45: tmp = J * (l + (U / J)) else: tmp = U + (J * l) return tmp
function code(J, l, K, U) tmp = 0.0 if (l <= -4e+45) tmp = Float64(J * Float64(l + Float64(U / J))); else tmp = Float64(U + Float64(J * l)); end return tmp end
function tmp_2 = code(J, l, K, U) tmp = 0.0; if (l <= -4e+45) tmp = J * (l + (U / J)); else tmp = U + (J * l); end tmp_2 = tmp; end
code[J_, l_, K_, U_] := If[LessEqual[l, -4e+45], N[(J * N[(l + N[(U / J), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(U + N[(J * l), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4 \cdot 10^{+45}:\\
\;\;\;\;J \cdot \left(\ell + \frac{U}{J}\right)\\
\mathbf{else}:\\
\;\;\;\;U + J \cdot \ell\\
\end{array}
\end{array}
if l < -3.9999999999999997e45Initial program 100.0%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6472.2%
Simplified72.2%
Taylor expanded in l around 0
Simplified3.1%
Taylor expanded in J around inf
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
expm1-defineN/A
expm1-lowering-expm1.f6411.8%
Simplified11.8%
Taylor expanded in l around 0
Simplified29.8%
if -3.9999999999999997e45 < l Initial program 80.7%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.6%
Simplified71.6%
Taylor expanded in l around 0
Simplified67.3%
Taylor expanded in l around 0
*-lowering-*.f6452.2%
Simplified52.2%
Final simplification47.5%
(FPCore (J l K U) :precision binary64 (* U (+ 1.0 (/ (* J (* 2.0 l)) U))))
double code(double J, double l, double K, double U) {
return U * (1.0 + ((J * (2.0 * l)) / U));
}
real(8) function code(j, l, k, u)
real(8), intent (in) :: j
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8), intent (in) :: u
code = u * (1.0d0 + ((j * (2.0d0 * l)) / u))
end function
public static double code(double J, double l, double K, double U) {
return U * (1.0 + ((J * (2.0 * l)) / U));
}
def code(J, l, K, U): return U * (1.0 + ((J * (2.0 * l)) / U))
function code(J, l, K, U) return Float64(U * Float64(1.0 + Float64(Float64(J * Float64(2.0 * l)) / U))) end
function tmp = code(J, l, K, U) tmp = U * (1.0 + ((J * (2.0 * l)) / U)); end
code[J_, l_, K_, U_] := N[(U * N[(1.0 + N[(N[(J * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U \cdot \left(1 + \frac{J \cdot \left(2 \cdot \ell\right)}{U}\right)
\end{array}
Initial program 84.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.7%
Simplified71.7%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6452.9%
Simplified52.9%
Taylor expanded in U around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
associate-*r*N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.3%
Simplified57.3%
Final simplification57.3%
(FPCore (J l K U) :precision binary64 (+ U (* J l)))
double code(double J, double l, double K, double U) {
return U + (J * 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 * l)
end function
public static double code(double J, double l, double K, double U) {
return U + (J * l);
}
def code(J, l, K, U): return U + (J * l)
function code(J, l, K, U) return Float64(U + Float64(J * l)) end
function tmp = code(J, l, K, U) tmp = U + (J * l); end
code[J_, l_, K_, U_] := N[(U + N[(J * l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
U + J \cdot \ell
\end{array}
Initial program 84.8%
Taylor expanded in K around 0
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
exp-lowering-exp.f64N/A
exp-negN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6471.7%
Simplified71.7%
Taylor expanded in l around 0
Simplified53.7%
Taylor expanded in l around 0
*-lowering-*.f6445.6%
Simplified45.6%
Final simplification45.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 84.8%
Taylor expanded in J around 0
Simplified33.8%
herbie shell --seed 2024152
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))