
(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 (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 93.3%
+-commutative93.3%
fma-define94.9%
+-commutative94.9%
fma-define96.5%
fma-define97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t)))
(t_2 (+ (* x y) (* z t)))
(t_3 (+ (* a b) (* z t))))
(if (<= (* x y) -1.8e+51)
t_2
(if (<= (* x y) -4.1e-193)
(+ (* a b) (* c i))
(if (<= (* x y) 4.1e-306)
t_3
(if (<= (* x y) 3.5e-141)
t_1
(if (<= (* x y) 5.6e-37)
t_3
(if (or (<= (* x y) 8.4e+15)
(and (not (<= (* x y) 2.1e+94)) (<= (* x y) 3.3e+138)))
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) + (z * t);
double t_3 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -1.8e+51) {
tmp = t_2;
} else if ((x * y) <= -4.1e-193) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 4.1e-306) {
tmp = t_3;
} else if ((x * y) <= 3.5e-141) {
tmp = t_1;
} else if ((x * y) <= 5.6e-37) {
tmp = t_3;
} else if (((x * y) <= 8.4e+15) || (!((x * y) <= 2.1e+94) && ((x * y) <= 3.3e+138))) {
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) :: t_3
real(8) :: tmp
t_1 = (c * i) + (z * t)
t_2 = (x * y) + (z * t)
t_3 = (a * b) + (z * t)
if ((x * y) <= (-1.8d+51)) then
tmp = t_2
else if ((x * y) <= (-4.1d-193)) then
tmp = (a * b) + (c * i)
else if ((x * y) <= 4.1d-306) then
tmp = t_3
else if ((x * y) <= 3.5d-141) then
tmp = t_1
else if ((x * y) <= 5.6d-37) then
tmp = t_3
else if (((x * y) <= 8.4d+15) .or. (.not. ((x * y) <= 2.1d+94)) .and. ((x * y) <= 3.3d+138)) 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) + (z * t);
double t_3 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -1.8e+51) {
tmp = t_2;
} else if ((x * y) <= -4.1e-193) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 4.1e-306) {
tmp = t_3;
} else if ((x * y) <= 3.5e-141) {
tmp = t_1;
} else if ((x * y) <= 5.6e-37) {
tmp = t_3;
} else if (((x * y) <= 8.4e+15) || (!((x * y) <= 2.1e+94) && ((x * y) <= 3.3e+138))) {
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) + (z * t) t_3 = (a * b) + (z * t) tmp = 0 if (x * y) <= -1.8e+51: tmp = t_2 elif (x * y) <= -4.1e-193: tmp = (a * b) + (c * i) elif (x * y) <= 4.1e-306: tmp = t_3 elif (x * y) <= 3.5e-141: tmp = t_1 elif (x * y) <= 5.6e-37: tmp = t_3 elif ((x * y) <= 8.4e+15) or (not ((x * y) <= 2.1e+94) and ((x * y) <= 3.3e+138)): 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(z * t)) t_3 = Float64(Float64(a * b) + Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -1.8e+51) tmp = t_2; elseif (Float64(x * y) <= -4.1e-193) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(x * y) <= 4.1e-306) tmp = t_3; elseif (Float64(x * y) <= 3.5e-141) tmp = t_1; elseif (Float64(x * y) <= 5.6e-37) tmp = t_3; elseif ((Float64(x * y) <= 8.4e+15) || (!(Float64(x * y) <= 2.1e+94) && (Float64(x * y) <= 3.3e+138))) 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) + (z * t); t_3 = (a * b) + (z * t); tmp = 0.0; if ((x * y) <= -1.8e+51) tmp = t_2; elseif ((x * y) <= -4.1e-193) tmp = (a * b) + (c * i); elseif ((x * y) <= 4.1e-306) tmp = t_3; elseif ((x * y) <= 3.5e-141) tmp = t_1; elseif ((x * y) <= 5.6e-37) tmp = t_3; elseif (((x * y) <= 8.4e+15) || (~(((x * y) <= 2.1e+94)) && ((x * y) <= 3.3e+138))) 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[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.8e+51], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -4.1e-193], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4.1e-306], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 3.5e-141], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5.6e-37], t$95$3, If[Or[LessEqual[N[(x * y), $MachinePrecision], 8.4e+15], And[N[Not[LessEqual[N[(x * y), $MachinePrecision], 2.1e+94]], $MachinePrecision], LessEqual[N[(x * y), $MachinePrecision], 3.3e+138]]], 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 + z \cdot t\\
t_3 := a \cdot b + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -1.8 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -4.1 \cdot 10^{-193}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 4.1 \cdot 10^{-306}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5.6 \cdot 10^{-37}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq 8.4 \cdot 10^{+15} \lor \neg \left(x \cdot y \leq 2.1 \cdot 10^{+94}\right) \land x \cdot y \leq 3.3 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -1.80000000000000005e51 or 8.4e15 < (*.f64 x y) < 2.09999999999999989e94 or 3.29999999999999978e138 < (*.f64 x y) Initial program 93.2%
Taylor expanded in c around 0 84.1%
Taylor expanded in a around 0 80.5%
if -1.80000000000000005e51 < (*.f64 x y) < -4.10000000000000003e-193Initial program 92.6%
Taylor expanded in z around inf 85.8%
Taylor expanded in a around inf 73.4%
if -4.10000000000000003e-193 < (*.f64 x y) < 4.09999999999999985e-306 or 3.5000000000000003e-141 < (*.f64 x y) < 5.6000000000000002e-37Initial program 98.5%
Taylor expanded in x around 0 97.1%
Taylor expanded in c around 0 84.6%
if 4.09999999999999985e-306 < (*.f64 x y) < 3.5000000000000003e-141 or 5.6000000000000002e-37 < (*.f64 x y) < 8.4e15 or 2.09999999999999989e94 < (*.f64 x y) < 3.29999999999999978e138Initial program 86.0%
Taylor expanded in z around inf 84.3%
Taylor expanded in z around inf 74.4%
Final simplification79.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))) (t_2 (+ (* a b) (* z t))))
(if (<= (* x y) -4e+108)
(* y (+ x (/ (* c i) y)))
(if (<= (* x y) -1e-10)
t_2
(if (<= (* x y) -1e-76)
t_1
(if (<= (* x y) 2e-309)
t_2
(if (<= (* x y) 4e-149)
t_1
(if (<= (* x y) 1e-30)
(* z (+ t (/ (* a b) z)))
(+ (* x y) (* c i))))))))))
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 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -4e+108) {
tmp = y * (x + ((c * i) / y));
} else if ((x * y) <= -1e-10) {
tmp = t_2;
} else if ((x * y) <= -1e-76) {
tmp = t_1;
} else if ((x * y) <= 2e-309) {
tmp = t_2;
} else if ((x * y) <= 4e-149) {
tmp = t_1;
} else if ((x * y) <= 1e-30) {
tmp = z * (t + ((a * b) / z));
} else {
tmp = (x * y) + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (c * i) + (z * t)
t_2 = (a * b) + (z * t)
if ((x * y) <= (-4d+108)) then
tmp = y * (x + ((c * i) / y))
else if ((x * y) <= (-1d-10)) then
tmp = t_2
else if ((x * y) <= (-1d-76)) then
tmp = t_1
else if ((x * y) <= 2d-309) then
tmp = t_2
else if ((x * y) <= 4d-149) then
tmp = t_1
else if ((x * y) <= 1d-30) then
tmp = z * (t + ((a * b) / z))
else
tmp = (x * y) + (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 t_1 = (c * i) + (z * t);
double t_2 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -4e+108) {
tmp = y * (x + ((c * i) / y));
} else if ((x * y) <= -1e-10) {
tmp = t_2;
} else if ((x * y) <= -1e-76) {
tmp = t_1;
} else if ((x * y) <= 2e-309) {
tmp = t_2;
} else if ((x * y) <= 4e-149) {
tmp = t_1;
} else if ((x * y) <= 1e-30) {
tmp = z * (t + ((a * b) / z));
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) t_2 = (a * b) + (z * t) tmp = 0 if (x * y) <= -4e+108: tmp = y * (x + ((c * i) / y)) elif (x * y) <= -1e-10: tmp = t_2 elif (x * y) <= -1e-76: tmp = t_1 elif (x * y) <= 2e-309: tmp = t_2 elif (x * y) <= 4e-149: tmp = t_1 elif (x * y) <= 1e-30: tmp = z * (t + ((a * b) / z)) else: tmp = (x * y) + (c * i) 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(a * b) + Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -4e+108) tmp = Float64(y * Float64(x + Float64(Float64(c * i) / y))); elseif (Float64(x * y) <= -1e-10) tmp = t_2; elseif (Float64(x * y) <= -1e-76) tmp = t_1; elseif (Float64(x * y) <= 2e-309) tmp = t_2; elseif (Float64(x * y) <= 4e-149) tmp = t_1; elseif (Float64(x * y) <= 1e-30) tmp = Float64(z * Float64(t + Float64(Float64(a * b) / z))); else tmp = Float64(Float64(x * y) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + (z * t); t_2 = (a * b) + (z * t); tmp = 0.0; if ((x * y) <= -4e+108) tmp = y * (x + ((c * i) / y)); elseif ((x * y) <= -1e-10) tmp = t_2; elseif ((x * y) <= -1e-76) tmp = t_1; elseif ((x * y) <= 2e-309) tmp = t_2; elseif ((x * y) <= 4e-149) tmp = t_1; elseif ((x * y) <= 1e-30) tmp = z * (t + ((a * b) / z)); else tmp = (x * y) + (c * i); 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[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4e+108], N[(y * N[(x + N[(N[(c * i), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-10], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1e-76], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-309], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 4e-149], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e-30], N[(z * N[(t + N[(N[(a * b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
t_2 := a \cdot b + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+108}:\\
\;\;\;\;y \cdot \left(x + \frac{c \cdot i}{y}\right)\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-10}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-309}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 10^{-30}:\\
\;\;\;\;z \cdot \left(t + \frac{a \cdot b}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -4.0000000000000001e108Initial program 93.3%
Taylor expanded in z around 0 89.0%
Taylor expanded in y around inf 87.0%
Taylor expanded in a around 0 81.1%
if -4.0000000000000001e108 < (*.f64 x y) < -1.00000000000000004e-10 or -9.99999999999999927e-77 < (*.f64 x y) < 1.9999999999999988e-309Initial program 96.1%
Taylor expanded in x around 0 93.4%
Taylor expanded in c around 0 78.1%
if -1.00000000000000004e-10 < (*.f64 x y) < -9.99999999999999927e-77 or 1.9999999999999988e-309 < (*.f64 x y) < 3.99999999999999992e-149Initial program 94.2%
Taylor expanded in z around inf 91.7%
Taylor expanded in z around inf 76.7%
if 3.99999999999999992e-149 < (*.f64 x y) < 1e-30Initial program 92.8%
Taylor expanded in z around inf 93.4%
Taylor expanded in x around 0 89.9%
Taylor expanded in c around 0 83.1%
if 1e-30 < (*.f64 x y) Initial program 90.0%
Taylor expanded in z around inf 79.3%
Taylor expanded in x around inf 72.1%
Final simplification77.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))) (t_2 (+ (* a b) (* z t))))
(if (<= (* x y) -2.3e+122)
(+ (* x y) (* a b))
(if (<= (* x y) -3.8e-192)
(+ (* a b) (* c i))
(if (<= (* x y) 2.2e-293)
t_2
(if (<= (* x y) 8.6e-142)
t_1
(if (<= (* x y) 4.3e-36)
t_2
(if (<= (* x y) 1.2e+141) 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 = (c * i) + (z * t);
double t_2 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -2.3e+122) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= -3.8e-192) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 2.2e-293) {
tmp = t_2;
} else if ((x * y) <= 8.6e-142) {
tmp = t_1;
} else if ((x * y) <= 4.3e-36) {
tmp = t_2;
} else if ((x * y) <= 1.2e+141) {
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) :: t_2
real(8) :: tmp
t_1 = (c * i) + (z * t)
t_2 = (a * b) + (z * t)
if ((x * y) <= (-2.3d+122)) then
tmp = (x * y) + (a * b)
else if ((x * y) <= (-3.8d-192)) then
tmp = (a * b) + (c * i)
else if ((x * y) <= 2.2d-293) then
tmp = t_2
else if ((x * y) <= 8.6d-142) then
tmp = t_1
else if ((x * y) <= 4.3d-36) then
tmp = t_2
else if ((x * y) <= 1.2d+141) 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 = (c * i) + (z * t);
double t_2 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -2.3e+122) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= -3.8e-192) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 2.2e-293) {
tmp = t_2;
} else if ((x * y) <= 8.6e-142) {
tmp = t_1;
} else if ((x * y) <= 4.3e-36) {
tmp = t_2;
} else if ((x * y) <= 1.2e+141) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) t_2 = (a * b) + (z * t) tmp = 0 if (x * y) <= -2.3e+122: tmp = (x * y) + (a * b) elif (x * y) <= -3.8e-192: tmp = (a * b) + (c * i) elif (x * y) <= 2.2e-293: tmp = t_2 elif (x * y) <= 8.6e-142: tmp = t_1 elif (x * y) <= 4.3e-36: tmp = t_2 elif (x * y) <= 1.2e+141: tmp = t_1 else: tmp = x * y 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(a * b) + Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -2.3e+122) tmp = Float64(Float64(x * y) + Float64(a * b)); elseif (Float64(x * y) <= -3.8e-192) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(x * y) <= 2.2e-293) tmp = t_2; elseif (Float64(x * y) <= 8.6e-142) tmp = t_1; elseif (Float64(x * y) <= 4.3e-36) tmp = t_2; elseif (Float64(x * y) <= 1.2e+141) 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 = (c * i) + (z * t); t_2 = (a * b) + (z * t); tmp = 0.0; if ((x * y) <= -2.3e+122) tmp = (x * y) + (a * b); elseif ((x * y) <= -3.8e-192) tmp = (a * b) + (c * i); elseif ((x * y) <= 2.2e-293) tmp = t_2; elseif ((x * y) <= 8.6e-142) tmp = t_1; elseif ((x * y) <= 4.3e-36) tmp = t_2; elseif ((x * y) <= 1.2e+141) 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[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.3e+122], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -3.8e-192], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.2e-293], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 8.6e-142], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4.3e-36], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1.2e+141], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
t_2 := a \cdot b + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -2.3 \cdot 10^{+122}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{elif}\;x \cdot y \leq -3.8 \cdot 10^{-192}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 2.2 \cdot 10^{-293}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 8.6 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 4.3 \cdot 10^{-36}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 1.2 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.3000000000000001e122Initial program 92.3%
Taylor expanded in c around 0 85.0%
Taylor expanded in t around 0 77.5%
if -2.3000000000000001e122 < (*.f64 x y) < -3.8000000000000001e-192Initial program 94.4%
Taylor expanded in z around inf 85.7%
Taylor expanded in a around inf 67.4%
if -3.8000000000000001e-192 < (*.f64 x y) < 2.2e-293 or 8.5999999999999995e-142 < (*.f64 x y) < 4.3000000000000002e-36Initial program 98.5%
Taylor expanded in x around 0 97.1%
Taylor expanded in c around 0 84.6%
if 2.2e-293 < (*.f64 x y) < 8.5999999999999995e-142 or 4.3000000000000002e-36 < (*.f64 x y) < 1.19999999999999999e141Initial program 89.1%
Taylor expanded in z around inf 85.9%
Taylor expanded in z around inf 67.9%
if 1.19999999999999999e141 < (*.f64 x y) Initial program 89.7%
Taylor expanded in x around inf 78.9%
Final simplification75.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* c i))) (t_2 (+ (* a b) (* z t))))
(if (<= (* x y) -1.9e+125)
(* x y)
(if (<= (* x y) -2.55e-194)
t_1
(if (<= (* x y) 2.65e-48)
t_2
(if (<= (* x y) 2.1e+15)
t_1
(if (<= (* x y) 8e+183) t_2 (* 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 t_2 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -1.9e+125) {
tmp = x * y;
} else if ((x * y) <= -2.55e-194) {
tmp = t_1;
} else if ((x * y) <= 2.65e-48) {
tmp = t_2;
} else if ((x * y) <= 2.1e+15) {
tmp = t_1;
} else if ((x * y) <= 8e+183) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (a * b) + (c * i)
t_2 = (a * b) + (z * t)
if ((x * y) <= (-1.9d+125)) then
tmp = x * y
else if ((x * y) <= (-2.55d-194)) then
tmp = t_1
else if ((x * y) <= 2.65d-48) then
tmp = t_2
else if ((x * y) <= 2.1d+15) then
tmp = t_1
else if ((x * y) <= 8d+183) then
tmp = t_2
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 t_2 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -1.9e+125) {
tmp = x * y;
} else if ((x * y) <= -2.55e-194) {
tmp = t_1;
} else if ((x * y) <= 2.65e-48) {
tmp = t_2;
} else if ((x * y) <= 2.1e+15) {
tmp = t_1;
} else if ((x * y) <= 8e+183) {
tmp = t_2;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (c * i) t_2 = (a * b) + (z * t) tmp = 0 if (x * y) <= -1.9e+125: tmp = x * y elif (x * y) <= -2.55e-194: tmp = t_1 elif (x * y) <= 2.65e-48: tmp = t_2 elif (x * y) <= 2.1e+15: tmp = t_1 elif (x * y) <= 8e+183: tmp = t_2 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)) t_2 = Float64(Float64(a * b) + Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -1.9e+125) tmp = Float64(x * y); elseif (Float64(x * y) <= -2.55e-194) tmp = t_1; elseif (Float64(x * y) <= 2.65e-48) tmp = t_2; elseif (Float64(x * y) <= 2.1e+15) tmp = t_1; elseif (Float64(x * y) <= 8e+183) tmp = t_2; 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); t_2 = (a * b) + (z * t); tmp = 0.0; if ((x * y) <= -1.9e+125) tmp = x * y; elseif ((x * y) <= -2.55e-194) tmp = t_1; elseif ((x * y) <= 2.65e-48) tmp = t_2; elseif ((x * y) <= 2.1e+15) tmp = t_1; elseif ((x * y) <= 8e+183) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.9e+125], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2.55e-194], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.65e-48], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 2.1e+15], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 8e+183], t$95$2, N[(x * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + c \cdot i\\
t_2 := a \cdot b + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -1.9 \cdot 10^{+125}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -2.55 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2.65 \cdot 10^{-48}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 8 \cdot 10^{+183}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.90000000000000001e125 or 7.99999999999999957e183 < (*.f64 x y) Initial program 90.8%
Taylor expanded in x around inf 77.1%
if -1.90000000000000001e125 < (*.f64 x y) < -2.5499999999999999e-194 or 2.65e-48 < (*.f64 x y) < 2.1e15Initial program 91.0%
Taylor expanded in z around inf 81.5%
Taylor expanded in a around inf 67.8%
if -2.5499999999999999e-194 < (*.f64 x y) < 2.65e-48 or 2.1e15 < (*.f64 x y) < 7.99999999999999957e183Initial program 96.4%
Taylor expanded in x around 0 89.0%
Taylor expanded in c around 0 72.1%
Final simplification72.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* c i))) (t_2 (+ (* a b) (* z t))))
(if (<= (* x y) -1.26e+122)
(+ (* x y) (* a b))
(if (<= (* x y) -4.8e-197)
t_1
(if (<= (* x y) 3.2e-49)
t_2
(if (<= (* x y) 9.5e+14)
t_1
(if (<= (* x y) 1.55e+184) t_2 (* 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 t_2 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -1.26e+122) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= -4.8e-197) {
tmp = t_1;
} else if ((x * y) <= 3.2e-49) {
tmp = t_2;
} else if ((x * y) <= 9.5e+14) {
tmp = t_1;
} else if ((x * y) <= 1.55e+184) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (a * b) + (c * i)
t_2 = (a * b) + (z * t)
if ((x * y) <= (-1.26d+122)) then
tmp = (x * y) + (a * b)
else if ((x * y) <= (-4.8d-197)) then
tmp = t_1
else if ((x * y) <= 3.2d-49) then
tmp = t_2
else if ((x * y) <= 9.5d+14) then
tmp = t_1
else if ((x * y) <= 1.55d+184) then
tmp = t_2
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 t_2 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -1.26e+122) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= -4.8e-197) {
tmp = t_1;
} else if ((x * y) <= 3.2e-49) {
tmp = t_2;
} else if ((x * y) <= 9.5e+14) {
tmp = t_1;
} else if ((x * y) <= 1.55e+184) {
tmp = t_2;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (c * i) t_2 = (a * b) + (z * t) tmp = 0 if (x * y) <= -1.26e+122: tmp = (x * y) + (a * b) elif (x * y) <= -4.8e-197: tmp = t_1 elif (x * y) <= 3.2e-49: tmp = t_2 elif (x * y) <= 9.5e+14: tmp = t_1 elif (x * y) <= 1.55e+184: tmp = t_2 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)) t_2 = Float64(Float64(a * b) + Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -1.26e+122) tmp = Float64(Float64(x * y) + Float64(a * b)); elseif (Float64(x * y) <= -4.8e-197) tmp = t_1; elseif (Float64(x * y) <= 3.2e-49) tmp = t_2; elseif (Float64(x * y) <= 9.5e+14) tmp = t_1; elseif (Float64(x * y) <= 1.55e+184) tmp = t_2; 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); t_2 = (a * b) + (z * t); tmp = 0.0; if ((x * y) <= -1.26e+122) tmp = (x * y) + (a * b); elseif ((x * y) <= -4.8e-197) tmp = t_1; elseif ((x * y) <= 3.2e-49) tmp = t_2; elseif ((x * y) <= 9.5e+14) tmp = t_1; elseif ((x * y) <= 1.55e+184) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.26e+122], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4.8e-197], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e-49], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 9.5e+14], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.55e+184], t$95$2, N[(x * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + c \cdot i\\
t_2 := a \cdot b + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -1.26 \cdot 10^{+122}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{elif}\;x \cdot y \leq -4.8 \cdot 10^{-197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 9.5 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.55 \cdot 10^{+184}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.25999999999999991e122Initial program 92.3%
Taylor expanded in c around 0 85.0%
Taylor expanded in t around 0 77.5%
if -1.25999999999999991e122 < (*.f64 x y) < -4.8000000000000002e-197 or 3.20000000000000002e-49 < (*.f64 x y) < 9.5e14Initial program 91.0%
Taylor expanded in z around inf 81.5%
Taylor expanded in a around inf 67.8%
if -4.8000000000000002e-197 < (*.f64 x y) < 3.20000000000000002e-49 or 9.5e14 < (*.f64 x y) < 1.5499999999999999e184Initial program 96.4%
Taylor expanded in x around 0 89.0%
Taylor expanded in c around 0 72.1%
if 1.5499999999999999e184 < (*.f64 x y) Initial program 89.2%
Taylor expanded in x around inf 81.9%
Final simplification73.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -6.5e+87)
(* x y)
(if (<= (* x y) -1.95e-220)
(* a b)
(if (<= (* x y) 6.6e-106)
(* z t)
(if (<= (* x y) 2.95e-80)
(* a b)
(if (<= (* x y) 1.42e+19) (* c i) (* 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) <= -6.5e+87) {
tmp = x * y;
} else if ((x * y) <= -1.95e-220) {
tmp = a * b;
} else if ((x * y) <= 6.6e-106) {
tmp = z * t;
} else if ((x * y) <= 2.95e-80) {
tmp = a * b;
} else if ((x * y) <= 1.42e+19) {
tmp = c * i;
} 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) <= (-6.5d+87)) then
tmp = x * y
else if ((x * y) <= (-1.95d-220)) then
tmp = a * b
else if ((x * y) <= 6.6d-106) then
tmp = z * t
else if ((x * y) <= 2.95d-80) then
tmp = a * b
else if ((x * y) <= 1.42d+19) then
tmp = c * i
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) <= -6.5e+87) {
tmp = x * y;
} else if ((x * y) <= -1.95e-220) {
tmp = a * b;
} else if ((x * y) <= 6.6e-106) {
tmp = z * t;
} else if ((x * y) <= 2.95e-80) {
tmp = a * b;
} else if ((x * y) <= 1.42e+19) {
tmp = c * i;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -6.5e+87: tmp = x * y elif (x * y) <= -1.95e-220: tmp = a * b elif (x * y) <= 6.6e-106: tmp = z * t elif (x * y) <= 2.95e-80: tmp = a * b elif (x * y) <= 1.42e+19: tmp = c * i else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -6.5e+87) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.95e-220) tmp = Float64(a * b); elseif (Float64(x * y) <= 6.6e-106) tmp = Float64(z * t); elseif (Float64(x * y) <= 2.95e-80) tmp = Float64(a * b); elseif (Float64(x * y) <= 1.42e+19) tmp = Float64(c * i); 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) <= -6.5e+87) tmp = x * y; elseif ((x * y) <= -1.95e-220) tmp = a * b; elseif ((x * y) <= 6.6e-106) tmp = z * t; elseif ((x * y) <= 2.95e-80) tmp = a * b; elseif ((x * y) <= 1.42e+19) tmp = c * i; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -6.5e+87], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.95e-220], N[(a * b), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 6.6e-106], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.95e-80], N[(a * b), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.42e+19], N[(c * i), $MachinePrecision], N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -6.5 \cdot 10^{+87}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.95 \cdot 10^{-220}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \cdot y \leq 6.6 \cdot 10^{-106}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 2.95 \cdot 10^{-80}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \cdot y \leq 1.42 \cdot 10^{+19}:\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -6.5000000000000002e87 or 1.42e19 < (*.f64 x y) Initial program 92.4%
Taylor expanded in x around inf 64.2%
if -6.5000000000000002e87 < (*.f64 x y) < -1.95000000000000001e-220 or 6.60000000000000031e-106 < (*.f64 x y) < 2.95e-80Initial program 94.9%
Taylor expanded in a around inf 43.6%
if -1.95000000000000001e-220 < (*.f64 x y) < 6.60000000000000031e-106Initial program 97.1%
Taylor expanded in z around inf 46.9%
if 2.95e-80 < (*.f64 x y) < 1.42e19Initial program 81.0%
Taylor expanded in c around inf 44.0%
Final simplification53.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* c i))))
(if (<= (* x y) -1.46e+125)
(* x y)
(if (<= (* x y) -1.9e-220)
t_1
(if (<= (* x y) -5.5e-305)
(* z t)
(if (<= (* x y) 2.1e+182) 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) <= -1.46e+125) {
tmp = x * y;
} else if ((x * y) <= -1.9e-220) {
tmp = t_1;
} else if ((x * y) <= -5.5e-305) {
tmp = z * t;
} else if ((x * y) <= 2.1e+182) {
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) <= (-1.46d+125)) then
tmp = x * y
else if ((x * y) <= (-1.9d-220)) then
tmp = t_1
else if ((x * y) <= (-5.5d-305)) then
tmp = z * t
else if ((x * y) <= 2.1d+182) 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) <= -1.46e+125) {
tmp = x * y;
} else if ((x * y) <= -1.9e-220) {
tmp = t_1;
} else if ((x * y) <= -5.5e-305) {
tmp = z * t;
} else if ((x * y) <= 2.1e+182) {
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) <= -1.46e+125: tmp = x * y elif (x * y) <= -1.9e-220: tmp = t_1 elif (x * y) <= -5.5e-305: tmp = z * t elif (x * y) <= 2.1e+182: 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) <= -1.46e+125) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.9e-220) tmp = t_1; elseif (Float64(x * y) <= -5.5e-305) tmp = Float64(z * t); elseif (Float64(x * y) <= 2.1e+182) 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) <= -1.46e+125) tmp = x * y; elseif ((x * y) <= -1.9e-220) tmp = t_1; elseif ((x * y) <= -5.5e-305) tmp = z * t; elseif ((x * y) <= 2.1e+182) 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], -1.46e+125], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.9e-220], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5.5e-305], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.1e+182], 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 -1.46 \cdot 10^{+125}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.9 \cdot 10^{-220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -5.5 \cdot 10^{-305}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.45999999999999999e125 or 2.0999999999999999e182 < (*.f64 x y) Initial program 90.8%
Taylor expanded in x around inf 77.1%
if -1.45999999999999999e125 < (*.f64 x y) < -1.90000000000000004e-220 or -5.5e-305 < (*.f64 x y) < 2.0999999999999999e182Initial program 94.1%
Taylor expanded in z around inf 89.3%
Taylor expanded in a around inf 59.8%
if -1.90000000000000004e-220 < (*.f64 x y) < -5.5e-305Initial program 100.0%
Taylor expanded in z around inf 89.2%
Final simplification66.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* z t))) (t_2 (+ (* x y) (* c i))))
(if (<= (* c i) -2e+179)
t_2
(if (<= (* c i) -5e-182)
t_1
(if (<= (* c i) -2e-247)
(+ (* x y) (* z t))
(if (<= (* c i) 4e-31) 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 = (a * b) + (z * t);
double t_2 = (x * y) + (c * i);
double tmp;
if ((c * i) <= -2e+179) {
tmp = t_2;
} else if ((c * i) <= -5e-182) {
tmp = t_1;
} else if ((c * i) <= -2e-247) {
tmp = (x * y) + (z * t);
} else if ((c * i) <= 4e-31) {
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 = (a * b) + (z * t)
t_2 = (x * y) + (c * i)
if ((c * i) <= (-2d+179)) then
tmp = t_2
else if ((c * i) <= (-5d-182)) then
tmp = t_1
else if ((c * i) <= (-2d-247)) then
tmp = (x * y) + (z * t)
else if ((c * i) <= 4d-31) 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 = (a * b) + (z * t);
double t_2 = (x * y) + (c * i);
double tmp;
if ((c * i) <= -2e+179) {
tmp = t_2;
} else if ((c * i) <= -5e-182) {
tmp = t_1;
} else if ((c * i) <= -2e-247) {
tmp = (x * y) + (z * t);
} else if ((c * i) <= 4e-31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (z * t) t_2 = (x * y) + (c * i) tmp = 0 if (c * i) <= -2e+179: tmp = t_2 elif (c * i) <= -5e-182: tmp = t_1 elif (c * i) <= -2e-247: tmp = (x * y) + (z * t) elif (c * i) <= 4e-31: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(z * t)) t_2 = Float64(Float64(x * y) + Float64(c * i)) tmp = 0.0 if (Float64(c * i) <= -2e+179) tmp = t_2; elseif (Float64(c * i) <= -5e-182) tmp = t_1; elseif (Float64(c * i) <= -2e-247) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (Float64(c * i) <= 4e-31) 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 = (a * b) + (z * t); t_2 = (x * y) + (c * i); tmp = 0.0; if ((c * i) <= -2e+179) tmp = t_2; elseif ((c * i) <= -5e-182) tmp = t_1; elseif ((c * i) <= -2e-247) tmp = (x * y) + (z * t); elseif ((c * i) <= 4e-31) 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[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -2e+179], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], -5e-182], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -2e-247], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4e-31], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
t_2 := x \cdot y + c \cdot i\\
\mathbf{if}\;c \cdot i \leq -2 \cdot 10^{+179}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \cdot i \leq -5 \cdot 10^{-182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq -2 \cdot 10^{-247}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 4 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 c i) < -1.99999999999999996e179 or 4e-31 < (*.f64 c i) Initial program 89.3%
Taylor expanded in z around inf 78.4%
Taylor expanded in x around inf 75.5%
if -1.99999999999999996e179 < (*.f64 c i) < -5.00000000000000024e-182 or -2e-247 < (*.f64 c i) < 4e-31Initial program 96.2%
Taylor expanded in x around 0 76.3%
Taylor expanded in c around 0 72.2%
if -5.00000000000000024e-182 < (*.f64 c i) < -2e-247Initial program 100.0%
Taylor expanded in c around 0 100.0%
Taylor expanded in a around 0 96.1%
Final simplification74.8%
(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 23.5%
Taylor expanded in y around inf 29.4%
Taylor expanded in a around 0 47.8%
Final simplification96.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -7.5e+237)
(+ (* c i) (* z t))
(if (or (<= z -1.85e+79) (and (not (<= z -1.45e-46)) (<= z 8.6e-13)))
(+ (* a b) (+ (* x y) (* c i)))
(+ (* a b) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -7.5e+237) {
tmp = (c * i) + (z * t);
} else if ((z <= -1.85e+79) || (!(z <= -1.45e-46) && (z <= 8.6e-13))) {
tmp = (a * b) + ((x * y) + (c * i));
} else {
tmp = (a * b) + (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 (z <= (-7.5d+237)) then
tmp = (c * i) + (z * t)
else if ((z <= (-1.85d+79)) .or. (.not. (z <= (-1.45d-46))) .and. (z <= 8.6d-13)) then
tmp = (a * b) + ((x * y) + (c * i))
else
tmp = (a * b) + (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 (z <= -7.5e+237) {
tmp = (c * i) + (z * t);
} else if ((z <= -1.85e+79) || (!(z <= -1.45e-46) && (z <= 8.6e-13))) {
tmp = (a * b) + ((x * y) + (c * i));
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -7.5e+237: tmp = (c * i) + (z * t) elif (z <= -1.85e+79) or (not (z <= -1.45e-46) and (z <= 8.6e-13)): tmp = (a * b) + ((x * y) + (c * i)) else: tmp = (a * b) + (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -7.5e+237) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif ((z <= -1.85e+79) || (!(z <= -1.45e-46) && (z <= 8.6e-13))) tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(c * i))); else tmp = Float64(Float64(a * b) + Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -7.5e+237) tmp = (c * i) + (z * t); elseif ((z <= -1.85e+79) || (~((z <= -1.45e-46)) && (z <= 8.6e-13))) tmp = (a * b) + ((x * y) + (c * i)); else tmp = (a * b) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -7.5e+237], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.85e+79], And[N[Not[LessEqual[z, -1.45e-46]], $MachinePrecision], LessEqual[z, 8.6e-13]]], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+237}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+79} \lor \neg \left(z \leq -1.45 \cdot 10^{-46}\right) \land z \leq 8.6 \cdot 10^{-13}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + c \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\end{array}
\end{array}
if z < -7.5e237Initial program 90.0%
Taylor expanded in z around inf 90.0%
Taylor expanded in z around inf 90.0%
if -7.5e237 < z < -1.85000000000000005e79 or -1.45000000000000002e-46 < z < 8.5999999999999997e-13Initial program 93.7%
Taylor expanded in z around 0 85.3%
if -1.85000000000000005e79 < z < -1.45000000000000002e-46 or 8.5999999999999997e-13 < z Initial program 93.2%
Taylor expanded in x around 0 79.2%
Taylor expanded in c around 0 63.3%
Final simplification76.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -1.5e+216)
(* c i)
(if (<= (* c i) 2.7e-308)
(* z t)
(if (<= (* c i) 2.7e-161)
(* a b)
(if (<= (* c i) 600000000.0) (* z t) (* 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) <= -1.5e+216) {
tmp = c * i;
} else if ((c * i) <= 2.7e-308) {
tmp = z * t;
} else if ((c * i) <= 2.7e-161) {
tmp = a * b;
} else if ((c * i) <= 600000000.0) {
tmp = z * t;
} 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 ((c * i) <= (-1.5d+216)) then
tmp = c * i
else if ((c * i) <= 2.7d-308) then
tmp = z * t
else if ((c * i) <= 2.7d-161) then
tmp = a * b
else if ((c * i) <= 600000000.0d0) then
tmp = z * t
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 ((c * i) <= -1.5e+216) {
tmp = c * i;
} else if ((c * i) <= 2.7e-308) {
tmp = z * t;
} else if ((c * i) <= 2.7e-161) {
tmp = a * b;
} else if ((c * i) <= 600000000.0) {
tmp = z * t;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -1.5e+216: tmp = c * i elif (c * i) <= 2.7e-308: tmp = z * t elif (c * i) <= 2.7e-161: tmp = a * b elif (c * i) <= 600000000.0: tmp = z * t else: tmp = c * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -1.5e+216) tmp = Float64(c * i); elseif (Float64(c * i) <= 2.7e-308) tmp = Float64(z * t); elseif (Float64(c * i) <= 2.7e-161) tmp = Float64(a * b); elseif (Float64(c * i) <= 600000000.0) tmp = Float64(z * t); 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 ((c * i) <= -1.5e+216) tmp = c * i; elseif ((c * i) <= 2.7e-308) tmp = z * t; elseif ((c * i) <= 2.7e-161) tmp = a * b; elseif ((c * i) <= 600000000.0) tmp = z * t; else tmp = c * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -1.5e+216], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2.7e-308], N[(z * t), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2.7e-161], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 600000000.0], N[(z * t), $MachinePrecision], N[(c * i), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.5 \cdot 10^{+216}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq 2.7 \cdot 10^{-308}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 2.7 \cdot 10^{-161}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 600000000:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -1.4999999999999999e216 or 6e8 < (*.f64 c i) Initial program 87.6%
Taylor expanded in c around inf 58.3%
if -1.4999999999999999e216 < (*.f64 c i) < 2.70000000000000015e-308 or 2.6999999999999999e-161 < (*.f64 c i) < 6e8Initial program 97.0%
Taylor expanded in z around inf 40.0%
if 2.70000000000000015e-308 < (*.f64 c i) < 2.6999999999999999e-161Initial program 95.6%
Taylor expanded in a around inf 48.0%
Final simplification47.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -4e+217)
(+ (* c i) (* z t))
(if (<= (* c i) 1e+56)
(+ (* a b) (+ (* x y) (* z t)))
(+ (* a b) (+ (* x y) (* 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) <= -4e+217) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 1e+56) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (a * b) + ((x * y) + (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) <= (-4d+217)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= 1d+56) then
tmp = (a * b) + ((x * y) + (z * t))
else
tmp = (a * b) + ((x * y) + (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) <= -4e+217) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 1e+56) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (a * b) + ((x * y) + (c * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -4e+217: tmp = (c * i) + (z * t) elif (c * i) <= 1e+56: tmp = (a * b) + ((x * y) + (z * t)) else: tmp = (a * b) + ((x * y) + (c * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -4e+217) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= 1e+56) tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + 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) <= -4e+217) tmp = (c * i) + (z * t); elseif ((c * i) <= 1e+56) tmp = (a * b) + ((x * y) + (z * t)); else tmp = (a * b) + ((x * y) + (c * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -4e+217], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1e+56], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -4 \cdot 10^{+217}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 10^{+56}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + c \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 c i) < -3.99999999999999984e217Initial program 81.0%
Taylor expanded in z around inf 63.3%
Taylor expanded in z around inf 86.1%
if -3.99999999999999984e217 < (*.f64 c i) < 1.00000000000000009e56Initial program 97.1%
Taylor expanded in c around 0 89.7%
if 1.00000000000000009e56 < (*.f64 c i) Initial program 87.3%
Taylor expanded in z around 0 84.4%
Final simplification88.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -7.5e+214) (not (<= (* c i) 5.8e-29))) (* 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 (((c * i) <= -7.5e+214) || !((c * i) <= 5.8e-29)) {
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 (((c * i) <= (-7.5d+214)) .or. (.not. ((c * i) <= 5.8d-29))) 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 (((c * i) <= -7.5e+214) || !((c * i) <= 5.8e-29)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -7.5e+214) or not ((c * i) <= 5.8e-29): tmp = c * i else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -7.5e+214) || !(Float64(c * i) <= 5.8e-29)) 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 (((c * i) <= -7.5e+214) || ~(((c * i) <= 5.8e-29))) tmp = c * i; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -7.5e+214], N[Not[LessEqual[N[(c * i), $MachinePrecision], 5.8e-29]], $MachinePrecision]], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -7.5 \cdot 10^{+214} \lor \neg \left(c \cdot i \leq 5.8 \cdot 10^{-29}\right):\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 c i) < -7.4999999999999998e214 or 5.80000000000000048e-29 < (*.f64 c i) Initial program 88.4%
Taylor expanded in c around inf 55.5%
if -7.4999999999999998e214 < (*.f64 c i) < 5.80000000000000048e-29Initial program 96.7%
Taylor expanded in a around inf 35.1%
Final simplification43.3%
(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 93.3%
Taylor expanded in a around inf 25.9%
Final simplification25.9%
herbie shell --seed 2024077
(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)))