Linear.V4:$cdot from linear-1.19.1.3, C

Percentage Accurate: 95.5% → 98.1%
Time: 9.8s
Alternatives: 14
Speedup: 0.4×

Specification

?
\[\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
 (+ (+ (+ (* 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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 95.5% accurate, 1.0× speedup?

\[\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
 (+ (+ (+ (* 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}

Alternative 1: 98.1% accurate, 0.0× speedup?

\[\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} \]
(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}
Derivation
  1. Initial program 96.1%

    \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
  2. Step-by-step derivation
    1. +-commutative96.1%

      \[\leadsto \color{blue}{c \cdot i + \left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right)} \]
    2. fma-define98.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \left(x \cdot y + z \cdot t\right) + a \cdot b\right)} \]
    3. associate-+l+98.0%

      \[\leadsto \mathsf{fma}\left(c, i, \color{blue}{x \cdot y + \left(z \cdot t + a \cdot b\right)}\right) \]
    4. fma-define98.4%

      \[\leadsto \mathsf{fma}\left(c, i, \color{blue}{\mathsf{fma}\left(x, y, z \cdot t + a \cdot b\right)}\right) \]
    5. fma-define98.8%

      \[\leadsto \mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \color{blue}{\mathsf{fma}\left(z, t, a \cdot b\right)}\right)\right) \]
  3. Simplified98.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 64.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b + z \cdot t\\ t_2 := x \cdot y + c \cdot i\\ \mathbf{if}\;x \cdot y \leq -4.7 \cdot 10^{+165}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq -3.6 \cdot 10^{-269}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-316}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 2.55 \cdot 10^{-117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{+149}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{elif}\;x \cdot y \leq 1.52 \cdot 10^{+199}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(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 (<= (* x y) -4.7e+165)
     t_2
     (if (<= (* x y) -3.6e-269)
       t_1
       (if (<= (* x y) 2e-316)
         (+ (* c i) (* z t))
         (if (<= (* x y) 2.55e-117)
           t_1
           (if (<= (* x y) 3.5e+149)
             (+ (* a b) (* c i))
             (if (<= (* x y) 1.52e+199) 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 ((x * y) <= -4.7e+165) {
		tmp = t_2;
	} else if ((x * y) <= -3.6e-269) {
		tmp = t_1;
	} else if ((x * y) <= 2e-316) {
		tmp = (c * i) + (z * t);
	} else if ((x * y) <= 2.55e-117) {
		tmp = t_1;
	} else if ((x * y) <= 3.5e+149) {
		tmp = (a * b) + (c * i);
	} else if ((x * y) <= 1.52e+199) {
		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 ((x * y) <= (-4.7d+165)) then
        tmp = t_2
    else if ((x * y) <= (-3.6d-269)) then
        tmp = t_1
    else if ((x * y) <= 2d-316) then
        tmp = (c * i) + (z * t)
    else if ((x * y) <= 2.55d-117) then
        tmp = t_1
    else if ((x * y) <= 3.5d+149) then
        tmp = (a * b) + (c * i)
    else if ((x * y) <= 1.52d+199) 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 ((x * y) <= -4.7e+165) {
		tmp = t_2;
	} else if ((x * y) <= -3.6e-269) {
		tmp = t_1;
	} else if ((x * y) <= 2e-316) {
		tmp = (c * i) + (z * t);
	} else if ((x * y) <= 2.55e-117) {
		tmp = t_1;
	} else if ((x * y) <= 3.5e+149) {
		tmp = (a * b) + (c * i);
	} else if ((x * y) <= 1.52e+199) {
		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 (x * y) <= -4.7e+165:
		tmp = t_2
	elif (x * y) <= -3.6e-269:
		tmp = t_1
	elif (x * y) <= 2e-316:
		tmp = (c * i) + (z * t)
	elif (x * y) <= 2.55e-117:
		tmp = t_1
	elif (x * y) <= 3.5e+149:
		tmp = (a * b) + (c * i)
	elif (x * y) <= 1.52e+199:
		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(x * y) <= -4.7e+165)
		tmp = t_2;
	elseif (Float64(x * y) <= -3.6e-269)
		tmp = t_1;
	elseif (Float64(x * y) <= 2e-316)
		tmp = Float64(Float64(c * i) + Float64(z * t));
	elseif (Float64(x * y) <= 2.55e-117)
		tmp = t_1;
	elseif (Float64(x * y) <= 3.5e+149)
		tmp = Float64(Float64(a * b) + Float64(c * i));
	elseif (Float64(x * y) <= 1.52e+199)
		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 ((x * y) <= -4.7e+165)
		tmp = t_2;
	elseif ((x * y) <= -3.6e-269)
		tmp = t_1;
	elseif ((x * y) <= 2e-316)
		tmp = (c * i) + (z * t);
	elseif ((x * y) <= 2.55e-117)
		tmp = t_1;
	elseif ((x * y) <= 3.5e+149)
		tmp = (a * b) + (c * i);
	elseif ((x * y) <= 1.52e+199)
		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[(x * y), $MachinePrecision], -4.7e+165], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -3.6e-269], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-316], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.55e-117], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.5e+149], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.52e+199], 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}\;x \cdot y \leq -4.7 \cdot 10^{+165}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \cdot y \leq -3.6 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-316}:\\
\;\;\;\;c \cdot i + z \cdot t\\

\mathbf{elif}\;x \cdot y \leq 2.55 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{+149}:\\
\;\;\;\;a \cdot b + c \cdot i\\

\mathbf{elif}\;x \cdot y \leq 1.52 \cdot 10^{+199}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -4.70000000000000016e165 or 1.51999999999999995e199 < (*.f64 x y)

    1. Initial program 94.1%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 86.7%

      \[\leadsto \color{blue}{\left(t \cdot z + x \cdot y\right)} + c \cdot i \]
    4. Taylor expanded in t around 0 85.4%

      \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]

    if -4.70000000000000016e165 < (*.f64 x y) < -3.59999999999999998e-269 or 2.000000017e-316 < (*.f64 x y) < 2.5500000000000001e-117 or 3.50000000000000011e149 < (*.f64 x y) < 1.51999999999999995e199

    1. Initial program 96.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 91.8%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 86.9%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in c around 0 78.3%

      \[\leadsto \color{blue}{a \cdot b + t \cdot z} \]

    if -3.59999999999999998e-269 < (*.f64 x y) < 2.000000017e-316

    1. Initial program 94.9%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 82.6%

      \[\leadsto \color{blue}{\left(t \cdot z + x \cdot y\right)} + c \cdot i \]
    4. Taylor expanded in x around 0 82.6%

      \[\leadsto \color{blue}{c \cdot i + t \cdot z} \]

    if 2.5500000000000001e-117 < (*.f64 x y) < 3.50000000000000011e149

    1. Initial program 100.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 95.3%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 80.9%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in t around 0 66.5%

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification78.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.7 \cdot 10^{+165}:\\ \;\;\;\;x \cdot y + c \cdot i\\ \mathbf{elif}\;x \cdot y \leq -3.6 \cdot 10^{-269}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-316}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 2.55 \cdot 10^{-117}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{+149}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{elif}\;x \cdot y \leq 1.52 \cdot 10^{+199}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + c \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 62.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b + z \cdot t\\ \mathbf{if}\;x \cdot y \leq -9.4 \cdot 10^{+225}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-271}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-316}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 5.1 \cdot 10^{-111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+149}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{elif}\;x \cdot y \leq 2.25 \cdot 10^{+204}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* a b) (* z t))))
   (if (<= (* x y) -9.4e+225)
     (* x y)
     (if (<= (* x y) -4e-271)
       t_1
       (if (<= (* x y) 2e-316)
         (+ (* c i) (* z t))
         (if (<= (* x y) 5.1e-111)
           t_1
           (if (<= (* x y) 7.5e+149)
             (+ (* a b) (* c i))
             (if (<= (* x y) 2.25e+204) 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) + (z * t);
	double tmp;
	if ((x * y) <= -9.4e+225) {
		tmp = x * y;
	} else if ((x * y) <= -4e-271) {
		tmp = t_1;
	} else if ((x * y) <= 2e-316) {
		tmp = (c * i) + (z * t);
	} else if ((x * y) <= 5.1e-111) {
		tmp = t_1;
	} else if ((x * y) <= 7.5e+149) {
		tmp = (a * b) + (c * i);
	} else if ((x * y) <= 2.25e+204) {
		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) + (z * t)
    if ((x * y) <= (-9.4d+225)) then
        tmp = x * y
    else if ((x * y) <= (-4d-271)) then
        tmp = t_1
    else if ((x * y) <= 2d-316) then
        tmp = (c * i) + (z * t)
    else if ((x * y) <= 5.1d-111) then
        tmp = t_1
    else if ((x * y) <= 7.5d+149) then
        tmp = (a * b) + (c * i)
    else if ((x * y) <= 2.25d+204) 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) + (z * t);
	double tmp;
	if ((x * y) <= -9.4e+225) {
		tmp = x * y;
	} else if ((x * y) <= -4e-271) {
		tmp = t_1;
	} else if ((x * y) <= 2e-316) {
		tmp = (c * i) + (z * t);
	} else if ((x * y) <= 5.1e-111) {
		tmp = t_1;
	} else if ((x * y) <= 7.5e+149) {
		tmp = (a * b) + (c * i);
	} else if ((x * y) <= 2.25e+204) {
		tmp = t_1;
	} else {
		tmp = x * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (a * b) + (z * t)
	tmp = 0
	if (x * y) <= -9.4e+225:
		tmp = x * y
	elif (x * y) <= -4e-271:
		tmp = t_1
	elif (x * y) <= 2e-316:
		tmp = (c * i) + (z * t)
	elif (x * y) <= 5.1e-111:
		tmp = t_1
	elif (x * y) <= 7.5e+149:
		tmp = (a * b) + (c * i)
	elif (x * y) <= 2.25e+204:
		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(z * t))
	tmp = 0.0
	if (Float64(x * y) <= -9.4e+225)
		tmp = Float64(x * y);
	elseif (Float64(x * y) <= -4e-271)
		tmp = t_1;
	elseif (Float64(x * y) <= 2e-316)
		tmp = Float64(Float64(c * i) + Float64(z * t));
	elseif (Float64(x * y) <= 5.1e-111)
		tmp = t_1;
	elseif (Float64(x * y) <= 7.5e+149)
		tmp = Float64(Float64(a * b) + Float64(c * i));
	elseif (Float64(x * y) <= 2.25e+204)
		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) + (z * t);
	tmp = 0.0;
	if ((x * y) <= -9.4e+225)
		tmp = x * y;
	elseif ((x * y) <= -4e-271)
		tmp = t_1;
	elseif ((x * y) <= 2e-316)
		tmp = (c * i) + (z * t);
	elseif ((x * y) <= 5.1e-111)
		tmp = t_1;
	elseif ((x * y) <= 7.5e+149)
		tmp = (a * b) + (c * i);
	elseif ((x * y) <= 2.25e+204)
		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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -9.4e+225], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4e-271], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-316], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5.1e-111], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 7.5e+149], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.25e+204], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -9.4 \cdot 10^{+225}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-316}:\\
