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

Percentage Accurate: 95.6% → 97.0%
Time: 9.1s
Alternatives: 11
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 11 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.6% 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: 97.0% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot t + c \cdot i\\


\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. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{z \cdot t + \left(c \cdot i + \left(x \cdot y + a \cdot b\right)\right)} \]
    4. 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. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f640.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified0.0%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \color{blue}{\left(c \cdot i\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6450.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(c, \color{blue}{i}\right)\right) \]
    7. Simplified50.6%

      \[\leadsto z \cdot t + \color{blue}{c \cdot i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.0%

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

Alternative 2: 65.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+172}:\\ \;\;\;\;z \cdot t + c \cdot i\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-274}:\\ \;\;\;\;x \cdot y + a \cdot b\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{-166}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{+91}:\\ \;\;\;\;x \cdot y + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + z \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* z t) -2e+172)
   (+ (* z t) (* c i))
   (if (<= (* z t) -1e-274)
     (+ (* x y) (* a b))
     (if (<= (* z t) 4e-166)
       (+ (* a b) (* c i))
       (if (<= (* z t) 4e+91) (+ (* x y) (* c i)) (+ (* x y) (* z t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z * t) <= -2e+172) {
		tmp = (z * t) + (c * i);
	} else if ((z * t) <= -1e-274) {
		tmp = (x * y) + (a * b);
	} else if ((z * t) <= 4e-166) {
		tmp = (a * b) + (c * i);
	} else if ((z * t) <= 4e+91) {
		tmp = (x * y) + (c * i);
	} else {
		tmp = (x * y) + (z * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((z * t) <= (-2d+172)) then
        tmp = (z * t) + (c * i)
    else if ((z * t) <= (-1d-274)) then
        tmp = (x * y) + (a * b)
    else if ((z * t) <= 4d-166) then
        tmp = (a * b) + (c * i)
    else if ((z * t) <= 4d+91) then
        tmp = (x * y) + (c * i)
    else
        tmp = (x * y) + (z * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z * t) <= -2e+172) {
		tmp = (z * t) + (c * i);
	} else if ((z * t) <= -1e-274) {
		tmp = (x * y) + (a * b);
	} else if ((z * t) <= 4e-166) {
		tmp = (a * b) + (c * i);
	} else if ((z * t) <= 4e+91) {
		tmp = (x * y) + (c * i);
	} else {
		tmp = (x * y) + (z * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (z * t) <= -2e+172:
		tmp = (z * t) + (c * i)
	elif (z * t) <= -1e-274:
		tmp = (x * y) + (a * b)
	elif (z * t) <= 4e-166:
		tmp = (a * b) + (c * i)
	elif (z * t) <= 4e+91:
		tmp = (x * y) + (c * i)
	else:
		tmp = (x * y) + (z * t)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(z * t) <= -2e+172)
		tmp = Float64(Float64(z * t) + Float64(c * i));
	elseif (Float64(z * t) <= -1e-274)
		tmp = Float64(Float64(x * y) + Float64(a * b));
	elseif (Float64(z * t) <= 4e-166)
		tmp = Float64(Float64(a * b) + Float64(c * i));
	elseif (Float64(z * t) <= 4e+91)
		tmp = Float64(Float64(x * y) + Float64(c * i));
	else
		tmp = Float64(Float64(x * y) + Float64(z * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((z * t) <= -2e+172)
		tmp = (z * t) + (c * i);
	elseif ((z * t) <= -1e-274)
		tmp = (x * y) + (a * b);
	elseif ((z * t) <= 4e-166)
		tmp = (a * b) + (c * i);
	elseif ((z * t) <= 4e+91)
		tmp = (x * y) + (c * i);
	else
		tmp = (x * y) + (z * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -2e+172], N[(N[(z * t), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], -1e-274], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 4e-166], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 4e+91], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+172}:\\
\;\;\;\;z \cdot t + c \cdot i\\

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

\mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{-166}:\\
\;\;\;\;a \cdot b + c \cdot i\\

\mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{+91}:\\
\;\;\;\;x \cdot y + c \cdot i\\

\mathbf{else}:\\
\;\;\;\;x \cdot y + z \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 z t) < -2.0000000000000002e172

    1. Initial program 83.9%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6483.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified83.9%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \color{blue}{\left(c \cdot i\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6487.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(c, \color{blue}{i}\right)\right) \]
    7. Simplified87.5%

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

    if -2.0000000000000002e172 < (*.f64 z t) < -9.99999999999999966e-275

    1. Initial program 97.1%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.1%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6484.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified84.6%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in c around 0

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{x} \cdot y\right)\right) \]
      3. *-lowering-*.f6469.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    10. Simplified69.6%

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]

    if -9.99999999999999966e-275 < (*.f64 z t) < 4.00000000000000016e-166

    1. Initial program 98.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6498.3%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6498.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified98.3%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c} \cdot i\right)\right) \]
      3. *-lowering-*.f6472.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{*.f64}\left(c, \color{blue}{i}\right)\right) \]
    10. Simplified72.7%

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

    if 4.00000000000000016e-166 < (*.f64 z t) < 4.00000000000000032e91

    1. Initial program 97.8%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.8%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6495.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified95.8%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in a around 0

      \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right) \]
      3. *-lowering-*.f6473.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    10. Simplified73.5%

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

    if 4.00000000000000032e91 < (*.f64 z t)

    1. Initial program 97.9%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.9%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \color{blue}{\left(x \cdot y\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6482.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    7. Simplified82.0%

      \[\leadsto z \cdot t + \color{blue}{x \cdot y} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification75.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+172}:\\ \;\;\;\;z \cdot t + c \cdot i\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-274}:\\ \;\;\;\;x \cdot y + a \cdot b\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{-166}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{+91}:\\ \;\;\;\;x \cdot y + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + z \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 65.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot t + c \cdot i\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{-166}:\\
\;\;\;\;a \cdot b + c \cdot i\\

\mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{+91}:\\
\;\;\;\;x \cdot y + c \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 z t) < -2.0000000000000002e172 or 4.00000000000000032e91 < (*.f64 z t)

    1. Initial program 92.5%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6492.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified92.5%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \color{blue}{\left(c \cdot i\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6482.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(c, \color{blue}{i}\right)\right) \]
    7. Simplified82.4%

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

    if -2.0000000000000002e172 < (*.f64 z t) < -9.99999999999999966e-275

    1. Initial program 97.1%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.1%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6484.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified84.6%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in c around 0

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{x} \cdot y\right)\right) \]
      3. *-lowering-*.f6469.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    10. Simplified69.6%

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]

    if -9.99999999999999966e-275 < (*.f64 z t) < 4.00000000000000016e-166

    1. Initial program 98.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6498.3%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6498.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified98.3%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c} \cdot i\right)\right) \]
      3. *-lowering-*.f6472.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{*.f64}\left(c, \color{blue}{i}\right)\right) \]
    10. Simplified72.7%

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

    if 4.00000000000000016e-166 < (*.f64 z t) < 4.00000000000000032e91

    1. Initial program 97.8%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.8%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6495.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified95.8%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in a around 0

      \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right) \]
      3. *-lowering-*.f6473.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    10. Simplified73.5%

      \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification75.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+172}:\\ \;\;\;\;z \cdot t + c \cdot i\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-274}:\\ \;\;\;\;x \cdot y + a \cdot b\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{-166}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{+91}:\\ \;\;\;\;x \cdot y + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;z \cdot t + c \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+184}:\\ \;\;\;\;z \cdot t + c \cdot i\\ \mathbf{elif}\;z \cdot t \leq 7.9 \cdot 10^{+105}:\\ \;\;\;\;a \cdot b + \left(x \cdot y + c \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + z \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* z t) -2e+184)
   (+ (* z t) (* c i))
   (if (<= (* z t) 7.9e+105)
     (+ (* a b) (+ (* x y) (* c i)))
     (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z * t) <= -2e+184) {
		tmp = (z * t) + (c * i);
	} else if ((z * t) <= 7.9e+105) {
		tmp = (a * b) + ((x * y) + (c * i));
	} else {
		tmp = (x * y) + (z * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((z * t) <= (-2d+184)) then
        tmp = (z * t) + (c * i)
    else if ((z * t) <= 7.9d+105) then
        tmp = (a * b) + ((x * y) + (c * i))
    else
        tmp = (x * y) + (z * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z * t) <= -2e+184) {
		tmp = (z * t) + (c * i);
	} else if ((z * t) <= 7.9e+105) {
		tmp = (a * b) + ((x * y) + (c * i));
	} else {
		tmp = (x * y) + (z * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (z * t) <= -2e+184:
		tmp = (z * t) + (c * i)
	elif (z * t) <= 7.9e+105:
		tmp = (a * b) + ((x * y) + (c * i))
	else:
		tmp = (x * y) + (z * t)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(z * t) <= -2e+184)
		tmp = Float64(Float64(z * t) + Float64(c * i));
	elseif (Float64(z * t) <= 7.9e+105)
		tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(c * i)));
	else
		tmp = Float64(Float64(x * y) + Float64(z * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((z * t) <= -2e+184)
		tmp = (z * t) + (c * i);
	elseif ((z * t) <= 7.9e+105)
		tmp = (a * b) + ((x * y) + (c * i));
	else
		tmp = (x * y) + (z * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -2e+184], N[(N[(z * t), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 7.9e+105], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+184}:\\
\;\;\;\;z \cdot t + c \cdot i\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot y + z \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z t) < -2.00000000000000003e184

    1. Initial program 83.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6483.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified83.3%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \color{blue}{\left(c \cdot i\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6487.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(c, \color{blue}{i}\right)\right) \]
    7. Simplified87.1%

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

    if -2.00000000000000003e184 < (*.f64 z t) < 7.9e105

    1. Initial program 97.2%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.2%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6491.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified91.4%

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

    if 7.9e105 < (*.f64 z t)

    1. Initial program 100.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified100.0%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \color{blue}{\left(x \cdot y\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6486.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    7. Simplified86.7%

      \[\leadsto z \cdot t + \color{blue}{x \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.1%

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

Alternative 5: 38.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{-9}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;b \leq 1.25 \cdot 10^{-225}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;b \leq 3.6 \cdot 10^{-152}:\\
\;\;\;\;c \cdot i\\

\mathbf{elif}\;b \leq 1.2 \cdot 10^{+105}:\\
\;\;\;\;z \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.3999999999999998e-9 or 1.19999999999999987e105 < b

    1. Initial program 92.7%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6492.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified92.7%

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

      \[\leadsto \color{blue}{a \cdot b} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6443.6%

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{b}\right) \]
    7. Simplified43.6%

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

    if -3.3999999999999998e-9 < b < 1.25e-225

    1. Initial program 98.7%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6498.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified98.7%

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

      \[\leadsto \color{blue}{x \cdot y} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6438.6%

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
    7. Simplified38.6%

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

    if 1.25e-225 < b < 3.6e-152

    1. Initial program 92.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6492.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified92.3%

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

      \[\leadsto \color{blue}{c \cdot i} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6447.6%

        \[\leadsto \mathsf{*.f64}\left(c, \color{blue}{i}\right) \]
    7. Simplified47.6%

      \[\leadsto \color{blue}{c \cdot i} \]

    if 3.6e-152 < b < 1.19999999999999987e105

    1. Initial program 100.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified100.0%

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

      \[\leadsto \color{blue}{t \cdot z} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6443.9%

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{z}\right) \]
    7. Simplified43.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{-9}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-225}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{-152}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+105}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 66.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot y + a \cdot b\\
\mathbf{if}\;a \cdot b \leq -5.2 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -5.2e31 or 3.5499999999999996e72 < (*.f64 a b)

    1. Initial program 94.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6494.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified94.3%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6480.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified80.4%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in c around 0

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{x} \cdot y\right)\right) \]
      3. *-lowering-*.f6473.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    10. Simplified73.9%

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]

    if -5.2e31 < (*.f64 a b) < 3.5499999999999996e72

    1. Initial program 97.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.3%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified67.0%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in a around 0

      \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right) \]
      3. *-lowering-*.f6463.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    10. Simplified63.5%

      \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5.2 \cdot 10^{+31}:\\ \;\;\;\;x \cdot y + a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 3.55 \cdot 10^{+72}:\\ \;\;\;\;x \cdot y + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + a \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 64.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \cdot i \leq -1.12 \cdot 10^{+179}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 3.3 \cdot 10^{+108}:\\ \;\;\;\;x \cdot y + a \cdot b\\ \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.12e+179)
   (* c i)
   (if (<= (* c i) 3.3e+108) (+ (* x y) (* a b)) (+ (* a b) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((c * i) <= -1.12e+179) {
		tmp = c * i;
	} else if ((c * i) <= 3.3e+108) {
		tmp = (x * y) + (a * b);
	} else {
		tmp = (a * b) + (c * i);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((c * i) <= (-1.12d+179)) then
        tmp = c * i
    else if ((c * i) <= 3.3d+108) then
        tmp = (x * y) + (a * b)
    else
        tmp = (a * b) + (c * i)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((c * i) <= -1.12e+179) {
		tmp = c * i;
	} else if ((c * i) <= 3.3e+108) {
		tmp = (x * y) + (a * b);
	} else {
		tmp = (a * b) + (c * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (c * i) <= -1.12e+179:
		tmp = c * i
	elif (c * i) <= 3.3e+108:
		tmp = (x * y) + (a * b)
	else:
		tmp = (a * b) + (c * i)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(c * i) <= -1.12e+179)
		tmp = Float64(c * i);
	elseif (Float64(c * i) <= 3.3e+108)
		tmp = Float64(Float64(x * y) + Float64(a * b));
	else
		tmp = Float64(Float64(a * b) + Float64(c * i));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((c * i) <= -1.12e+179)
		tmp = c * i;
	elseif ((c * i) <= 3.3e+108)
		tmp = (x * y) + (a * b);
	else
		tmp = (a * b) + (c * i);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -1.12e+179], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3.3e+108], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.12 \cdot 10^{+179}:\\
\;\;\;\;c \cdot i\\

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

\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.11999999999999997e179

    1. Initial program 90.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6490.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified90.3%

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

      \[\leadsto \color{blue}{c \cdot i} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6481.7%

        \[\leadsto \mathsf{*.f64}\left(c, \color{blue}{i}\right) \]
    7. Simplified81.7%

      \[\leadsto \color{blue}{c \cdot i} \]

    if -1.11999999999999997e179 < (*.f64 c i) < 3.30000000000000019e108

    1. Initial program 96.8%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6496.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified96.8%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6473.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified73.0%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in c around 0

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{x} \cdot y\right)\right) \]
      3. *-lowering-*.f6465.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
    10. Simplified65.0%

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]

    if 3.30000000000000019e108 < (*.f64 c i)

    1. Initial program 97.3%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.3%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6466.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified66.2%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c} \cdot i\right)\right) \]
      3. *-lowering-*.f6458.5%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{*.f64}\left(c, \color{blue}{i}\right)\right) \]
    10. Simplified58.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -1.12 \cdot 10^{+179}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 3.3 \cdot 10^{+108}:\\ \;\;\;\;x \cdot y + a \cdot b\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 63.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+160}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+135}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* x y) -5e+160)
   (* x y)
   (if (<= (* x y) 5e+135) (+ (* a b) (* c i)) (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x * y) <= -5e+160) {
		tmp = x * y;
	} else if ((x * y) <= 5e+135) {
		tmp = (a * b) + (c * i);
	} else {
		tmp = x * y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((x * y) <= (-5d+160)) then
        tmp = x * y
    else if ((x * y) <= 5d+135) then
        tmp = (a * b) + (c * i)
    else
        tmp = x * y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x * y) <= -5e+160) {
		tmp = x * y;
	} else if ((x * y) <= 5e+135) {
		tmp = (a * b) + (c * i);
	} else {
		tmp = x * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (x * y) <= -5e+160:
		tmp = x * y
	elif (x * y) <= 5e+135:
		tmp = (a * b) + (c * i)
	else:
		tmp = x * y
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(x * y) <= -5e+160)
		tmp = Float64(x * y);
	elseif (Float64(x * y) <= 5e+135)
		tmp = Float64(Float64(a * b) + Float64(c * i));
	else
		tmp = Float64(x * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((x * y) <= -5e+160)
		tmp = x * y;
	elseif ((x * y) <= 5e+135)
		tmp = (a * b) + (c * i);
	else
		tmp = x * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -5e+160], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+135], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+160}:\\
