
(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 13 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 x y (fma z t (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(c, i, fma(x, y, fma(z, t, (a * b))));
}
function code(x, y, z, t, a, b, c, i) return fma(c, i, fma(x, y, fma(z, t, Float64(a * b)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(c * i + N[(x * y + N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)
\end{array}
Initial program 96.5%
+-commutative96.5%
fma-define97.7%
associate-+l+97.7%
fma-define98.8%
fma-define99.6%
Simplified99.6%
Final simplification99.6%
(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.5%
+-commutative96.5%
fma-define97.7%
+-commutative97.7%
fma-define98.0%
fma-define98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t)))
(t_2 (+ (* a b) (* x y)))
(t_3 (+ (* a b) (* z t))))
(if (<= (* x y) -9e+101)
t_2
(if (<= (* x y) -6.2e-39)
t_1
(if (<= (* x y) -3e-194)
t_3
(if (<= (* x y) -4e-290)
t_1
(if (<= (* x y) 7.6e-39)
t_3
(if (<= (* x y) 1.22e+150) 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 = (a * b) + (x * y);
double t_3 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -9e+101) {
tmp = t_2;
} else if ((x * y) <= -6.2e-39) {
tmp = t_1;
} else if ((x * y) <= -3e-194) {
tmp = t_3;
} else if ((x * y) <= -4e-290) {
tmp = t_1;
} else if ((x * y) <= 7.6e-39) {
tmp = t_3;
} else if ((x * y) <= 1.22e+150) {
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 = (a * b) + (x * y)
t_3 = (a * b) + (z * t)
if ((x * y) <= (-9d+101)) then
tmp = t_2
else if ((x * y) <= (-6.2d-39)) then
tmp = t_1
else if ((x * y) <= (-3d-194)) then
tmp = t_3
else if ((x * y) <= (-4d-290)) then
tmp = t_1
else if ((x * y) <= 7.6d-39) then
tmp = t_3
else if ((x * y) <= 1.22d+150) 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 = (a * b) + (x * y);
double t_3 = (a * b) + (z * t);
double tmp;
if ((x * y) <= -9e+101) {
tmp = t_2;
} else if ((x * y) <= -6.2e-39) {
tmp = t_1;
} else if ((x * y) <= -3e-194) {
tmp = t_3;
} else if ((x * y) <= -4e-290) {
tmp = t_1;
} else if ((x * y) <= 7.6e-39) {
tmp = t_3;
} else if ((x * y) <= 1.22e+150) {
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 = (a * b) + (x * y) t_3 = (a * b) + (z * t) tmp = 0 if (x * y) <= -9e+101: tmp = t_2 elif (x * y) <= -6.2e-39: tmp = t_1 elif (x * y) <= -3e-194: tmp = t_3 elif (x * y) <= -4e-290: tmp = t_1 elif (x * y) <= 7.6e-39: tmp = t_3 elif (x * y) <= 1.22e+150: 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(a * b) + Float64(x * y)) t_3 = Float64(Float64(a * b) + Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -9e+101) tmp = t_2; elseif (Float64(x * y) <= -6.2e-39) tmp = t_1; elseif (Float64(x * y) <= -3e-194) tmp = t_3; elseif (Float64(x * y) <= -4e-290) tmp = t_1; elseif (Float64(x * y) <= 7.6e-39) tmp = t_3; elseif (Float64(x * y) <= 1.22e+150) 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 = (a * b) + (x * y); t_3 = (a * b) + (z * t); tmp = 0.0; if ((x * y) <= -9e+101) tmp = t_2; elseif ((x * y) <= -6.2e-39) tmp = t_1; elseif ((x * y) <= -3e-194) tmp = t_3; elseif ((x * y) <= -4e-290) tmp = t_1; elseif ((x * y) <= 7.6e-39) tmp = t_3; elseif ((x * y) <= 1.22e+150) 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[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -9e+101], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -6.2e-39], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -3e-194], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -4e-290], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 7.6e-39], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 1.22e+150], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
t_2 := a \cdot b + x \cdot y\\
t_3 := a \cdot b + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -9 \cdot 10^{+101}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -6.2 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -3 \cdot 10^{-194}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 7.6 \cdot 10^{-39}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq 1.22 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -9.0000000000000004e101 or 1.22e150 < (*.f64 x y) Initial program 91.7%
Taylor expanded in z around 0 86.5%
Taylor expanded in c around 0 79.9%
if -9.0000000000000004e101 < (*.f64 x y) < -6.1999999999999994e-39 or -3e-194 < (*.f64 x y) < -4.0000000000000003e-290 or 7.6000000000000004e-39 < (*.f64 x y) < 1.22e150Initial program 100.0%
Taylor expanded in z around inf 76.0%
if -6.1999999999999994e-39 < (*.f64 x y) < -3e-194 or -4.0000000000000003e-290 < (*.f64 x y) < 7.6000000000000004e-39Initial program 97.3%
Taylor expanded in x around 0 96.5%
Taylor expanded in c around 0 79.6%
Final simplification78.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* z t)))
(t_2 (+ (* a b) (* c i)))
(t_3 (+ (* a b) (* x y))))
(if (<= (* x y) -4.2e+103)
t_3
(if (<= (* x y) -4e-172)
t_1
(if (<= (* x y) -1.35e-244)
t_2
(if (<= (* x y) 6e+47) t_1 (if (<= (* x y) 4.2e+114) t_2 t_3)))))))
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 = (a * b) + (c * i);
double t_3 = (a * b) + (x * y);
double tmp;
if ((x * y) <= -4.2e+103) {
tmp = t_3;
} else if ((x * y) <= -4e-172) {
tmp = t_1;
} else if ((x * y) <= -1.35e-244) {
tmp = t_2;
} else if ((x * y) <= 6e+47) {
tmp = t_1;
} else if ((x * y) <= 4.2e+114) {
tmp = t_2;
} else {
tmp = t_3;
}
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 = (a * b) + (z * t)
t_2 = (a * b) + (c * i)
t_3 = (a * b) + (x * y)
if ((x * y) <= (-4.2d+103)) then
tmp = t_3
else if ((x * y) <= (-4d-172)) then
tmp = t_1
else if ((x * y) <= (-1.35d-244)) then
tmp = t_2
else if ((x * y) <= 6d+47) then
tmp = t_1
else if ((x * y) <= 4.2d+114) then
tmp = t_2
else
tmp = t_3
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 = (a * b) + (c * i);
double t_3 = (a * b) + (x * y);
double tmp;
if ((x * y) <= -4.2e+103) {
tmp = t_3;
} else if ((x * y) <= -4e-172) {
tmp = t_1;
} else if ((x * y) <= -1.35e-244) {
tmp = t_2;
} else if ((x * y) <= 6e+47) {
tmp = t_1;
} else if ((x * y) <= 4.2e+114) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (z * t) t_2 = (a * b) + (c * i) t_3 = (a * b) + (x * y) tmp = 0 if (x * y) <= -4.2e+103: tmp = t_3 elif (x * y) <= -4e-172: tmp = t_1 elif (x * y) <= -1.35e-244: tmp = t_2 elif (x * y) <= 6e+47: tmp = t_1 elif (x * y) <= 4.2e+114: tmp = t_2 else: tmp = t_3 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(a * b) + Float64(c * i)) t_3 = Float64(Float64(a * b) + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -4.2e+103) tmp = t_3; elseif (Float64(x * y) <= -4e-172) tmp = t_1; elseif (Float64(x * y) <= -1.35e-244) tmp = t_2; elseif (Float64(x * y) <= 6e+47) tmp = t_1; elseif (Float64(x * y) <= 4.2e+114) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (z * t); t_2 = (a * b) + (c * i); t_3 = (a * b) + (x * y); tmp = 0.0; if ((x * y) <= -4.2e+103) tmp = t_3; elseif ((x * y) <= -4e-172) tmp = t_1; elseif ((x * y) <= -1.35e-244) tmp = t_2; elseif ((x * y) <= 6e+47) tmp = t_1; elseif ((x * y) <= 4.2e+114) tmp = t_2; else tmp = t_3; 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[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.2e+103], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -4e-172], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1.35e-244], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 6e+47], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4.2e+114], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
t_2 := a \cdot b + c \cdot i\\
t_3 := a \cdot b + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -4.2 \cdot 10^{+103}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -1.35 \cdot 10^{-244}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 6 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 4.2 \cdot 10^{+114}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 x y) < -4.2000000000000003e103 or 4.2000000000000001e114 < (*.f64 x y) Initial program 91.9%
Taylor expanded in z around 0 85.5%
Taylor expanded in c around 0 79.1%
if -4.2000000000000003e103 < (*.f64 x y) < -4.0000000000000002e-172 or -1.35e-244 < (*.f64 x y) < 6.0000000000000003e47Initial program 98.1%
Taylor expanded in x around 0 94.6%
Taylor expanded in c around 0 72.5%
if -4.0000000000000002e-172 < (*.f64 x y) < -1.35e-244 or 6.0000000000000003e47 < (*.f64 x y) < 4.2000000000000001e114Initial program 100.0%
Taylor expanded in a around inf 78.5%
Final simplification74.9%
(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) -9.5e+101)
(+ (* a b) (* x y))
(if (<= (* x y) -9.5e-39)
t_1
(if (<= (* x y) -4.3e-194)
t_2
(if (<= (* x y) -4.3e-290)
t_1
(if (<= (* x y) 7.5e+49) t_2 (+ (* 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) <= -9.5e+101) {
tmp = (a * b) + (x * y);
} else if ((x * y) <= -9.5e-39) {
tmp = t_1;
} else if ((x * y) <= -4.3e-194) {
tmp = t_2;
} else if ((x * y) <= -4.3e-290) {
tmp = t_1;
} else if ((x * y) <= 7.5e+49) {
tmp = t_2;
} 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) <= (-9.5d+101)) then
tmp = (a * b) + (x * y)
else if ((x * y) <= (-9.5d-39)) then
tmp = t_1
else if ((x * y) <= (-4.3d-194)) then
tmp = t_2
else if ((x * y) <= (-4.3d-290)) then
tmp = t_1
else if ((x * y) <= 7.5d+49) then
tmp = t_2
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) <= -9.5e+101) {
tmp = (a * b) + (x * y);
} else if ((x * y) <= -9.5e-39) {
tmp = t_1;
} else if ((x * y) <= -4.3e-194) {
tmp = t_2;
} else if ((x * y) <= -4.3e-290) {
tmp = t_1;
} else if ((x * y) <= 7.5e+49) {
tmp = t_2;
} 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) <= -9.5e+101: tmp = (a * b) + (x * y) elif (x * y) <= -9.5e-39: tmp = t_1 elif (x * y) <= -4.3e-194: tmp = t_2 elif (x * y) <= -4.3e-290: tmp = t_1 elif (x * y) <= 7.5e+49: tmp = t_2 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) <= -9.5e+101) tmp = Float64(Float64(a * b) + Float64(x * y)); elseif (Float64(x * y) <= -9.5e-39) tmp = t_1; elseif (Float64(x * y) <= -4.3e-194) tmp = t_2; elseif (Float64(x * y) <= -4.3e-290) tmp = t_1; elseif (Float64(x * y) <= 7.5e+49) tmp = t_2; 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) <= -9.5e+101) tmp = (a * b) + (x * y); elseif ((x * y) <= -9.5e-39) tmp = t_1; elseif ((x * y) <= -4.3e-194) tmp = t_2; elseif ((x * y) <= -4.3e-290) tmp = t_1; elseif ((x * y) <= 7.5e+49) tmp = t_2; 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], -9.5e+101], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -9.5e-39], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -4.3e-194], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -4.3e-290], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 7.5e+49], t$95$2, 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 -9.5 \cdot 10^{+101}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -9.5 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -4.3 \cdot 10^{-194}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -4.3 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+49}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -9.49999999999999947e101Initial program 90.9%
Taylor expanded in z around 0 84.7%
Taylor expanded in c around 0 80.5%
if -9.49999999999999947e101 < (*.f64 x y) < -9.4999999999999999e-39 or -4.30000000000000006e-194 < (*.f64 x y) < -4.3000000000000002e-290Initial program 100.0%
Taylor expanded in z around inf 76.5%
if -9.4999999999999999e-39 < (*.f64 x y) < -4.30000000000000006e-194 or -4.3000000000000002e-290 < (*.f64 x y) < 7.4999999999999995e49Initial program 97.6%
Taylor expanded in x around 0 96.3%
Taylor expanded in c around 0 77.5%
if 7.4999999999999995e49 < (*.f64 x y) Initial program 94.7%
Taylor expanded in x around inf 82.5%
Final simplification78.6%
(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 (+ (* a b) (* z t)))))
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 = (a * b) + (z * t);
}
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 = (a * b) + (z * t);
}
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 = (a * b) + (z * t) 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(Float64(a * b) + Float64(z * t)); 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 = (a * b) + (z * t); 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[(N[(a * b), $MachinePrecision] + N[(z * t), $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}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\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 x around 0 33.3%
Taylor expanded in c around 0 66.7%
Final simplification98.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* a b) -4.2e+84)
(* a b)
(if (<= (* a b) -7.5e-50)
(* c i)
(if (<= (* a b) 5.4e+20)
(* z t)
(if (<= (* a b) 1.5e+183) (* 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) <= -4.2e+84) {
tmp = a * b;
} else if ((a * b) <= -7.5e-50) {
tmp = c * i;
} else if ((a * b) <= 5.4e+20) {
tmp = z * t;
} else if ((a * b) <= 1.5e+183) {
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) <= (-4.2d+84)) then
tmp = a * b
else if ((a * b) <= (-7.5d-50)) then
tmp = c * i
else if ((a * b) <= 5.4d+20) then
tmp = z * t
else if ((a * b) <= 1.5d+183) 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) <= -4.2e+84) {
tmp = a * b;
} else if ((a * b) <= -7.5e-50) {
tmp = c * i;
} else if ((a * b) <= 5.4e+20) {
tmp = z * t;
} else if ((a * b) <= 1.5e+183) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -4.2e+84: tmp = a * b elif (a * b) <= -7.5e-50: tmp = c * i elif (a * b) <= 5.4e+20: tmp = z * t elif (a * b) <= 1.5e+183: 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) <= -4.2e+84) tmp = Float64(a * b); elseif (Float64(a * b) <= -7.5e-50) tmp = Float64(c * i); elseif (Float64(a * b) <= 5.4e+20) tmp = Float64(z * t); elseif (Float64(a * b) <= 1.5e+183) 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) <= -4.2e+84) tmp = a * b; elseif ((a * b) <= -7.5e-50) tmp = c * i; elseif ((a * b) <= 5.4e+20) tmp = z * t; elseif ((a * b) <= 1.5e+183) 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], -4.2e+84], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -7.5e-50], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5.4e+20], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.5e+183], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4.2 \cdot 10^{+84}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq -7.5 \cdot 10^{-50}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 5.4 \cdot 10^{+20}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 1.5 \cdot 10^{+183}:\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -4.20000000000000037e84 or 1.49999999999999998e183 < (*.f64 a b) Initial program 91.8%
Taylor expanded in i around inf 73.3%
Taylor expanded in a around inf 73.1%
if -4.20000000000000037e84 < (*.f64 a b) < -7.5e-50 or 5.4e20 < (*.f64 a b) < 1.49999999999999998e183Initial program 100.0%
Taylor expanded in c around inf 47.7%
if -7.5e-50 < (*.f64 a b) < 5.4e20Initial program 97.8%
Taylor expanded in i around inf 86.6%
Taylor expanded in t around inf 45.0%
Final simplification53.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -5.2e+103) (not (<= (* x y) 5.6e+44))) (+ (* c i) (+ (* 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 (((x * y) <= -5.2e+103) || !((x * y) <= 5.6e+44)) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (c * i) + ((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 (((x * y) <= (-5.2d+103)) .or. (.not. ((x * y) <= 5.6d+44))) then
tmp = (c * i) + ((a * b) + (x * y))
else
tmp = (c * i) + ((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 (((x * y) <= -5.2e+103) || !((x * y) <= 5.6e+44)) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (c * i) + ((a * b) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -5.2e+103) or not ((x * y) <= 5.6e+44): tmp = (c * i) + ((a * b) + (x * y)) else: tmp = (c * i) + ((a * b) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -5.2e+103) || !(Float64(x * y) <= 5.6e+44)) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(x * y))); else tmp = Float64(Float64(c * i) + 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 (((x * y) <= -5.2e+103) || ~(((x * y) <= 5.6e+44))) tmp = (c * i) + ((a * b) + (x * y)); else tmp = (c * i) + ((a * b) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5.2e+103], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5.6e+44]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5.2 \cdot 10^{+103} \lor \neg \left(x \cdot y \leq 5.6 \cdot 10^{+44}\right):\\
\;\;\;\;c \cdot i + \left(a \cdot b + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -5.2000000000000003e103 or 5.6000000000000002e44 < (*.f64 x y) Initial program 92.7%
Taylor expanded in z around 0 86.9%
if -5.2000000000000003e103 < (*.f64 x y) < 5.6000000000000002e44Initial program 98.3%
Taylor expanded in x around 0 95.0%
Final simplification92.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -5.8e+103)
(+ (* a b) (* x y))
(if (<= (* x y) 6e+65)
(+ (* c i) (+ (* a b) (* z t)))
(+ (* 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 ((x * y) <= -5.8e+103) {
tmp = (a * b) + (x * y);
} else if ((x * y) <= 6e+65) {
tmp = (c * i) + ((a * b) + (z * t));
} 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) :: tmp
if ((x * y) <= (-5.8d+103)) then
tmp = (a * b) + (x * y)
else if ((x * y) <= 6d+65) then
tmp = (c * i) + ((a * b) + (z * t))
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 tmp;
if ((x * y) <= -5.8e+103) {
tmp = (a * b) + (x * y);
} else if ((x * y) <= 6e+65) {
tmp = (c * i) + ((a * b) + (z * t));
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -5.8e+103: tmp = (a * b) + (x * y) elif (x * y) <= 6e+65: tmp = (c * i) + ((a * b) + (z * t)) else: tmp = (x * y) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -5.8e+103) tmp = Float64(Float64(a * b) + Float64(x * y)); elseif (Float64(x * y) <= 6e+65) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); 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) tmp = 0.0; if ((x * y) <= -5.8e+103) tmp = (a * b) + (x * y); elseif ((x * y) <= 6e+65) tmp = (c * i) + ((a * b) + (z * t)); else tmp = (x * y) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -5.8e+103], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 6e+65], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5.8 \cdot 10^{+103}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 6 \cdot 10^{+65}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -5.7999999999999997e103Initial program 90.9%
Taylor expanded in z around 0 84.7%
Taylor expanded in c around 0 80.5%
if -5.7999999999999997e103 < (*.f64 x y) < 6.0000000000000004e65Initial program 98.3%
Taylor expanded in x around 0 94.7%
if 6.0000000000000004e65 < (*.f64 x y) Initial program 94.3%
Taylor expanded in x around inf 83.4%
Final simplification90.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* z t) -2e+93) (not (<= (* z t) 2e+123))) (* z t) (+ (* 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 (((z * t) <= -2e+93) || !((z * t) <= 2e+123)) {
tmp = z * t;
} 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 (((z * t) <= (-2d+93)) .or. (.not. ((z * t) <= 2d+123))) then
tmp = z * t
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 (((z * t) <= -2e+93) || !((z * t) <= 2e+123)) {
tmp = z * t;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((z * t) <= -2e+93) or not ((z * t) <= 2e+123): tmp = z * t else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(z * t) <= -2e+93) || !(Float64(z * t) <= 2e+123)) tmp = Float64(z * t); 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 (((z * t) <= -2e+93) || ~(((z * t) <= 2e+123))) tmp = z * t; else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+93], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e+123]], $MachinePrecision]], N[(z * t), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+93} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+123}\right):\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 z t) < -2.00000000000000009e93 or 1.99999999999999996e123 < (*.f64 z t) Initial program 92.8%
Taylor expanded in i around inf 71.2%
Taylor expanded in t around inf 75.7%
if -2.00000000000000009e93 < (*.f64 z t) < 1.99999999999999996e123Initial program 98.3%
Taylor expanded in a around inf 65.2%
Final simplification68.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* z t) -2e+93) (not (<= (* z t) 1e+113))) (+ (* a b) (* z t)) (+ (* 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 (((z * t) <= -2e+93) || !((z * t) <= 1e+113)) {
tmp = (a * b) + (z * t);
} 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 (((z * t) <= (-2d+93)) .or. (.not. ((z * t) <= 1d+113))) then
tmp = (a * b) + (z * t)
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 (((z * t) <= -2e+93) || !((z * t) <= 1e+113)) {
tmp = (a * b) + (z * t);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((z * t) <= -2e+93) or not ((z * t) <= 1e+113): tmp = (a * b) + (z * t) else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(z * t) <= -2e+93) || !(Float64(z * t) <= 1e+113)) tmp = Float64(Float64(a * b) + Float64(z * t)); 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 (((z * t) <= -2e+93) || ~(((z * t) <= 1e+113))) tmp = (a * b) + (z * t); else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+93], N[Not[LessEqual[N[(z * t), $MachinePrecision], 1e+113]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+93} \lor \neg \left(z \cdot t \leq 10^{+113}\right):\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 z t) < -2.00000000000000009e93 or 1e113 < (*.f64 z t) Initial program 93.0%
Taylor expanded in x around 0 86.2%
Taylor expanded in c around 0 81.8%
if -2.00000000000000009e93 < (*.f64 z t) < 1e113Initial program 98.2%
Taylor expanded in a around inf 65.3%
Final simplification70.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.4e+110) (not (<= c 5e-152))) (* 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 <= -2.4e+110) || !(c <= 5e-152)) {
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 <= (-2.4d+110)) .or. (.not. (c <= 5d-152))) 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 <= -2.4e+110) || !(c <= 5e-152)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -2.4e+110) or not (c <= 5e-152): tmp = c * i else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -2.4e+110) || !(c <= 5e-152)) 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 <= -2.4e+110) || ~((c <= 5e-152))) tmp = c * i; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -2.4e+110], N[Not[LessEqual[c, 5e-152]], $MachinePrecision]], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.4 \cdot 10^{+110} \lor \neg \left(c \leq 5 \cdot 10^{-152}\right):\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if c < -2.40000000000000012e110 or 4.9999999999999997e-152 < c Initial program 95.1%
Taylor expanded in c around inf 36.7%
if -2.40000000000000012e110 < c < 4.9999999999999997e-152Initial program 98.2%
Taylor expanded in i around inf 82.7%
Taylor expanded in a around inf 37.2%
Final simplification36.9%
(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.5%
Taylor expanded in i around inf 83.4%
Taylor expanded in a around inf 28.5%
Final simplification28.5%
herbie shell --seed 2024067
(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)))