\;\;\;\;c \cdot i + z \cdot t\\

\mathbf{elif}\;x \cdot y \leq 5.1 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+149}:\\
\;\;\;\;a \cdot b + c \cdot i\\

\mathbf{elif}\;x \cdot y \leq 2.25 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -9.40000000000000008e225 or 2.25000000000000001e204 < (*.f64 x y)

    1. Initial program 93.1%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 82.9%

      \[\leadsto \color{blue}{x \cdot y} \]

    if -9.40000000000000008e225 < (*.f64 x y) < -3.99999999999999985e-271 or 2.000000017e-316 < (*.f64 x y) < 5.10000000000000032e-111 or 7.50000000000000031e149 < (*.f64 x y) < 2.25000000000000001e204

    1. Initial program 96.6%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 90.1%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 85.7%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in c around 0 75.9%

      \[\leadsto \color{blue}{a \cdot b + t \cdot z} \]

    if -3.99999999999999985e-271 < (*.f64 x y) < 2.000000017e-316

    1. Initial program 94.9%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 82.6%

      \[\leadsto \color{blue}{\left(t \cdot z + x \cdot y\right)} + c \cdot i \]
    4. Taylor expanded in x around 0 82.6%

      \[\leadsto \color{blue}{c \cdot i + t \cdot z} \]

    if 5.10000000000000032e-111 < (*.f64 x y) < 7.50000000000000031e149

    1. Initial program 100.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 95.3%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 80.9%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in t around 0 66.5%

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -9.4 \cdot 10^{+225}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-271}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-316}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 5.1 \cdot 10^{-111}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+149}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{elif}\;x \cdot y \leq 2.25 \cdot 10^{+204}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 43.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -3.8 \cdot 10^{+136}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq -1.35 \cdot 10^{-176}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 2.2 \cdot 10^{-149}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 4.4 \cdot 10^{-64}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 1.45 \cdot 10^{+140}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* a b) -3.8e+136)
   (* a b)
   (if (<= (* a b) -1.35e-176)
     (* x y)
     (if (<= (* a b) 2.2e-149)
       (* z t)
       (if (<= (* a b) 4.4e-64)
         (* x y)
         (if (<= (* a b) 1.45e+140) (* z t) (* 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) <= -3.8e+136) {
		tmp = a * b;
	} else if ((a * b) <= -1.35e-176) {
		tmp = x * y;
	} else if ((a * b) <= 2.2e-149) {
		tmp = z * t;
	} else if ((a * b) <= 4.4e-64) {
		tmp = x * y;
	} else if ((a * b) <= 1.45e+140) {
		tmp = z * t;
	} 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) <= (-3.8d+136)) then
        tmp = a * b
    else if ((a * b) <= (-1.35d-176)) then
        tmp = x * y
    else if ((a * b) <= 2.2d-149) then
        tmp = z * t
    else if ((a * b) <= 4.4d-64) then
        tmp = x * y
    else if ((a * b) <= 1.45d+140) then
        tmp = z * t
    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) <= -3.8e+136) {
		tmp = a * b;
	} else if ((a * b) <= -1.35e-176) {
		tmp = x * y;
	} else if ((a * b) <= 2.2e-149) {
		tmp = z * t;
	} else if ((a * b) <= 4.4e-64) {
		tmp = x * y;
	} else if ((a * b) <= 1.45e+140) {
		tmp = z * t;
	} else {
		tmp = a * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (a * b) <= -3.8e+136:
		tmp = a * b
	elif (a * b) <= -1.35e-176:
		tmp = x * y
	elif (a * b) <= 2.2e-149:
		tmp = z * t
	elif (a * b) <= 4.4e-64:
		tmp = x * y
	elif (a * b) <= 1.45e+140:
		tmp = z * t
	else:
		tmp = a * b
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(a * b) <= -3.8e+136)
		tmp = Float64(a * b);
	elseif (Float64(a * b) <= -1.35e-176)
		tmp = Float64(x * y);
	elseif (Float64(a * b) <= 2.2e-149)
		tmp = Float64(z * t);
	elseif (Float64(a * b) <= 4.4e-64)
		tmp = Float64(x * y);
	elseif (Float64(a * b) <= 1.45e+140)
		tmp = Float64(z * t);
	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) <= -3.8e+136)
		tmp = a * b;
	elseif ((a * b) <= -1.35e-176)
		tmp = x * y;
	elseif ((a * b) <= 2.2e-149)
		tmp = z * t;
	elseif ((a * b) <= 4.4e-64)
		tmp = x * y;
	elseif ((a * b) <= 1.45e+140)
		tmp = z * t;
	else
		tmp = a * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -3.8e+136], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -1.35e-176], N[(x * y), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2.2e-149], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 4.4e-64], N[(x * y), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.45e+140], N[(z * t), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -3.8 \cdot 10^{+136}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;a \cdot b \leq -1.35 \cdot 10^{-176}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;a \cdot b \leq 2.2 \cdot 10^{-149}:\\
\;\;\;\;z \cdot t\\

\mathbf{elif}\;a \cdot b \leq 4.4 \cdot 10^{-64}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;a \cdot b \leq 1.45 \cdot 10^{+140}:\\
\;\;\;\;z \cdot t\\

\mathbf{else}:\\
\;\;\;\;a \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -3.80000000000000015e136 or 1.4499999999999999e140 < (*.f64 a b)

    1. Initial program 92.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 74.0%

      \[\leadsto \color{blue}{a \cdot b} \]

    if -3.80000000000000015e136 < (*.f64 a b) < -1.3499999999999999e-176 or 2.1999999999999998e-149 < (*.f64 a b) < 4.3999999999999999e-64

    1. Initial program 98.5%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 50.8%

      \[\leadsto \color{blue}{x \cdot y} \]

    if -1.3499999999999999e-176 < (*.f64 a b) < 2.1999999999999998e-149 or 4.3999999999999999e-64 < (*.f64 a b) < 1.4499999999999999e140

    1. Initial program 97.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 45.8%

      \[\leadsto \color{blue}{t \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification55.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -3.8 \cdot 10^{+136}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq -1.35 \cdot 10^{-176}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 2.2 \cdot 10^{-149}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 4.4 \cdot 10^{-64}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 1.45 \cdot 10^{+140}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 61.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b + c \cdot i\\ \mathbf{if}\;x \cdot y \leq -6 \cdot 10^{+225}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq -4.5 \cdot 10^{-169}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 2.8 \cdot 10^{+131}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* a b) (* c i))))
   (if (<= (* x y) -6e+225)
     (* x y)
     (if (<= (* x y) -1e-108)
       t_1
       (if (<= (* x y) -4.5e-169)
         (* z t)
         (if (<= (* x y) 2.8e+131) 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) <= -6e+225) {
		tmp = x * y;
	} else if ((x * y) <= -1e-108) {
		tmp = t_1;
	} else if ((x * y) <= -4.5e-169) {
		tmp = z * t;
	} else if ((x * y) <= 2.8e+131) {
		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) <= (-6d+225)) then
        tmp = x * y
    else if ((x * y) <= (-1d-108)) then
        tmp = t_1
    else if ((x * y) <= (-4.5d-169)) then
        tmp = z * t
    else if ((x * y) <= 2.8d+131) 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) <= -6e+225) {
		tmp = x * y;
	} else if ((x * y) <= -1e-108) {
		tmp = t_1;
	} else if ((x * y) <= -4.5e-169) {
		tmp = z * t;
	} else if ((x * y) <= 2.8e+131) {
		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) <= -6e+225:
		tmp = x * y
	elif (x * y) <= -1e-108:
		tmp = t_1
	elif (x * y) <= -4.5e-169:
		tmp = z * t
	elif (x * y) <= 2.8e+131:
		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) <= -6e+225)
		tmp = Float64(x * y);
	elseif (Float64(x * y) <= -1e-108)
		tmp = t_1;
	elseif (Float64(x * y) <= -4.5e-169)
		tmp = Float64(z * t);
	elseif (Float64(x * y) <= 2.8e+131)
		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) <= -6e+225)
		tmp = x * y;
	elseif ((x * y) <= -1e-108)
		tmp = t_1;
	elseif ((x * y) <= -4.5e-169)
		tmp = z * t;
	elseif ((x * y) <= 2.8e+131)
		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], -6e+225], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-108], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -4.5e-169], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.8e+131], 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 -6 \cdot 10^{+225}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq -4.5 \cdot 10^{-169}:\\