\;\;\;\;x \cdot y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -5.0000000000000002e160 or 5.00000000000000029e135 < (*.f64 x y)

    1. Initial program 87.8%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6487.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified87.8%

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

      \[\leadsto \color{blue}{x \cdot y} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6473.3%

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
    7. Simplified73.3%

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

    if -5.0000000000000002e160 < (*.f64 x y) < 5.00000000000000029e135

    1. Initial program 99.4%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified99.4%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i + x \cdot y\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c \cdot i} + x \cdot y\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x} \cdot y\right)\right)\right) \]
      5. *-lowering-*.f6469.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    7. Simplified69.6%

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    8. Taylor expanded in x around 0

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{\left(c \cdot i\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \left(\color{blue}{c} \cdot i\right)\right) \]
      3. *-lowering-*.f6459.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), \mathsf{*.f64}\left(c, \color{blue}{i}\right)\right) \]
    10. Simplified59.9%

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 43.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+101}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 6.4 \cdot 10^{+142}:\\ \;\;\;\;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) -1e+101) (* a b) (if (<= (* a b) 6.4e+142) (* 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) <= -1e+101) {
		tmp = a * b;
	} else if ((a * b) <= 6.4e+142) {
		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) <= (-1d+101)) then
        tmp = a * b
    else if ((a * b) <= 6.4d+142) 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) <= -1e+101) {
		tmp = a * b;
	} else if ((a * b) <= 6.4e+142) {
		tmp = z * t;
	} else {
		tmp = a * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (a * b) <= -1e+101:
		tmp = a * b
	elif (a * b) <= 6.4e+142:
		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) <= -1e+101)
		tmp = Float64(a * b);
	elseif (Float64(a * b) <= 6.4e+142)
		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) <= -1e+101)
		tmp = a * b;
	elseif ((a * b) <= 6.4e+142)
		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], -1e+101], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 6.4e+142], N[(z * t), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -9.9999999999999998e100 or 6.40000000000000011e142 < (*.f64 a b)

    1. Initial program 92.6%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6492.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified92.6%

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

      \[\leadsto \color{blue}{a \cdot b} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6468.7%

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{b}\right) \]
    7. Simplified68.7%

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

    if -9.9999999999999998e100 < (*.f64 a b) < 6.40000000000000011e142

    1. Initial program 97.7%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6497.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.7%

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

      \[\leadsto \color{blue}{t \cdot z} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6436.3%

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{z}\right) \]
    7. Simplified36.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+101}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 6.4 \cdot 10^{+142}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 43.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -3.5 \cdot 10^{+31}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 1.3 \cdot 10^{+109}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* a b) -3.5e+31) (* a b) (if (<= (* a b) 1.3e+109) (* 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) <= -3.5e+31) {
		tmp = a * b;
	} else if ((a * b) <= 1.3e+109) {
		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) <= (-3.5d+31)) then
        tmp = a * b
    else if ((a * b) <= 1.3d+109) 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) <= -3.5e+31) {
		tmp = a * b;
	} else if ((a * b) <= 1.3e+109) {
		tmp = c * i;
	} else {
		tmp = a * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (a * b) <= -3.5e+31:
		tmp = a * b
	elif (a * b) <= 1.3e+109:
		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) <= -3.5e+31)
		tmp = Float64(a * b);
	elseif (Float64(a * b) <= 1.3e+109)
		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) <= -3.5e+31)
		tmp = a * b;
	elseif ((a * b) <= 1.3e+109)
		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], -3.5e+31], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.3e+109], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -3.5e31 or 1.2999999999999999e109 < (*.f64 a b)

    1. Initial program 94.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
      12. *-lowering-*.f6494.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified94.0%

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

      \[\leadsto \color{blue}{a \cdot b} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6459.3%

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{b}\right) \]
    7. Simplified59.3%

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

    if -3.5e31 < (*.f64 a b) < 1.2999999999999999e109

    1. Initial program 97.4%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Step-by-step derivation
      1. associate-+l+N/A

        \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
      3. associate-+l+N/A

        \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
    3. Simplified97.4%

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

      \[\leadsto \color{blue}{c \cdot i} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6433.0%

        \[\leadsto \mathsf{*.f64}\left(c, \color{blue}{i}\right) \]
    7. Simplified33.0%

      \[\leadsto \color{blue}{c \cdot i} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 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. Step-by-step derivation
    1. associate-+l+N/A

      \[\leadsto \left(x \cdot y + z \cdot t\right) + \color{blue}{\left(a \cdot b + c \cdot i\right)} \]
    2. +-commutativeN/A

      \[\leadsto \left(z \cdot t + x \cdot y\right) + \left(\color{blue}{a \cdot b} + c \cdot i\right) \]
    3. associate-+l+N/A

      \[\leadsto z \cdot t + \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\left(z \cdot t\right), \color{blue}{\left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)}\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\color{blue}{x \cdot y} + \left(a \cdot b + c \cdot i\right)\right)\right) \]
    6. associate-+r+N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot y + a \cdot b\right) + \color{blue}{c \cdot i}\right)\right) \]
    7. +-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(c \cdot i + \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
    8. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\left(c \cdot i\right), \color{blue}{\left(x \cdot y + a \cdot b\right)}\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \left(\color{blue}{x \cdot y} + a \cdot b\right)\right)\right) \]
    10. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\left(x \cdot y\right), \color{blue}{\left(a \cdot b\right)}\right)\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{a} \cdot b\right)\right)\right)\right) \]
    12. *-lowering-*.f6496.1%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(c, i\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
  3. Simplified96.1%

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

    \[\leadsto \color{blue}{a \cdot b} \]
  6. Step-by-step derivation
    1. *-lowering-*.f6426.5%

      \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{b}\right) \]
  7. Simplified26.5%

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

Reproduce

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