
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (* a b) (+ (* x y) (* z t))) (* c i)))) (if (<= t_1 INFINITY) t_1 (* y (+ x (/ (* c i) y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = y * (x + ((c * i) / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = y * (x + ((c * i) / y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = y * (x + ((c * i) / y)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(y * Float64(x + Float64(Float64(c * i) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = y * (x + ((c * i) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(y * N[(x + N[(N[(c * i), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right) + c \cdot i\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x + \frac{c \cdot i}{y}\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in z around 0 40.0%
Taylor expanded in a around 0 50.1%
Taylor expanded in y around inf 60.1%
Final simplification98.4%
(FPCore (x y z t a b c i) :precision binary64 (fma c i (fma a b (fma x y (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(c, i, fma(a, b, fma(x, y, (z * t))));
}
function code(x, y, z, t, a, b, c, i) return fma(c, i, fma(a, b, fma(x, y, Float64(z * t)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(c * i + N[(a * b + N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(c, i, \mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, z \cdot t\right)\right)\right)
\end{array}
Initial program 96.1%
+-commutative96.1%
fma-define96.5%
+-commutative96.5%
fma-define97.3%
fma-define97.6%
Simplified97.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -3.5e+108)
(* x y)
(if (<= (* x y) -2.6e+65)
(* a b)
(if (<= (* x y) -0.000205)
(* c i)
(if (<= (* x y) -3e-85)
(* a b)
(if (<= (* x y) -1.5e-132)
(* z t)
(if (<= (* x y) -5e-210)
(* a b)
(if (<= (* x y) 9.8e+53)
(* c i)
(if (<= (* x y) 1.45e+162) (* a b) (* x y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -3.5e+108) {
tmp = x * y;
} else if ((x * y) <= -2.6e+65) {
tmp = a * b;
} else if ((x * y) <= -0.000205) {
tmp = c * i;
} else if ((x * y) <= -3e-85) {
tmp = a * b;
} else if ((x * y) <= -1.5e-132) {
tmp = z * t;
} else if ((x * y) <= -5e-210) {
tmp = a * b;
} else if ((x * y) <= 9.8e+53) {
tmp = c * i;
} else if ((x * y) <= 1.45e+162) {
tmp = a * b;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-3.5d+108)) then
tmp = x * y
else if ((x * y) <= (-2.6d+65)) then
tmp = a * b
else if ((x * y) <= (-0.000205d0)) then
tmp = c * i
else if ((x * y) <= (-3d-85)) then
tmp = a * b
else if ((x * y) <= (-1.5d-132)) then
tmp = z * t
else if ((x * y) <= (-5d-210)) then
tmp = a * b
else if ((x * y) <= 9.8d+53) then
tmp = c * i
else if ((x * y) <= 1.45d+162) then
tmp = a * b
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -3.5e+108) {
tmp = x * y;
} else if ((x * y) <= -2.6e+65) {
tmp = a * b;
} else if ((x * y) <= -0.000205) {
tmp = c * i;
} else if ((x * y) <= -3e-85) {
tmp = a * b;
} else if ((x * y) <= -1.5e-132) {
tmp = z * t;
} else if ((x * y) <= -5e-210) {
tmp = a * b;
} else if ((x * y) <= 9.8e+53) {
tmp = c * i;
} else if ((x * y) <= 1.45e+162) {
tmp = a * b;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -3.5e+108: tmp = x * y elif (x * y) <= -2.6e+65: tmp = a * b elif (x * y) <= -0.000205: tmp = c * i elif (x * y) <= -3e-85: tmp = a * b elif (x * y) <= -1.5e-132: tmp = z * t elif (x * y) <= -5e-210: tmp = a * b elif (x * y) <= 9.8e+53: tmp = c * i elif (x * y) <= 1.45e+162: tmp = a * b else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -3.5e+108) tmp = Float64(x * y); elseif (Float64(x * y) <= -2.6e+65) tmp = Float64(a * b); elseif (Float64(x * y) <= -0.000205) tmp = Float64(c * i); elseif (Float64(x * y) <= -3e-85) tmp = Float64(a * b); elseif (Float64(x * y) <= -1.5e-132) tmp = Float64(z * t); elseif (Float64(x * y) <= -5e-210) tmp = Float64(a * b); elseif (Float64(x * y) <= 9.8e+53) tmp = Float64(c * i); elseif (Float64(x * y) <= 1.45e+162) tmp = Float64(a * b); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -3.5e+108) tmp = x * y; elseif ((x * y) <= -2.6e+65) tmp = a * b; elseif ((x * y) <= -0.000205) tmp = c * i; elseif ((x * y) <= -3e-85) tmp = a * b; elseif ((x * y) <= -1.5e-132) tmp = z * t; elseif ((x * y) <= -5e-210) tmp = a * b; elseif ((x * y) <= 9.8e+53) tmp = c * i; elseif ((x * y) <= 1.45e+162) tmp = a * b; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -3.5e+108], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2.6e+65], N[(a * b), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -0.000205], N[(c * i), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -3e-85], N[(a * b), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.5e-132], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-210], N[(a * b), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 9.8e+53], N[(c * i), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.45e+162], N[(a * b), $MachinePrecision], N[(x * y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.5 \cdot 10^{+108}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -2.6 \cdot 10^{+65}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \cdot y \leq -0.000205:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;x \cdot y \leq -3 \cdot 10^{-85}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \cdot y \leq -1.5 \cdot 10^{-132}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-210}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \cdot y \leq 9.8 \cdot 10^{+53}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 1.45 \cdot 10^{+162}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -3.5000000000000002e108 or 1.45000000000000003e162 < (*.f64 x y) Initial program 91.5%
Taylor expanded in x around inf 72.7%
if -3.5000000000000002e108 < (*.f64 x y) < -2.60000000000000003e65 or -2.05e-4 < (*.f64 x y) < -3.00000000000000022e-85 or -1.5e-132 < (*.f64 x y) < -5.0000000000000002e-210 or 9.80000000000000036e53 < (*.f64 x y) < 1.45000000000000003e162Initial program 98.2%
Taylor expanded in a around inf 62.1%
if -2.60000000000000003e65 < (*.f64 x y) < -2.05e-4 or -5.0000000000000002e-210 < (*.f64 x y) < 9.80000000000000036e53Initial program 97.3%
Taylor expanded in c around inf 43.5%
if -3.00000000000000022e-85 < (*.f64 x y) < -1.5e-132Initial program 100.0%
Taylor expanded in z around inf 60.4%
Final simplification56.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))) (t_2 (+ (* x y) (* a b))))
(if (<= (* a b) -6e-13)
t_2
(if (<= (* a b) -5e-317)
t_1
(if (<= (* a b) 4e-312)
(+ (* x y) (* c i))
(if (or (<= (* a b) 5e-93)
(and (not (<= (* a b) 4.5e-18)) (<= (* a b) 6.2e+156)))
t_1
t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double t_2 = (x * y) + (a * b);
double tmp;
if ((a * b) <= -6e-13) {
tmp = t_2;
} else if ((a * b) <= -5e-317) {
tmp = t_1;
} else if ((a * b) <= 4e-312) {
tmp = (x * y) + (c * i);
} else if (((a * b) <= 5e-93) || (!((a * b) <= 4.5e-18) && ((a * b) <= 6.2e+156))) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (c * i) + (z * t)
t_2 = (x * y) + (a * b)
if ((a * b) <= (-6d-13)) then
tmp = t_2
else if ((a * b) <= (-5d-317)) then
tmp = t_1
else if ((a * b) <= 4d-312) then
tmp = (x * y) + (c * i)
else if (((a * b) <= 5d-93) .or. (.not. ((a * b) <= 4.5d-18)) .and. ((a * b) <= 6.2d+156)) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double t_2 = (x * y) + (a * b);
double tmp;
if ((a * b) <= -6e-13) {
tmp = t_2;
} else if ((a * b) <= -5e-317) {
tmp = t_1;
} else if ((a * b) <= 4e-312) {
tmp = (x * y) + (c * i);
} else if (((a * b) <= 5e-93) || (!((a * b) <= 4.5e-18) && ((a * b) <= 6.2e+156))) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) t_2 = (x * y) + (a * b) tmp = 0 if (a * b) <= -6e-13: tmp = t_2 elif (a * b) <= -5e-317: tmp = t_1 elif (a * b) <= 4e-312: tmp = (x * y) + (c * i) elif ((a * b) <= 5e-93) or (not ((a * b) <= 4.5e-18) and ((a * b) <= 6.2e+156)): tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(z * t)) t_2 = Float64(Float64(x * y) + Float64(a * b)) tmp = 0.0 if (Float64(a * b) <= -6e-13) tmp = t_2; elseif (Float64(a * b) <= -5e-317) tmp = t_1; elseif (Float64(a * b) <= 4e-312) tmp = Float64(Float64(x * y) + Float64(c * i)); elseif ((Float64(a * b) <= 5e-93) || (!(Float64(a * b) <= 4.5e-18) && (Float64(a * b) <= 6.2e+156))) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + (z * t); t_2 = (x * y) + (a * b); tmp = 0.0; if ((a * b) <= -6e-13) tmp = t_2; elseif ((a * b) <= -5e-317) tmp = t_1; elseif ((a * b) <= 4e-312) tmp = (x * y) + (c * i); elseif (((a * b) <= 5e-93) || (~(((a * b) <= 4.5e-18)) && ((a * b) <= 6.2e+156))) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -6e-13], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -5e-317], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 4e-312], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * b), $MachinePrecision], 5e-93], And[N[Not[LessEqual[N[(a * b), $MachinePrecision], 4.5e-18]], $MachinePrecision], LessEqual[N[(a * b), $MachinePrecision], 6.2e+156]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
t_2 := x \cdot y + a \cdot b\\
\mathbf{if}\;a \cdot b \leq -6 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-317}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{-312}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-93} \lor \neg \left(a \cdot b \leq 4.5 \cdot 10^{-18}\right) \land a \cdot b \leq 6.2 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 a b) < -5.99999999999999968e-13 or 4.99999999999999994e-93 < (*.f64 a b) < 4.49999999999999994e-18 or 6.2000000000000004e156 < (*.f64 a b) Initial program 94.8%
Taylor expanded in z around 0 85.7%
Taylor expanded in c around 0 76.6%
if -5.99999999999999968e-13 < (*.f64 a b) < -5.00000017e-317 or 3.9999999999988e-312 < (*.f64 a b) < 4.99999999999999994e-93 or 4.49999999999999994e-18 < (*.f64 a b) < 6.2000000000000004e156Initial program 97.3%
Taylor expanded in a around inf 81.0%
associate-/l*74.0%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in t around inf 74.5%
if -5.00000017e-317 < (*.f64 a b) < 3.9999999999988e-312Initial program 96.5%
Taylor expanded in z around 0 86.6%
Taylor expanded in a around 0 86.6%
Final simplification76.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* t (+ z (/ (* c i) t)))) (t_2 (+ (* x y) (* a b))))
(if (<= (* a b) -1.7e-12)
t_2
(if (<= (* a b) -5e-317)
t_1
(if (<= (* a b) 4e-312)
(+ (* x y) (* c i))
(if (<= (* a b) 9.8e-157)
t_1
(if (<= (* a b) 2.5e+28)
(+ (* x y) (* z t))
(if (<= (* a b) 2.5e+156) (+ (* c i) (* z t)) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t * (z + ((c * i) / t));
double t_2 = (x * y) + (a * b);
double tmp;
if ((a * b) <= -1.7e-12) {
tmp = t_2;
} else if ((a * b) <= -5e-317) {
tmp = t_1;
} else if ((a * b) <= 4e-312) {
tmp = (x * y) + (c * i);
} else if ((a * b) <= 9.8e-157) {
tmp = t_1;
} else if ((a * b) <= 2.5e+28) {
tmp = (x * y) + (z * t);
} else if ((a * b) <= 2.5e+156) {
tmp = (c * i) + (z * t);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (z + ((c * i) / t))
t_2 = (x * y) + (a * b)
if ((a * b) <= (-1.7d-12)) then
tmp = t_2
else if ((a * b) <= (-5d-317)) then
tmp = t_1
else if ((a * b) <= 4d-312) then
tmp = (x * y) + (c * i)
else if ((a * b) <= 9.8d-157) then
tmp = t_1
else if ((a * b) <= 2.5d+28) then
tmp = (x * y) + (z * t)
else if ((a * b) <= 2.5d+156) then
tmp = (c * i) + (z * t)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t * (z + ((c * i) / t));
double t_2 = (x * y) + (a * b);
double tmp;
if ((a * b) <= -1.7e-12) {
tmp = t_2;
} else if ((a * b) <= -5e-317) {
tmp = t_1;
} else if ((a * b) <= 4e-312) {
tmp = (x * y) + (c * i);
} else if ((a * b) <= 9.8e-157) {
tmp = t_1;
} else if ((a * b) <= 2.5e+28) {
tmp = (x * y) + (z * t);
} else if ((a * b) <= 2.5e+156) {
tmp = (c * i) + (z * t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t * (z + ((c * i) / t)) t_2 = (x * y) + (a * b) tmp = 0 if (a * b) <= -1.7e-12: tmp = t_2 elif (a * b) <= -5e-317: tmp = t_1 elif (a * b) <= 4e-312: tmp = (x * y) + (c * i) elif (a * b) <= 9.8e-157: tmp = t_1 elif (a * b) <= 2.5e+28: tmp = (x * y) + (z * t) elif (a * b) <= 2.5e+156: tmp = (c * i) + (z * t) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t * Float64(z + Float64(Float64(c * i) / t))) t_2 = Float64(Float64(x * y) + Float64(a * b)) tmp = 0.0 if (Float64(a * b) <= -1.7e-12) tmp = t_2; elseif (Float64(a * b) <= -5e-317) tmp = t_1; elseif (Float64(a * b) <= 4e-312) tmp = Float64(Float64(x * y) + Float64(c * i)); elseif (Float64(a * b) <= 9.8e-157) tmp = t_1; elseif (Float64(a * b) <= 2.5e+28) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (Float64(a * b) <= 2.5e+156) tmp = Float64(Float64(c * i) + Float64(z * t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t * (z + ((c * i) / t)); t_2 = (x * y) + (a * b); tmp = 0.0; if ((a * b) <= -1.7e-12) tmp = t_2; elseif ((a * b) <= -5e-317) tmp = t_1; elseif ((a * b) <= 4e-312) tmp = (x * y) + (c * i); elseif ((a * b) <= 9.8e-157) tmp = t_1; elseif ((a * b) <= 2.5e+28) tmp = (x * y) + (z * t); elseif ((a * b) <= 2.5e+156) tmp = (c * i) + (z * t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t * N[(z + N[(N[(c * i), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.7e-12], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -5e-317], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 4e-312], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 9.8e-157], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 2.5e+28], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2.5e+156], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(z + \frac{c \cdot i}{t}\right)\\
t_2 := x \cdot y + a \cdot b\\
\mathbf{if}\;a \cdot b \leq -1.7 \cdot 10^{-12}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-317}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{-312}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 9.8 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 2.5 \cdot 10^{+28}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 2.5 \cdot 10^{+156}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1.7e-12 or 2.49999999999999996e156 < (*.f64 a b) Initial program 94.0%
Taylor expanded in z around 0 86.5%
Taylor expanded in c around 0 77.1%
if -1.7e-12 < (*.f64 a b) < -5.00000017e-317 or 3.9999999999988e-312 < (*.f64 a b) < 9.7999999999999995e-157Initial program 95.3%
Taylor expanded in a around inf 77.5%
associate-/l*68.6%
associate-/l*67.0%
Simplified67.0%
Taylor expanded in t around inf 77.3%
Taylor expanded in t around inf 74.7%
if -5.00000017e-317 < (*.f64 a b) < 3.9999999999988e-312Initial program 96.5%
Taylor expanded in z around 0 86.6%
Taylor expanded in a around 0 86.6%
if 9.7999999999999995e-157 < (*.f64 a b) < 2.49999999999999979e28Initial program 100.0%
Taylor expanded in a around 0 90.6%
Taylor expanded in c around 0 68.7%
if 2.49999999999999979e28 < (*.f64 a b) < 2.49999999999999996e156Initial program 99.9%
Taylor expanded in a around inf 93.6%
associate-/l*90.2%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in t around inf 70.5%
Final simplification75.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))) (t_2 (+ (* x y) (* a b))))
(if (<= (* a b) -1.12e-11)
t_2
(if (<= (* a b) -5e-317)
t_1
(if (<= (* a b) 4e-312)
(+ (* x y) (* c i))
(if (<= (* a b) 2.1e-125)
t_1
(if (<= (* a b) 3.3e+28)
(+ (* x y) (* z t))
(if (<= (* a b) 8e+160) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double t_2 = (x * y) + (a * b);
double tmp;
if ((a * b) <= -1.12e-11) {
tmp = t_2;
} else if ((a * b) <= -5e-317) {
tmp = t_1;
} else if ((a * b) <= 4e-312) {
tmp = (x * y) + (c * i);
} else if ((a * b) <= 2.1e-125) {
tmp = t_1;
} else if ((a * b) <= 3.3e+28) {
tmp = (x * y) + (z * t);
} else if ((a * b) <= 8e+160) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (c * i) + (z * t)
t_2 = (x * y) + (a * b)
if ((a * b) <= (-1.12d-11)) then
tmp = t_2
else if ((a * b) <= (-5d-317)) then
tmp = t_1
else if ((a * b) <= 4d-312) then
tmp = (x * y) + (c * i)
else if ((a * b) <= 2.1d-125) then
tmp = t_1
else if ((a * b) <= 3.3d+28) then
tmp = (x * y) + (z * t)
else if ((a * b) <= 8d+160) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double t_2 = (x * y) + (a * b);
double tmp;
if ((a * b) <= -1.12e-11) {
tmp = t_2;
} else if ((a * b) <= -5e-317) {
tmp = t_1;
} else if ((a * b) <= 4e-312) {
tmp = (x * y) + (c * i);
} else if ((a * b) <= 2.1e-125) {
tmp = t_1;
} else if ((a * b) <= 3.3e+28) {
tmp = (x * y) + (z * t);
} else if ((a * b) <= 8e+160) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) t_2 = (x * y) + (a * b) tmp = 0 if (a * b) <= -1.12e-11: tmp = t_2 elif (a * b) <= -5e-317: tmp = t_1 elif (a * b) <= 4e-312: tmp = (x * y) + (c * i) elif (a * b) <= 2.1e-125: tmp = t_1 elif (a * b) <= 3.3e+28: tmp = (x * y) + (z * t) elif (a * b) <= 8e+160: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(z * t)) t_2 = Float64(Float64(x * y) + Float64(a * b)) tmp = 0.0 if (Float64(a * b) <= -1.12e-11) tmp = t_2; elseif (Float64(a * b) <= -5e-317) tmp = t_1; elseif (Float64(a * b) <= 4e-312) tmp = Float64(Float64(x * y) + Float64(c * i)); elseif (Float64(a * b) <= 2.1e-125) tmp = t_1; elseif (Float64(a * b) <= 3.3e+28) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (Float64(a * b) <= 8e+160) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + (z * t); t_2 = (x * y) + (a * b); tmp = 0.0; if ((a * b) <= -1.12e-11) tmp = t_2; elseif ((a * b) <= -5e-317) tmp = t_1; elseif ((a * b) <= 4e-312) tmp = (x * y) + (c * i); elseif ((a * b) <= 2.1e-125) tmp = t_1; elseif ((a * b) <= 3.3e+28) tmp = (x * y) + (z * t); elseif ((a * b) <= 8e+160) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.12e-11], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -5e-317], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 4e-312], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2.1e-125], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 3.3e+28], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 8e+160], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
t_2 := x \cdot y + a \cdot b\\
\mathbf{if}\;a \cdot b \leq -1.12 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-317}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{-312}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 2.1 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 3.3 \cdot 10^{+28}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 8 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1.1200000000000001e-11 or 8.00000000000000005e160 < (*.f64 a b) Initial program 94.0%
Taylor expanded in z around 0 86.5%
Taylor expanded in c around 0 77.1%
if -1.1200000000000001e-11 < (*.f64 a b) < -5.00000017e-317 or 3.9999999999988e-312 < (*.f64 a b) < 2.1e-125 or 3.3e28 < (*.f64 a b) < 8.00000000000000005e160Initial program 96.9%
Taylor expanded in a around inf 82.3%
associate-/l*75.4%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in t around inf 75.2%
if -5.00000017e-317 < (*.f64 a b) < 3.9999999999988e-312Initial program 96.5%
Taylor expanded in z around 0 86.6%
Taylor expanded in a around 0 86.6%
if 2.1e-125 < (*.f64 a b) < 3.3e28Initial program 100.0%
Taylor expanded in a around 0 89.2%
Taylor expanded in c around 0 67.6%
Final simplification76.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* a b) -2.55e+64)
(* a b)
(if (<= (* a b) -7.2e-143)
(* c i)
(if (<= (* a b) -5e-317)
(* z t)
(if (<= (* a b) 2.3e-214)
(* c i)
(if (<= (* a b) 1.7e-16)
(* z t)
(if (<= (* a b) 5.3e+101) (* c i) (* a b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -2.55e+64) {
tmp = a * b;
} else if ((a * b) <= -7.2e-143) {
tmp = c * i;
} else if ((a * b) <= -5e-317) {
tmp = z * t;
} else if ((a * b) <= 2.3e-214) {
tmp = c * i;
} else if ((a * b) <= 1.7e-16) {
tmp = z * t;
} else if ((a * b) <= 5.3e+101) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((a * b) <= (-2.55d+64)) then
tmp = a * b
else if ((a * b) <= (-7.2d-143)) then
tmp = c * i
else if ((a * b) <= (-5d-317)) then
tmp = z * t
else if ((a * b) <= 2.3d-214) then
tmp = c * i
else if ((a * b) <= 1.7d-16) then
tmp = z * t
else if ((a * b) <= 5.3d+101) then
tmp = c * i
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -2.55e+64) {
tmp = a * b;
} else if ((a * b) <= -7.2e-143) {
tmp = c * i;
} else if ((a * b) <= -5e-317) {
tmp = z * t;
} else if ((a * b) <= 2.3e-214) {
tmp = c * i;
} else if ((a * b) <= 1.7e-16) {
tmp = z * t;
} else if ((a * b) <= 5.3e+101) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -2.55e+64: tmp = a * b elif (a * b) <= -7.2e-143: tmp = c * i elif (a * b) <= -5e-317: tmp = z * t elif (a * b) <= 2.3e-214: tmp = c * i elif (a * b) <= 1.7e-16: tmp = z * t elif (a * b) <= 5.3e+101: tmp = c * i else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(a * b) <= -2.55e+64) tmp = Float64(a * b); elseif (Float64(a * b) <= -7.2e-143) tmp = Float64(c * i); elseif (Float64(a * b) <= -5e-317) tmp = Float64(z * t); elseif (Float64(a * b) <= 2.3e-214) tmp = Float64(c * i); elseif (Float64(a * b) <= 1.7e-16) tmp = Float64(z * t); elseif (Float64(a * b) <= 5.3e+101) tmp = Float64(c * i); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((a * b) <= -2.55e+64) tmp = a * b; elseif ((a * b) <= -7.2e-143) tmp = c * i; elseif ((a * b) <= -5e-317) tmp = z * t; elseif ((a * b) <= 2.3e-214) tmp = c * i; elseif ((a * b) <= 1.7e-16) tmp = z * t; elseif ((a * b) <= 5.3e+101) tmp = c * i; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -2.55e+64], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -7.2e-143], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -5e-317], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2.3e-214], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.7e-16], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5.3e+101], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2.55 \cdot 10^{+64}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq -7.2 \cdot 10^{-143}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-317}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 2.3 \cdot 10^{-214}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 1.7 \cdot 10^{-16}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 5.3 \cdot 10^{+101}:\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -2.55000000000000012e64 or 5.30000000000000006e101 < (*.f64 a b) Initial program 94.0%
Taylor expanded in a around inf 59.2%
if -2.55000000000000012e64 < (*.f64 a b) < -7.1999999999999996e-143 or -5.00000017e-317 < (*.f64 a b) < 2.30000000000000011e-214 or 1.7e-16 < (*.f64 a b) < 5.30000000000000006e101Initial program 97.1%
Taylor expanded in c around inf 44.3%
if -7.1999999999999996e-143 < (*.f64 a b) < -5.00000017e-317 or 2.30000000000000011e-214 < (*.f64 a b) < 1.7e-16Initial program 98.0%
Taylor expanded in z around inf 49.2%
Final simplification51.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))) (t_2 (+ (* a b) (* c i))))
(if (<= (* c i) -3.6e+178)
t_2
(if (<= (* c i) -6e-16)
t_1
(if (<= (* c i) -2.8e-46)
(* y (+ x (/ (* a b) y)))
(if (<= (* c i) -2.4e-77)
t_1
(if (<= (* c i) 21000000000000.0) (+ (* x y) (* a b)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double t_2 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -3.6e+178) {
tmp = t_2;
} else if ((c * i) <= -6e-16) {
tmp = t_1;
} else if ((c * i) <= -2.8e-46) {
tmp = y * (x + ((a * b) / y));
} else if ((c * i) <= -2.4e-77) {
tmp = t_1;
} else if ((c * i) <= 21000000000000.0) {
tmp = (x * y) + (a * b);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * y) + (z * t)
t_2 = (a * b) + (c * i)
if ((c * i) <= (-3.6d+178)) then
tmp = t_2
else if ((c * i) <= (-6d-16)) then
tmp = t_1
else if ((c * i) <= (-2.8d-46)) then
tmp = y * (x + ((a * b) / y))
else if ((c * i) <= (-2.4d-77)) then
tmp = t_1
else if ((c * i) <= 21000000000000.0d0) then
tmp = (x * y) + (a * b)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double t_2 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -3.6e+178) {
tmp = t_2;
} else if ((c * i) <= -6e-16) {
tmp = t_1;
} else if ((c * i) <= -2.8e-46) {
tmp = y * (x + ((a * b) / y));
} else if ((c * i) <= -2.4e-77) {
tmp = t_1;
} else if ((c * i) <= 21000000000000.0) {
tmp = (x * y) + (a * b);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) t_2 = (a * b) + (c * i) tmp = 0 if (c * i) <= -3.6e+178: tmp = t_2 elif (c * i) <= -6e-16: tmp = t_1 elif (c * i) <= -2.8e-46: tmp = y * (x + ((a * b) / y)) elif (c * i) <= -2.4e-77: tmp = t_1 elif (c * i) <= 21000000000000.0: tmp = (x * y) + (a * b) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) t_2 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (Float64(c * i) <= -3.6e+178) tmp = t_2; elseif (Float64(c * i) <= -6e-16) tmp = t_1; elseif (Float64(c * i) <= -2.8e-46) tmp = Float64(y * Float64(x + Float64(Float64(a * b) / y))); elseif (Float64(c * i) <= -2.4e-77) tmp = t_1; elseif (Float64(c * i) <= 21000000000000.0) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); t_2 = (a * b) + (c * i); tmp = 0.0; if ((c * i) <= -3.6e+178) tmp = t_2; elseif ((c * i) <= -6e-16) tmp = t_1; elseif ((c * i) <= -2.8e-46) tmp = y * (x + ((a * b) / y)); elseif ((c * i) <= -2.4e-77) tmp = t_1; elseif ((c * i) <= 21000000000000.0) tmp = (x * y) + (a * b); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -3.6e+178], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], -6e-16], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -2.8e-46], N[(y * N[(x + N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -2.4e-77], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 21000000000000.0], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
t_2 := a \cdot b + c \cdot i\\
\mathbf{if}\;c \cdot i \leq -3.6 \cdot 10^{+178}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \cdot i \leq -6 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq -2.8 \cdot 10^{-46}:\\
\;\;\;\;y \cdot \left(x + \frac{a \cdot b}{y}\right)\\
\mathbf{elif}\;c \cdot i \leq -2.4 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 21000000000000:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 c i) < -3.5999999999999998e178 or 2.1e13 < (*.f64 c i) Initial program 93.4%
Taylor expanded in z around 0 88.1%
Taylor expanded in x around 0 79.1%
if -3.5999999999999998e178 < (*.f64 c i) < -5.99999999999999987e-16 or -2.7999999999999998e-46 < (*.f64 c i) < -2.3999999999999999e-77Initial program 93.4%
Taylor expanded in a around 0 80.8%
Taylor expanded in c around 0 74.7%
if -5.99999999999999987e-16 < (*.f64 c i) < -2.7999999999999998e-46Initial program 100.0%
Taylor expanded in z around 0 78.5%
Taylor expanded in y around inf 78.6%
Taylor expanded in c around 0 79.4%
if -2.3999999999999999e-77 < (*.f64 c i) < 2.1e13Initial program 99.1%
Taylor expanded in z around 0 74.5%
Taylor expanded in c around 0 72.2%
Final simplification75.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* c i))))
(if (<= (* x y) -7e+225)
(* x y)
(if (<= (* x y) -1.6e-85)
t_1
(if (<= (* x y) -1.8e-132)
(* z t)
(if (<= (* x y) 1.95e+230) t_1 (* x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (c * i);
double tmp;
if ((x * y) <= -7e+225) {
tmp = x * y;
} else if ((x * y) <= -1.6e-85) {
tmp = t_1;
} else if ((x * y) <= -1.8e-132) {
tmp = z * t;
} else if ((x * y) <= 1.95e+230) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (a * b) + (c * i)
if ((x * y) <= (-7d+225)) then
tmp = x * y
else if ((x * y) <= (-1.6d-85)) then
tmp = t_1
else if ((x * y) <= (-1.8d-132)) then
tmp = z * t
else if ((x * y) <= 1.95d+230) then
tmp = t_1
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (c * i);
double tmp;
if ((x * y) <= -7e+225) {
tmp = x * y;
} else if ((x * y) <= -1.6e-85) {
tmp = t_1;
} else if ((x * y) <= -1.8e-132) {
tmp = z * t;
} else if ((x * y) <= 1.95e+230) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (c * i) tmp = 0 if (x * y) <= -7e+225: tmp = x * y elif (x * y) <= -1.6e-85: tmp = t_1 elif (x * y) <= -1.8e-132: tmp = z * t elif (x * y) <= 1.95e+230: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (Float64(x * y) <= -7e+225) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.6e-85) tmp = t_1; elseif (Float64(x * y) <= -1.8e-132) tmp = Float64(z * t); elseif (Float64(x * y) <= 1.95e+230) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (c * i); tmp = 0.0; if ((x * y) <= -7e+225) tmp = x * y; elseif ((x * y) <= -1.6e-85) tmp = t_1; elseif ((x * y) <= -1.8e-132) tmp = z * t; elseif ((x * y) <= 1.95e+230) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -7e+225], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.6e-85], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1.8e-132], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.95e+230], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + c \cdot i\\
\mathbf{if}\;x \cdot y \leq -7 \cdot 10^{+225}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.6 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -1.8 \cdot 10^{-132}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 1.95 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -7.0000000000000006e225 or 1.9499999999999999e230 < (*.f64 x y) Initial program 90.7%
Taylor expanded in x around inf 86.0%
if -7.0000000000000006e225 < (*.f64 x y) < -1.60000000000000014e-85 or -1.80000000000000004e-132 < (*.f64 x y) < 1.9499999999999999e230Initial program 97.3%
Taylor expanded in z around 0 74.8%
Taylor expanded in x around 0 66.0%
if -1.60000000000000014e-85 < (*.f64 x y) < -1.80000000000000004e-132Initial program 100.0%
Taylor expanded in z around inf 60.4%
Final simplification69.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))))
(if (<= z -1.12e+266)
t_1
(if (<= z -2.5e+247)
(+ (* x y) (* z t))
(if (<= z -8.5e+138) t_1 (+ (* c i) (+ (* x y) (* a b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if (z <= -1.12e+266) {
tmp = t_1;
} else if (z <= -2.5e+247) {
tmp = (x * y) + (z * t);
} else if (z <= -8.5e+138) {
tmp = t_1;
} else {
tmp = (c * i) + ((x * y) + (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * i) + (z * t)
if (z <= (-1.12d+266)) then
tmp = t_1
else if (z <= (-2.5d+247)) then
tmp = (x * y) + (z * t)
else if (z <= (-8.5d+138)) then
tmp = t_1
else
tmp = (c * i) + ((x * y) + (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if (z <= -1.12e+266) {
tmp = t_1;
} else if (z <= -2.5e+247) {
tmp = (x * y) + (z * t);
} else if (z <= -8.5e+138) {
tmp = t_1;
} else {
tmp = (c * i) + ((x * y) + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) tmp = 0 if z <= -1.12e+266: tmp = t_1 elif z <= -2.5e+247: tmp = (x * y) + (z * t) elif z <= -8.5e+138: tmp = t_1 else: tmp = (c * i) + ((x * y) + (a * b)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(z * t)) tmp = 0.0 if (z <= -1.12e+266) tmp = t_1; elseif (z <= -2.5e+247) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (z <= -8.5e+138) tmp = t_1; else tmp = Float64(Float64(c * i) + Float64(Float64(x * y) + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + (z * t); tmp = 0.0; if (z <= -1.12e+266) tmp = t_1; elseif (z <= -2.5e+247) tmp = (x * y) + (z * t); elseif (z <= -8.5e+138) tmp = t_1; else tmp = (c * i) + ((x * y) + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.12e+266], t$95$1, If[LessEqual[z, -2.5e+247], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.5e+138], t$95$1, N[(N[(c * i), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+266}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+247}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(x \cdot y + a \cdot b\right)\\
\end{array}
\end{array}
if z < -1.11999999999999996e266 or -2.50000000000000011e247 < z < -8.5000000000000006e138Initial program 91.0%
Taylor expanded in a around inf 77.3%
associate-/l*66.1%
associate-/l*66.1%
Simplified66.1%
Taylor expanded in t around inf 72.7%
if -1.11999999999999996e266 < z < -2.50000000000000011e247Initial program 100.0%
Taylor expanded in a around 0 63.0%
Taylor expanded in c around 0 63.0%
if -8.5000000000000006e138 < z Initial program 96.8%
Taylor expanded in z around 0 80.2%
Final simplification78.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* a b) -1.05e-11) (not (<= (* a b) 6.1e+150))) (+ (* c i) (+ (* x y) (* a b))) (+ (* c i) (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((a * b) <= -1.05e-11) || !((a * b) <= 6.1e+150)) {
tmp = (c * i) + ((x * y) + (a * b));
} else {
tmp = (c * i) + ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((a * b) <= (-1.05d-11)) .or. (.not. ((a * b) <= 6.1d+150))) then
tmp = (c * i) + ((x * y) + (a * b))
else
tmp = (c * i) + ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((a * b) <= -1.05e-11) || !((a * b) <= 6.1e+150)) {
tmp = (c * i) + ((x * y) + (a * b));
} else {
tmp = (c * i) + ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((a * b) <= -1.05e-11) or not ((a * b) <= 6.1e+150): tmp = (c * i) + ((x * y) + (a * b)) else: tmp = (c * i) + ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(a * b) <= -1.05e-11) || !(Float64(a * b) <= 6.1e+150)) tmp = Float64(Float64(c * i) + Float64(Float64(x * y) + Float64(a * b))); else tmp = Float64(Float64(c * i) + Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((a * b) <= -1.05e-11) || ~(((a * b) <= 6.1e+150))) tmp = (c * i) + ((x * y) + (a * b)); else tmp = (c * i) + ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -1.05e-11], N[Not[LessEqual[N[(a * b), $MachinePrecision], 6.1e+150]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1.05 \cdot 10^{-11} \lor \neg \left(a \cdot b \leq 6.1 \cdot 10^{+150}\right):\\
\;\;\;\;c \cdot i + \left(x \cdot y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.0499999999999999e-11 or 6.10000000000000026e150 < (*.f64 a b) Initial program 94.1%
Taylor expanded in z around 0 86.7%
if -1.0499999999999999e-11 < (*.f64 a b) < 6.10000000000000026e150Initial program 97.4%
Taylor expanded in a around 0 90.5%
Final simplification89.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -1e+176) (not (<= (* c i) 21000000000000.0))) (+ (* a b) (* c i)) (+ (* x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -1e+176) || !((c * i) <= 21000000000000.0)) {
tmp = (a * b) + (c * i);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((c * i) <= (-1d+176)) .or. (.not. ((c * i) <= 21000000000000.0d0))) then
tmp = (a * b) + (c * i)
else
tmp = (x * y) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -1e+176) || !((c * i) <= 21000000000000.0)) {
tmp = (a * b) + (c * i);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -1e+176) or not ((c * i) <= 21000000000000.0): tmp = (a * b) + (c * i) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -1e+176) || !(Float64(c * i) <= 21000000000000.0)) tmp = Float64(Float64(a * b) + Float64(c * i)); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((c * i) <= -1e+176) || ~(((c * i) <= 21000000000000.0))) tmp = (a * b) + (c * i); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -1e+176], N[Not[LessEqual[N[(c * i), $MachinePrecision], 21000000000000.0]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1 \cdot 10^{+176} \lor \neg \left(c \cdot i \leq 21000000000000\right):\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 c i) < -1e176 or 2.1e13 < (*.f64 c i) Initial program 93.4%
Taylor expanded in z around 0 87.2%
Taylor expanded in x around 0 78.2%
if -1e176 < (*.f64 c i) < 2.1e13Initial program 97.5%
Taylor expanded in z around 0 69.2%
Taylor expanded in c around 0 66.6%
Final simplification70.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* c i) -5.5e+133) (+ (* x y) (* c i)) (if (<= (* c i) 10000000000000.0) (+ (* x y) (* a b)) (+ (* a b) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -5.5e+133) {
tmp = (x * y) + (c * i);
} else if ((c * i) <= 10000000000000.0) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c * i) <= (-5.5d+133)) then
tmp = (x * y) + (c * i)
else if ((c * i) <= 10000000000000.0d0) then
tmp = (x * y) + (a * b)
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -5.5e+133) {
tmp = (x * y) + (c * i);
} else if ((c * i) <= 10000000000000.0) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -5.5e+133: tmp = (x * y) + (c * i) elif (c * i) <= 10000000000000.0: tmp = (x * y) + (a * b) else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -5.5e+133) tmp = Float64(Float64(x * y) + Float64(c * i)); elseif (Float64(c * i) <= 10000000000000.0) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -5.5e+133) tmp = (x * y) + (c * i); elseif ((c * i) <= 10000000000000.0) tmp = (x * y) + (a * b); else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -5.5e+133], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 10000000000000.0], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -5.5 \cdot 10^{+133}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\mathbf{elif}\;c \cdot i \leq 10000000000000:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -5.5e133Initial program 95.5%
Taylor expanded in z around 0 88.9%
Taylor expanded in a around 0 77.9%
if -5.5e133 < (*.f64 c i) < 1e13Initial program 97.4%
Taylor expanded in z around 0 69.3%
Taylor expanded in c around 0 67.8%
if 1e13 < (*.f64 c i) Initial program 92.9%
Taylor expanded in z around 0 82.7%
Taylor expanded in x around 0 73.6%
Final simplification70.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* a b) -9.2e+61) (not (<= (* a b) 9e+107))) (* a b) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((a * b) <= -9.2e+61) || !((a * b) <= 9e+107)) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((a * b) <= (-9.2d+61)) .or. (.not. ((a * b) <= 9d+107))) then
tmp = a * b
else
tmp = c * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((a * b) <= -9.2e+61) || !((a * b) <= 9e+107)) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((a * b) <= -9.2e+61) or not ((a * b) <= 9e+107): tmp = a * b else: tmp = c * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(a * b) <= -9.2e+61) || !(Float64(a * b) <= 9e+107)) tmp = Float64(a * b); else tmp = Float64(c * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((a * b) <= -9.2e+61) || ~(((a * b) <= 9e+107))) tmp = a * b; else tmp = c * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -9.2e+61], N[Not[LessEqual[N[(a * b), $MachinePrecision], 9e+107]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -9.2 \cdot 10^{+61} \lor \neg \left(a \cdot b \leq 9 \cdot 10^{+107}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 a b) < -9.1999999999999998e61 or 9e107 < (*.f64 a b) Initial program 94.0%
Taylor expanded in a around inf 59.2%
if -9.1999999999999998e61 < (*.f64 a b) < 9e107Initial program 97.4%
Taylor expanded in c around inf 37.0%
Final simplification45.7%
(FPCore (x y z t a b c i) :precision binary64 (* a b))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a * b
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
def code(x, y, z, t, a, b, c, i): return a * b
function code(x, y, z, t, a, b, c, i) return Float64(a * b) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a * b; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b
\end{array}
Initial program 96.1%
Taylor expanded in a around inf 28.4%
herbie shell --seed 2024089
(FPCore (x y z t a b c i)
:name "Linear.V4:$cdot from linear-1.19.1.3, C"
:precision binary64
(+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))