\;\;\;\;z \cdot t\\

\mathbf{elif}\;x \cdot y \leq 2.8 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -6.000000000000001e225 or 2.8000000000000001e131 < (*.f64 x y)

    1. Initial program 92.8%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 74.3%

      \[\leadsto \color{blue}{x \cdot y} \]

    if -6.000000000000001e225 < (*.f64 x y) < -1.00000000000000004e-108 or -4.4999999999999999e-169 < (*.f64 x y) < 2.8000000000000001e131

    1. Initial program 97.7%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 92.8%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 88.1%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in t around 0 62.4%

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]

    if -1.00000000000000004e-108 < (*.f64 x y) < -4.4999999999999999e-169

    1. Initial program 90.9%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 82.3%

      \[\leadsto \color{blue}{t \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -6 \cdot 10^{+225}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-108}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{elif}\;x \cdot y \leq -4.5 \cdot 10^{-169}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 2.8 \cdot 10^{+131}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 97.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(t + \frac{x \cdot y}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* c i) (+ (* a b) (+ (* x y) (* z t))))))
   (if (<= t_1 INFINITY) t_1 (* z (+ t (/ (* x y) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = z * (t + ((x * y) / z));
	}
	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 = (c * i) + ((a * b) + ((x * y) + (z * t)));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = z * (t + ((x * y) / z));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = z * (t + ((x * y) / z))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(z * Float64(t + Float64(Float64(x * y) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = z * (t + ((x * y) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(t + \frac{x \cdot y}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0

    1. Initial program 100.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing

    if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i))

    1. Initial program 0.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 10.0%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in a around 0 20.0%

      \[\leadsto \color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + c \cdot i \]
    5. Taylor expanded in c around 0 50.4%

      \[\leadsto \color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right) \leq \infty:\\ \;\;\;\;c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(t + \frac{x \cdot y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 42.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -1.65 \cdot 10^{+24}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 1.25 \cdot 10^{-8}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 2.5 \cdot 10^{+35}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \cdot b \leq 1.06 \cdot 10^{+143}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* a b) -1.65e+24)
   (* a b)
   (if (<= (* a b) 1.25e-8)
     (* z t)
     (if (<= (* a b) 2.5e+35)
       (* c i)
       (if (<= (* a b) 1.06e+143) (* z t) (* 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) <= -1.65e+24) {
		tmp = a * b;
	} else if ((a * b) <= 1.25e-8) {
		tmp = z * t;
	} else if ((a * b) <= 2.5e+35) {
		tmp = c * i;
	} else if ((a * b) <= 1.06e+143) {
		tmp = z * t;
	} 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) <= (-1.65d+24)) then
        tmp = a * b
    else if ((a * b) <= 1.25d-8) then
        tmp = z * t
    else if ((a * b) <= 2.5d+35) then
        tmp = c * i
    else if ((a * b) <= 1.06d+143) then
        tmp = z * t
    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) <= -1.65e+24) {
		tmp = a * b;
	} else if ((a * b) <= 1.25e-8) {
		tmp = z * t;
	} else if ((a * b) <= 2.5e+35) {
		tmp = c * i;
	} else if ((a * b) <= 1.06e+143) {
		tmp = z * t;
	} else {
		tmp = a * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (a * b) <= -1.65e+24:
		tmp = a * b
	elif (a * b) <= 1.25e-8:
		tmp = z * t
	elif (a * b) <= 2.5e+35:
		tmp = c * i
	elif (a * b) <= 1.06e+143:
		tmp = z * t
	else:
		tmp = a * b
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(a * b) <= -1.65e+24)
		tmp = Float64(a * b);
	elseif (Float64(a * b) <= 1.25e-8)
		tmp = Float64(z * t);
	elseif (Float64(a * b) <= 2.5e+35)
		tmp = Float64(c * i);
	elseif (Float64(a * b) <= 1.06e+143)
		tmp = Float64(z * t);
	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) <= -1.65e+24)
		tmp = a * b;
	elseif ((a * b) <= 1.25e-8)
		tmp = z * t;
	elseif ((a * b) <= 2.5e+35)
		tmp = c * i;
	elseif ((a * b) <= 1.06e+143)
		tmp = z * t;
	else
		tmp = a * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -1.65e+24], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.25e-8], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2.5e+35], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.06e+143], N[(z * t), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;a \cdot b \leq 1.25 \cdot 10^{-8}:\\
\;\;\;\;z \cdot t\\

\mathbf{elif}\;a \cdot b \leq 2.5 \cdot 10^{+35}:\\
\;\;\;\;c \cdot i\\

\mathbf{elif}\;a \cdot b \leq 1.06 \cdot 10^{+143}:\\
\;\;\;\;z \cdot t\\

\mathbf{else}:\\
\;\;\;\;a \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -1.6499999999999999e24 or 1.06e143 < (*.f64 a b)

    1. Initial program 93.7%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 64.5%

      \[\leadsto \color{blue}{a \cdot b} \]

    if -1.6499999999999999e24 < (*.f64 a b) < 1.2499999999999999e-8 or 2.50000000000000011e35 < (*.f64 a b) < 1.06e143

    1. Initial program 97.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 40.8%

      \[\leadsto \color{blue}{t \cdot z} \]

    if 1.2499999999999999e-8 < (*.f64 a b) < 2.50000000000000011e35

    1. Initial program 100.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in c around inf 64.8%

      \[\leadsto \color{blue}{c \cdot i} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -1.65 \cdot 10^{+24}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 1.25 \cdot 10^{-8}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 2.5 \cdot 10^{+35}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \cdot b \leq 1.06 \cdot 10^{+143}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 65.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -4.2 \cdot 10^{+140}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 4.5 \cdot 10^{-18}:\\ \;\;\;\;x \cdot y + z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 7.4 \cdot 10^{+140}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* a b) -4.2e+140)
   (+ (* a b) (* z t))
   (if (<= (* a b) 4.5e-18)
     (+ (* x y) (* z t))
     (if (<= (* a b) 7.4e+140) (+ (* c i) (* 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 ((a * b) <= -4.2e+140) {
		tmp = (a * b) + (z * t);
	} else if ((a * b) <= 4.5e-18) {
		tmp = (x * y) + (z * t);
	} else if ((a * b) <= 7.4e+140) {
		tmp = (c * i) + (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 ((a * b) <= (-4.2d+140)) then
        tmp = (a * b) + (z * t)
    else if ((a * b) <= 4.5d-18) then
        tmp = (x * y) + (z * t)
    else if ((a * b) <= 7.4d+140) then
        tmp = (c * i) + (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 ((a * b) <= -4.2e+140) {
		tmp = (a * b) + (z * t);
	} else if ((a * b) <= 4.5e-18) {
		tmp = (x * y) + (z * t);
	} else if ((a * b) <= 7.4e+140) {
		tmp = (c * i) + (z * t);
	} else {
		tmp = (a * b) + (c * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (a * b) <= -4.2e+140:
		tmp = (a * b) + (z * t)
	elif (a * b) <= 4.5e-18:
		tmp = (x * y) + (z * t)
	elif (a * b) <= 7.4e+140:
		tmp = (c * i) + (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(a * b) <= -4.2e+140)
		tmp = Float64(Float64(a * b) + Float64(z * t));
	elseif (Float64(a * b) <= 4.5e-18)
		tmp = Float64(Float64(x * y) + Float64(z * t));
	elseif (Float64(a * b) <= 7.4e+140)
		tmp = Float64(Float64(c * i) + 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 ((a * b) <= -4.2e+140)
		tmp = (a * b) + (z * t);
	elseif ((a * b) <= 4.5e-18)
		tmp = (x * y) + (z * t);
	elseif ((a * b) <= 7.4e+140)
		tmp = (c * i) + (z * t);
	else
		tmp = (a * b) + (c * i);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -4.2e+140], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 4.5e-18], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 7.4e+140], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4.2 \cdot 10^{+140}:\\
\;\;\;\;a \cdot b + z \cdot t\\

\mathbf{elif}\;a \cdot b \leq 4.5 \cdot 10^{-18}:\\
\;\;\;\;x \cdot y + z \cdot t\\

\mathbf{elif}\;a \cdot b \leq 7.4 \cdot 10^{+140}:\\
\;\;\;\;c \cdot i + z \cdot t\\

\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a b) < -4.2000000000000004e140

    1. Initial program 90.6%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.6%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 90.6%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in c around 0 85.1%

      \[\leadsto \color{blue}{a \cdot b + t \cdot z} \]

    if -4.2000000000000004e140 < (*.f64 a b) < 4.49999999999999994e-18

    1. Initial program 97.9%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 90.6%

      \[\leadsto \color{blue}{\left(t \cdot z + x \cdot y\right)} + c \cdot i \]
    4. Step-by-step derivation
      1. associate-+l+90.6%

        \[\leadsto \color{blue}{t \cdot z + \left(x \cdot y + c \cdot i\right)} \]
      2. +-commutative90.6%

        \[\leadsto \color{blue}{\left(x \cdot y + c \cdot i\right) + t \cdot z} \]
      3. fma-define90.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, c \cdot i\right)} + t \cdot z \]
      4. *-commutative90.6%

        \[\leadsto \mathsf{fma}\left(x, y, c \cdot i\right) + \color{blue}{z \cdot t} \]
    5. Applied egg-rr90.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, c \cdot i\right) + z \cdot t} \]
    6. Taylor expanded in c around 0 73.0%

      \[\leadsto \color{blue}{t \cdot z + x \cdot y} \]

    if 4.49999999999999994e-18 < (*.f64 a b) < 7.40000000000000006e140

    1. Initial program 96.8%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 90.9%

      \[\leadsto \color{blue}{\left(t \cdot z + x \cdot y\right)} + c \cdot i \]
    4. Taylor expanded in x around 0 70.1%

      \[\leadsto \color{blue}{c \cdot i + t \cdot z} \]

    if 7.40000000000000006e140 < (*.f64 a b)

    1. Initial program 93.4%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 86.9%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 85.0%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in t around 0 87.1%

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification76.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -4.2 \cdot 10^{+140}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 4.5 \cdot 10^{-18}:\\ \;\;\;\;x \cdot y + z \cdot t\\ \mathbf{elif}\;a \cdot b \leq 7.4 \cdot 10^{+140}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 87.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.9 \cdot 10^{-16} \lor \neg \left(x \cdot y \leq 6 \cdot 10^{+59}\right):\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= (* x y) -2.9e-16) (not (<= (* x y) 6e+59)))
   (+ (* a b) (+ (* x y) (* z t)))
   (+ (* 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) <= -2.9e-16) || !((x * y) <= 6e+59)) {
		tmp = (a * b) + ((x * y) + (z * t));
	} 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) <= (-2.9d-16)) .or. (.not. ((x * y) <= 6d+59))) then
        tmp = (a * b) + ((x * y) + (z * t))
    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) <= -2.9e-16) || !((x * y) <= 6e+59)) {
		tmp = (a * b) + ((x * y) + (z * t));
	} 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) <= -2.9e-16) or not ((x * y) <= 6e+59):
		tmp = (a * b) + ((x * y) + (z * t))
	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) <= -2.9e-16) || !(Float64(x * y) <= 6e+59))
		tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t)));
	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) <= -2.9e-16) || ~(((x * y) <= 6e+59)))
		tmp = (a * b) + ((x * y) + (z * t));
	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], -2.9e-16], N[Not[LessEqual[N[(x * y), $MachinePrecision], 6e+59]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $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 -2.9 \cdot 10^{-16} \lor \neg \left(x \cdot y \leq 6 \cdot 10^{+59}\right):\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\

\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -2.8999999999999998e-16 or 6.0000000000000001e59 < (*.f64 x y)

    1. Initial program 95.5%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in c around 0 88.5%

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]

    if -2.8999999999999998e-16 < (*.f64 x y) < 6.0000000000000001e59

    1. Initial program 96.5%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 92.8%

      \[\leadsto \color{blue}{\left(a \cdot b + t \cdot z\right)} + c \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification90.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.9 \cdot 10^{-16} \lor \neg \left(x \cdot y \leq 6 \cdot 10^{+59}\right):\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 87.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y + z \cdot t\\ \mathbf{if}\;c \cdot i \leq -2.7 \cdot 10^{+119}:\\ \;\;\;\;c \cdot i + t\_1\\ \mathbf{elif}\;c \cdot i \leq 1.22 \cdot 10^{-52}:\\ \;\;\;\;a \cdot b + t\_1\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* x y) (* z t))))
   (if (<= (* c i) -2.7e+119)
     (+ (* c i) t_1)
     (if (<= (* c i) 1.22e-52)
       (+ (* a b) t_1)
       (+ (* 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 t_1 = (x * y) + (z * t);
	double tmp;
	if ((c * i) <= -2.7e+119) {
		tmp = (c * i) + t_1;
	} else if ((c * i) <= 1.22e-52) {
		tmp = (a * b) + t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = (x * y) + (z * t)
    if ((c * i) <= (-2.7d+119)) then
        tmp = (c * i) + t_1
    else if ((c * i) <= 1.22d-52) then
        tmp = (a * b) + t_1
    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 t_1 = (x * y) + (z * t);
	double tmp;
	if ((c * i) <= -2.7e+119) {
		tmp = (c * i) + t_1;
	} else if ((c * i) <= 1.22e-52) {
		tmp = (a * b) + t_1;
	} else {
		tmp = (c * i) + ((a * b) + (z * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * y) + (z * t)
	tmp = 0
	if (c * i) <= -2.7e+119:
		tmp = (c * i) + t_1
	elif (c * i) <= 1.22e-52:
		tmp = (a * b) + t_1
	else:
		tmp = (c * i) + ((a * b) + (z * t))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * y) + Float64(z * t))
	tmp = 0.0
	if (Float64(c * i) <= -2.7e+119)
		tmp = Float64(Float64(c * i) + t_1);
	elseif (Float64(c * i) <= 1.22e-52)
		tmp = Float64(Float64(a * b) + t_1);
	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)
	t_1 = (x * y) + (z * t);
	tmp = 0.0;
	if ((c * i) <= -2.7e+119)
		tmp = (c * i) + t_1;
	elseif ((c * i) <= 1.22e-52)
		tmp = (a * b) + t_1;
	else
		tmp = (c * i) + ((a * b) + (z * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -2.7e+119], N[(N[(c * i), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.22e-52], N[(N[(a * b), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -2.7 \cdot 10^{+119}:\\
\;\;\;\;c \cdot i + t\_1\\

\mathbf{elif}\;c \cdot i \leq 1.22 \cdot 10^{-52}:\\
\;\;\;\;a \cdot b + t\_1\\

\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 c i) < -2.6999999999999998e119

    1. Initial program 92.5%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 85.3%

      \[\leadsto \color{blue}{\left(t \cdot z + x \cdot y\right)} + c \cdot i \]

    if -2.6999999999999998e119 < (*.f64 c i) < 1.22e-52

    1. Initial program 98.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in c around 0 95.2%

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]

    if 1.22e-52 < (*.f64 c i)

    1. Initial program 93.5%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 84.3%

      \[\leadsto \color{blue}{\left(a \cdot b + t \cdot z\right)} + c \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -2.7 \cdot 10^{+119}:\\ \;\;\;\;c \cdot i + \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \cdot i \leq 1.22 \cdot 10^{-52}:\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 85.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \cdot i \leq -1.8 \cdot 10^{+119}:\\ \;\;\;\;x \cdot y + c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 9.2 \cdot 10^{+194}:\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* c i) -1.8e+119)
   (+ (* x y) (* c i))
   (if (<= (* c i) 9.2e+194)
     (+ (* a b) (+ (* 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) {
	double tmp;
	if ((c * i) <= -1.8e+119) {
		tmp = (x * y) + (c * i);
	} else if ((c * i) <= 9.2e+194) {
		tmp = (a * b) + ((x * y) + (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 ((c * i) <= (-1.8d+119)) then
        tmp = (x * y) + (c * i)
    else if ((c * i) <= 9.2d+194) then
        tmp = (a * b) + ((x * y) + (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 ((c * i) <= -1.8e+119) {
		tmp = (x * y) + (c * i);
	} else if ((c * i) <= 9.2e+194) {
		tmp = (a * b) + ((x * y) + (z * t));
	} else {
		tmp = (a * b) + (c * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (c * i) <= -1.8e+119:
		tmp = (x * y) + (c * i)
	elif (c * i) <= 9.2e+194:
		tmp = (a * b) + ((x * y) + (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(c * i) <= -1.8e+119)
		tmp = Float64(Float64(x * y) + Float64(c * i));
	elseif (Float64(c * i) <= 9.2e+194)
		tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + 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 ((c * i) <= -1.8e+119)
		tmp = (x * y) + (c * i);
	elseif ((c * i) <= 9.2e+194)
		tmp = (a * b) + ((x * y) + (z * t));
	else
		tmp = (a * b) + (c * i);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -1.8e+119], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 9.2e+194], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.8 \cdot 10^{+119}:\\
\;\;\;\;x \cdot y + c \cdot i\\

\mathbf{elif}\;c \cdot i \leq 9.2 \cdot 10^{+194}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 c i) < -1.80000000000000001e119

    1. Initial program 92.5%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 85.3%

      \[\leadsto \color{blue}{\left(t \cdot z + x \cdot y\right)} + c \cdot i \]
    4. Taylor expanded in t around 0 80.6%

      \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]

    if -1.80000000000000001e119 < (*.f64 c i) < 9.2000000000000002e194

    1. Initial program 98.4%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in c around 0 92.4%

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]

    if 9.2000000000000002e194 < (*.f64 c i)

    1. Initial program 86.6%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.3%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 80.3%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in t around 0 83.7%

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -1.8 \cdot 10^{+119}:\\ \;\;\;\;x \cdot y + c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 9.2 \cdot 10^{+194}:\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 66.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \cdot i \leq -1.45 \cdot 10^{+56} \lor \neg \left(c \cdot i \leq 580000000000\right):\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= (* c i) -1.45e+56) (not (<= (* c i) 580000000000.0)))
   (+ (* a b) (* 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 (((c * i) <= -1.45e+56) || !((c * i) <= 580000000000.0)) {
		tmp = (a * b) + (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 (((c * i) <= (-1.45d+56)) .or. (.not. ((c * i) <= 580000000000.0d0))) then
        tmp = (a * b) + (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 (((c * i) <= -1.45e+56) || !((c * i) <= 580000000000.0)) {
		tmp = (a * b) + (c * i);
	} else {
		tmp = (a * b) + (z * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if ((c * i) <= -1.45e+56) or not ((c * i) <= 580000000000.0):
		tmp = (a * b) + (c * i)
	else:
		tmp = (a * b) + (z * t)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((Float64(c * i) <= -1.45e+56) || !(Float64(c * i) <= 580000000000.0))
		tmp = Float64(Float64(a * b) + 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 (((c * i) <= -1.45e+56) || ~(((c * i) <= 580000000000.0)))
		tmp = (a * b) + (c * i);
	else
		tmp = (a * b) + (z * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -1.45e+56], N[Not[LessEqual[N[(c * i), $MachinePrecision], 580000000000.0]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.45 \cdot 10^{+56} \lor \neg \left(c \cdot i \leq 580000000000\right):\\
\;\;\;\;a \cdot b + c \cdot i\\

\mathbf{else}:\\
\;\;\;\;a \cdot b + z \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 c i) < -1.45000000000000004e56 or 5.8e11 < (*.f64 c i)

    1. Initial program 93.1%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 87.5%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 78.1%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in t around 0 72.5%

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]

    if -1.45000000000000004e56 < (*.f64 c i) < 5.8e11

    1. Initial program 98.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 88.2%

      \[\leadsto \left(\color{blue}{z \cdot \left(t + \frac{x \cdot y}{z}\right)} + a \cdot b\right) + c \cdot i \]
    4. Taylor expanded in z around inf 68.3%

      \[\leadsto \left(\color{blue}{t \cdot z} + a \cdot b\right) + c \cdot i \]
    5. Taylor expanded in c around 0 66.1%

      \[\leadsto \color{blue}{a \cdot b + t \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -1.45 \cdot 10^{+56} \lor \neg \left(c \cdot i \leq 580000000000\right):\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 43.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -2.6 \cdot 10^{+22} \lor \neg \left(a \cdot b \leq 1.2 \cdot 10^{+126}\right):\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= (* a b) -2.6e+22) (not (<= (* a b) 1.2e+126))) (* a b) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (((a * b) <= -2.6e+22) || !((a * b) <= 1.2e+126)) {
		tmp = a * b;
	} else {
		tmp = c * i;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (((a * b) <= (-2.6d+22)) .or. (.not. ((a * b) <= 1.2d+126))) then
        tmp = a * b
    else
        tmp = c * i
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (((a * b) <= -2.6e+22) || !((a * b) <= 1.2e+126)) {
		tmp = a * b;
	} else {
		tmp = c * i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if ((a * b) <= -2.6e+22) or not ((a * b) <= 1.2e+126):
		tmp = a * b
	else:
		tmp = c * i
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((Float64(a * b) <= -2.6e+22) || !(Float64(a * b) <= 1.2e+126))
		tmp = Float64(a * b);
	else
		tmp = Float64(c * i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (((a * b) <= -2.6e+22) || ~(((a * b) <= 1.2e+126)))
		tmp = a * b;
	else
		tmp = c * i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -2.6e+22], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1.2e+126]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2.6 \cdot 10^{+22} \lor \neg \left(a \cdot b \leq 1.2 \cdot 10^{+126}\right):\\
\;\;\;\;a \cdot b\\

\mathbf{else}:\\
\;\;\;\;c \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -2.6e22 or 1.20000000000000006e126 < (*.f64 a b)

    1. Initial program 93.8%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 64.2%

      \[\leadsto \color{blue}{a \cdot b} \]

    if -2.6e22 < (*.f64 a b) < 1.20000000000000006e126

    1. Initial program 97.5%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in c around inf 30.9%

      \[\leadsto \color{blue}{c \cdot i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -2.6 \cdot 10^{+22} \lor \neg \left(a \cdot b \leq 1.2 \cdot 10^{+126}\right):\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 27.8% accurate, 5.0× speedup?

\[\begin{array}{l} \\ a \cdot b \end{array} \]
(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}
Derivation
  1. Initial program 96.1%

    \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 28.6%

    \[\leadsto \color{blue}{a \cdot b} \]
  4. Add Preprocessing

Reproduce

?
herbie shell --seed 2024096 
(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)))