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

Percentage Accurate: 95.8% → 97.7%
Time: 15.1s
Alternatives: 20
Speedup: 0.5×

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 20 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.8% 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.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* c i) (+ (* a b) (+ (* x y) (* z t))))))
   (if (<= t_1 INFINITY) t_1 (fma i c (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = fma(i, c, (a * b));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = fma(i, c, Float64(a * b));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(i * c + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\


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

    1. Initial program 100.0%

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

    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. Taylor expanded in x around 0 20.0%

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

      \[\leadsto \color{blue}{a \cdot b + c \cdot i} \]
    4. Step-by-step derivation
      1. +-commutative40.1%

        \[\leadsto \color{blue}{c \cdot i + a \cdot b} \]
      2. *-commutative40.1%

        \[\leadsto \color{blue}{i \cdot c} + a \cdot b \]
      3. fma-def70.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, a \cdot b\right)} \]
    5. Applied egg-rr70.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, a \cdot b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

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

Alternative 2: 97.9% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, \mathsf{fma}\left(a, b, c \cdot i\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma x y (fma z t (fma a b (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(x, y, fma(z, t, fma(a, b, (c * i))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(x, y, fma(z, t, fma(a, b, Float64(c * i))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(x * y + N[(z * t + N[(a * b + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, \mathsf{fma}\left(a, b, c \cdot i\right)\right)\right)
\end{array}
Derivation
  1. Initial program 96.1%

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, \mathsf{fma}\left(a, b, c \cdot i\right)\right)\right) \]

Alternative 3: 97.9% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma c i (fma x y (fma z t (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(c, i, fma(x, y, fma(z, t, (a * b))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(c, i, fma(x, y, fma(z, t, Float64(a * b))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(c * i + N[(x * y + N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)
\end{array}
Derivation
  1. Initial program 96.1%

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right) \]

Alternative 4: 97.4% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, a \cdot b + z \cdot t\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma c i (fma x y (+ (* a b) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(c, i, fma(x, y, ((a * b) + (z * t))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(c, i, fma(x, y, Float64(Float64(a * b) + Float64(z * t))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(c * i + N[(x * y + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, a \cdot b + z \cdot t\right)\right)
\end{array}
Derivation
  1. Initial program 96.1%

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
  4. Step-by-step derivation
    1. fma-udef97.6%

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

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

    \[\leadsto \mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, a \cdot b + z \cdot t\right)\right) \]

Alternative 5: 97.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, b, z \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* c i) (+ (* a b) (+ (* x y) (* z t))))))
   (if (<= t_1 INFINITY) t_1 (fma a b (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = fma(a, b, (z * t));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = fma(a, b, Float64(z * t));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * b + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, b, z \cdot t\right)\\


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

    1. Initial program 100.0%

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

    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. +-commutative0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef40.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in x around 0 41.6%

      \[\leadsto \color{blue}{a \cdot b + t \cdot z} \]
    8. Step-by-step derivation
      1. fma-def51.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, b, t \cdot z\right)} \]
    9. Simplified51.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, b, t \cdot z\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.1%

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

Alternative 6: 42.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+75}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -5.5 \cdot 10^{+41}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -8.5 \cdot 10^{+22}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \cdot y \leq -2.55 \cdot 10^{-14}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -2.5 \cdot 10^{-54}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{-225}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 7.2 \cdot 10^{-87}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \cdot y \leq 7 \cdot 10^{+164}:\\ \;\;\;\;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+75)
   (* x y)
   (if (<= (* x y) -5.5e+41)
     (* z t)
     (if (<= (* x y) -8.5e+22)
       (* a b)
       (if (<= (* x y) -2.55e-14)
         (* z t)
         (if (<= (* x y) -2.5e-54)
           (* c i)
           (if (<= (* x y) 3.5e-225)
             (* z t)
             (if (<= (* x y) 7.2e-87)
               (* a b)
               (if (<= (* x y) 7e+164) (* 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+75) {
		tmp = x * y;
	} else if ((x * y) <= -5.5e+41) {
		tmp = z * t;
	} else if ((x * y) <= -8.5e+22) {
		tmp = a * b;
	} else if ((x * y) <= -2.55e-14) {
		tmp = z * t;
	} else if ((x * y) <= -2.5e-54) {
		tmp = c * i;
	} else if ((x * y) <= 3.5e-225) {
		tmp = z * t;
	} else if ((x * y) <= 7.2e-87) {
		tmp = a * b;
	} else if ((x * y) <= 7e+164) {
		tmp = c * i;
	} else {
		tmp = x * y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((x * y) <= (-5d+75)) then
        tmp = x * y
    else if ((x * y) <= (-5.5d+41)) then
        tmp = z * t
    else if ((x * y) <= (-8.5d+22)) then
        tmp = a * b
    else if ((x * y) <= (-2.55d-14)) then
        tmp = z * t
    else if ((x * y) <= (-2.5d-54)) then
        tmp = c * i
    else if ((x * y) <= 3.5d-225) then
        tmp = z * t
    else if ((x * y) <= 7.2d-87) then
        tmp = a * b
    else if ((x * y) <= 7d+164) then
        tmp = c * i
    else
        tmp = x * y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x * y) <= -5e+75) {
		tmp = x * y;
	} else if ((x * y) <= -5.5e+41) {
		tmp = z * t;
	} else if ((x * y) <= -8.5e+22) {
		tmp = a * b;
	} else if ((x * y) <= -2.55e-14) {
		tmp = z * t;
	} else if ((x * y) <= -2.5e-54) {
		tmp = c * i;
	} else if ((x * y) <= 3.5e-225) {
		tmp = z * t;
	} else if ((x * y) <= 7.2e-87) {
		tmp = a * b;
	} else if ((x * y) <= 7e+164) {
		tmp = c * i;
	} else {
		tmp = x * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (x * y) <= -5e+75:
		tmp = x * y
	elif (x * y) <= -5.5e+41:
		tmp = z * t
	elif (x * y) <= -8.5e+22:
		tmp = a * b
	elif (x * y) <= -2.55e-14:
		tmp = z * t
	elif (x * y) <= -2.5e-54:
		tmp = c * i
	elif (x * y) <= 3.5e-225:
		tmp = z * t
	elif (x * y) <= 7.2e-87:
		tmp = a * b
	elif (x * y) <= 7e+164:
		tmp = c * i
	else:
		tmp = x * y
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(x * y) <= -5e+75)
		tmp = Float64(x * y);
	elseif (Float64(x * y) <= -5.5e+41)
		tmp = Float64(z * t);
	elseif (Float64(x * y) <= -8.5e+22)
		tmp = Float64(a * b);
	elseif (Float64(x * y) <= -2.55e-14)
		tmp = Float64(z * t);
	elseif (Float64(x * y) <= -2.5e-54)
		tmp = Float64(c * i);
	elseif (Float64(x * y) <= 3.5e-225)
		tmp = Float64(z * t);
	elseif (Float64(x * y) <= 7.2e-87)
		tmp = Float64(a * b);
	elseif (Float64(x * y) <= 7e+164)
		tmp = Float64(c * i);
	else
		tmp = Float64(x * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((x * y) <= -5e+75)
		tmp = x * y;
	elseif ((x * y) <= -5.5e+41)
		tmp = z * t;
	elseif ((x * y) <= -8.5e+22)
		tmp = a * b;
	elseif ((x * y) <= -2.55e-14)
		tmp = z * t;
	elseif ((x * y) <= -2.5e-54)
		tmp = c * i;
	elseif ((x * y) <= 3.5e-225)
		tmp = z * t;
	elseif ((x * y) <= 7.2e-87)
		tmp = a * b;
	elseif ((x * y) <= 7e+164)
		tmp = c * i;
	else
		tmp = x * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -5e+75], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5.5e+41], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -8.5e+22], N[(a * b), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2.55e-14], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2.5e-54], N[(c * i), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.5e-225], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 7.2e-87], N[(a * b), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 7e+164], N[(c * i), $MachinePrecision], N[(x * y), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \cdot y \leq -5.5 \cdot 10^{+41}:\\
\;\;\;\;z \cdot t\\

\mathbf{elif}\;x \cdot y \leq -8.5 \cdot 10^{+22}:\\
\;\;\;\;a \cdot b\\

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

\mathbf{elif}\;x \cdot y \leq -2.5 \cdot 10^{-54}:\\
\;\;\;\;c \cdot i\\

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

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

\mathbf{elif}\;x \cdot y \leq 7 \cdot 10^{+164}:\\
\;\;\;\;c \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -5.0000000000000002e75 or 6.9999999999999995e164 < (*.f64 x y)

    1. Initial program 93.7%

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

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

    if -5.0000000000000002e75 < (*.f64 x y) < -5.5000000000000003e41 or -8.49999999999999979e22 < (*.f64 x y) < -2.5499999999999999e-14 or -2.50000000000000008e-54 < (*.f64 x y) < 3.4999999999999997e-225

    1. Initial program 99.0%

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

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

    if -5.5000000000000003e41 < (*.f64 x y) < -8.49999999999999979e22 or 3.4999999999999997e-225 < (*.f64 x y) < 7.19999999999999986e-87

    1. Initial program 95.6%

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

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

    if -2.5499999999999999e-14 < (*.f64 x y) < -2.50000000000000008e-54 or 7.19999999999999986e-87 < (*.f64 x y) < 6.9999999999999995e164

    1. Initial program 94.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+75}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -5.5 \cdot 10^{+41}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -8.5 \cdot 10^{+22}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \cdot y \leq -2.55 \cdot 10^{-14}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -2.5 \cdot 10^{-54}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{-225}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 7.2 \cdot 10^{-87}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;x \cdot y \leq 7 \cdot 10^{+164}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 7: 62.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b + z \cdot t\\ t_2 := c \cdot i + a \cdot b\\ \mathbf{if}\;x \cdot y \leq -4.8 \cdot 10^{+107}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -4.2 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq -2.4 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 7.2 \cdot 10^{+84}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 5.5 \cdot 10^{+235}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* a b) (* z t))) (t_2 (+ (* c i) (* a b))))
   (if (<= (* x y) -4.8e+107)
     (* x y)
     (if (<= (* x y) -4.2e-13)
       t_1
       (if (<= (* x y) -2.4e-54)
         t_2
         (if (<= (* x y) 2e-235)
           t_1
           (if (<= (* x y) 7.2e+84)
             t_2
             (if (<= (* x y) 5.2e+111)
               t_1
               (if (<= (* x y) 5.5e+235) t_2 (* x y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (z * t);
	double t_2 = (c * i) + (a * b);
	double tmp;
	if ((x * y) <= -4.8e+107) {
		tmp = x * y;
	} else if ((x * y) <= -4.2e-13) {
		tmp = t_1;
	} else if ((x * y) <= -2.4e-54) {
		tmp = t_2;
	} else if ((x * y) <= 2e-235) {
		tmp = t_1;
	} else if ((x * y) <= 7.2e+84) {
		tmp = t_2;
	} else if ((x * y) <= 5.2e+111) {
		tmp = t_1;
	} else if ((x * y) <= 5.5e+235) {
		tmp = t_2;
	} else {
		tmp = x * y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (a * b) + (z * t)
    t_2 = (c * i) + (a * b)
    if ((x * y) <= (-4.8d+107)) then
        tmp = x * y
    else if ((x * y) <= (-4.2d-13)) then
        tmp = t_1
    else if ((x * y) <= (-2.4d-54)) then
        tmp = t_2
    else if ((x * y) <= 2d-235) then
        tmp = t_1
    else if ((x * y) <= 7.2d+84) then
        tmp = t_2
    else if ((x * y) <= 5.2d+111) then
        tmp = t_1
    else if ((x * y) <= 5.5d+235) then
        tmp = t_2
    else
        tmp = x * y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (z * t);
	double t_2 = (c * i) + (a * b);
	double tmp;
	if ((x * y) <= -4.8e+107) {
		tmp = x * y;
	} else if ((x * y) <= -4.2e-13) {
		tmp = t_1;
	} else if ((x * y) <= -2.4e-54) {
		tmp = t_2;
	} else if ((x * y) <= 2e-235) {
		tmp = t_1;
	} else if ((x * y) <= 7.2e+84) {
		tmp = t_2;
	} else if ((x * y) <= 5.2e+111) {
		tmp = t_1;
	} else if ((x * y) <= 5.5e+235) {
		tmp = t_2;
	} else {
		tmp = x * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (a * b) + (z * t)
	t_2 = (c * i) + (a * b)
	tmp = 0
	if (x * y) <= -4.8e+107:
		tmp = x * y
	elif (x * y) <= -4.2e-13:
		tmp = t_1
	elif (x * y) <= -2.4e-54:
		tmp = t_2
	elif (x * y) <= 2e-235:
		tmp = t_1
	elif (x * y) <= 7.2e+84:
		tmp = t_2
	elif (x * y) <= 5.2e+111:
		tmp = t_1
	elif (x * y) <= 5.5e+235:
		tmp = t_2
	else:
		tmp = x * y
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(a * b) + Float64(z * t))
	t_2 = Float64(Float64(c * i) + Float64(a * b))
	tmp = 0.0
	if (Float64(x * y) <= -4.8e+107)
		tmp = Float64(x * y);
	elseif (Float64(x * y) <= -4.2e-13)
		tmp = t_1;
	elseif (Float64(x * y) <= -2.4e-54)
		tmp = t_2;
	elseif (Float64(x * y) <= 2e-235)
		tmp = t_1;
	elseif (Float64(x * y) <= 7.2e+84)
		tmp = t_2;
	elseif (Float64(x * y) <= 5.2e+111)
		tmp = t_1;
	elseif (Float64(x * y) <= 5.5e+235)
		tmp = t_2;
	else
		tmp = Float64(x * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (a * b) + (z * t);
	t_2 = (c * i) + (a * b);
	tmp = 0.0;
	if ((x * y) <= -4.8e+107)
		tmp = x * y;
	elseif ((x * y) <= -4.2e-13)
		tmp = t_1;
	elseif ((x * y) <= -2.4e-54)
		tmp = t_2;
	elseif ((x * y) <= 2e-235)
		tmp = t_1;
	elseif ((x * y) <= 7.2e+84)
		tmp = t_2;
	elseif ((x * y) <= 5.2e+111)
		tmp = t_1;
	elseif ((x * y) <= 5.5e+235)
		tmp = t_2;
	else
		tmp = x * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * i), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.8e+107], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4.2e-13], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -2.4e-54], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 2e-235], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 7.2e+84], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 5.2e+111], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5.5e+235], t$95$2, N[(x * y), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
t_2 := c \cdot i + a \cdot b\\
\mathbf{if}\;x \cdot y \leq -4.8 \cdot 10^{+107}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \cdot y \leq -4.2 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq -2.4 \cdot 10^{-54}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-235}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 7.2 \cdot 10^{+84}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 5.2 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 5.5 \cdot 10^{+235}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.8000000000000001e107 or 5.49999999999999945e235 < (*.f64 x y)

    1. Initial program 95.5%

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

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

    if -4.8000000000000001e107 < (*.f64 x y) < -4.19999999999999977e-13 or -2.40000000000000013e-54 < (*.f64 x y) < 1.9999999999999999e-235 or 7.1999999999999999e84 < (*.f64 x y) < 5.1999999999999997e111

    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. +-commutative98.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.2%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in x around 0 72.7%

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

    if -4.19999999999999977e-13 < (*.f64 x y) < -2.40000000000000013e-54 or 1.9999999999999999e-235 < (*.f64 x y) < 7.1999999999999999e84 or 5.1999999999999997e111 < (*.f64 x y) < 5.49999999999999945e235

    1. Initial program 92.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.8 \cdot 10^{+107}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -4.2 \cdot 10^{-13}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -2.4 \cdot 10^{-54}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-235}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 7.2 \cdot 10^{+84}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{elif}\;x \cdot y \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 5.5 \cdot 10^{+235}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 8: 64.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b + z \cdot t\\ t_2 := c \cdot i + a \cdot b\\ \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+75}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -4.6 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq -1.22 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 1.05 \cdot 10^{-233}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+84}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 6.6 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+234}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* a b) (* z t))) (t_2 (+ (* c i) (* a b))))
   (if (<= (* x y) -5e+75)
     (+ (* a b) (* x y))
     (if (<= (* x y) -4.6e-17)
       t_1
       (if (<= (* x y) -1.22e-54)
         t_2
         (if (<= (* x y) 1.05e-233)
           t_1
           (if (<= (* x y) 3.8e+84)
             t_2
             (if (<= (* x y) 6.6e+111)
               t_1
               (if (<= (* x y) 7.5e+234) t_2 (* x y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (z * t);
	double t_2 = (c * i) + (a * b);
	double tmp;
	if ((x * y) <= -5e+75) {
		tmp = (a * b) + (x * y);
	} else if ((x * y) <= -4.6e-17) {
		tmp = t_1;
	} else if ((x * y) <= -1.22e-54) {
		tmp = t_2;
	} else if ((x * y) <= 1.05e-233) {
		tmp = t_1;
	} else if ((x * y) <= 3.8e+84) {
		tmp = t_2;
	} else if ((x * y) <= 6.6e+111) {
		tmp = t_1;
	} else if ((x * y) <= 7.5e+234) {
		tmp = t_2;
	} else {
		tmp = x * y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (a * b) + (z * t)
    t_2 = (c * i) + (a * b)
    if ((x * y) <= (-5d+75)) then
        tmp = (a * b) + (x * y)
    else if ((x * y) <= (-4.6d-17)) then
        tmp = t_1
    else if ((x * y) <= (-1.22d-54)) then
        tmp = t_2
    else if ((x * y) <= 1.05d-233) then
        tmp = t_1
    else if ((x * y) <= 3.8d+84) then
        tmp = t_2
    else if ((x * y) <= 6.6d+111) then
        tmp = t_1
    else if ((x * y) <= 7.5d+234) then
        tmp = t_2
    else
        tmp = x * y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (z * t);
	double t_2 = (c * i) + (a * b);
	double tmp;
	if ((x * y) <= -5e+75) {
		tmp = (a * b) + (x * y);
	} else if ((x * y) <= -4.6e-17) {
		tmp = t_1;
	} else if ((x * y) <= -1.22e-54) {
		tmp = t_2;
	} else if ((x * y) <= 1.05e-233) {
		tmp = t_1;
	} else if ((x * y) <= 3.8e+84) {
		tmp = t_2;
	} else if ((x * y) <= 6.6e+111) {
		tmp = t_1;
	} else if ((x * y) <= 7.5e+234) {
		tmp = t_2;
	} else {
		tmp = x * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (a * b) + (z * t)
	t_2 = (c * i) + (a * b)
	tmp = 0
	if (x * y) <= -5e+75:
		tmp = (a * b) + (x * y)
	elif (x * y) <= -4.6e-17:
		tmp = t_1
	elif (x * y) <= -1.22e-54:
		tmp = t_2
	elif (x * y) <= 1.05e-233:
		tmp = t_1
	elif (x * y) <= 3.8e+84:
		tmp = t_2
	elif (x * y) <= 6.6e+111:
		tmp = t_1
	elif (x * y) <= 7.5e+234:
		tmp = t_2
	else:
		tmp = x * y
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(a * b) + Float64(z * t))
	t_2 = Float64(Float64(c * i) + Float64(a * b))
	tmp = 0.0
	if (Float64(x * y) <= -5e+75)
		tmp = Float64(Float64(a * b) + Float64(x * y));
	elseif (Float64(x * y) <= -4.6e-17)
		tmp = t_1;
	elseif (Float64(x * y) <= -1.22e-54)
		tmp = t_2;
	elseif (Float64(x * y) <= 1.05e-233)
		tmp = t_1;
	elseif (Float64(x * y) <= 3.8e+84)
		tmp = t_2;
	elseif (Float64(x * y) <= 6.6e+111)
		tmp = t_1;
	elseif (Float64(x * y) <= 7.5e+234)
		tmp = t_2;
	else
		tmp = Float64(x * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (a * b) + (z * t);
	t_2 = (c * i) + (a * b);
	tmp = 0.0;
	if ((x * y) <= -5e+75)
		tmp = (a * b) + (x * y);
	elseif ((x * y) <= -4.6e-17)
		tmp = t_1;
	elseif ((x * y) <= -1.22e-54)
		tmp = t_2;
	elseif ((x * y) <= 1.05e-233)
		tmp = t_1;
	elseif ((x * y) <= 3.8e+84)
		tmp = t_2;
	elseif ((x * y) <= 6.6e+111)
		tmp = t_1;
	elseif ((x * y) <= 7.5e+234)
		tmp = t_2;
	else
		tmp = x * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * i), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5e+75], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4.6e-17], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1.22e-54], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1.05e-233], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.8e+84], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 6.6e+111], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 7.5e+234], t$95$2, N[(x * y), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
t_2 := c \cdot i + a \cdot b\\
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+75}:\\
\;\;\;\;a \cdot b + x \cdot y\\

\mathbf{elif}\;x \cdot y \leq -4.6 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq -1.22 \cdot 10^{-54}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 1.05 \cdot 10^{-233}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+84}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 6.6 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+234}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -5.0000000000000002e75

    1. Initial program 93.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef95.6%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in t around 0 74.0%

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

    if -5.0000000000000002e75 < (*.f64 x y) < -4.60000000000000018e-17 or -1.22e-54 < (*.f64 x y) < 1.0499999999999999e-233 or 3.8000000000000001e84 < (*.f64 x y) < 6.6000000000000002e111

    1. Initial program 99.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef100.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in x around 0 74.1%

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

    if -4.60000000000000018e-17 < (*.f64 x y) < -1.22e-54 or 1.0499999999999999e-233 < (*.f64 x y) < 3.8000000000000001e84 or 6.6000000000000002e111 < (*.f64 x y) < 7.5000000000000004e234

    1. Initial program 92.6%

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

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

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

    if 7.5000000000000004e234 < (*.f64 x y)

    1. Initial program 96.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+75}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -4.6 \cdot 10^{-17}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -1.22 \cdot 10^{-54}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{elif}\;x \cdot y \leq 1.05 \cdot 10^{-233}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+84}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{elif}\;x \cdot y \leq 6.6 \cdot 10^{+111}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+234}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 9: 66.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b + x \cdot y\\ t_2 := c \cdot i + z \cdot t\\ t_3 := a \cdot b + z \cdot t\\ \mathbf{if}\;c \cdot i \leq -9 \cdot 10^{+82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq -8.5 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq -9 \cdot 10^{-180}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \cdot i \leq -5.2 \cdot 10^{-228}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq 5.6 \cdot 10^{-159}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \cdot i \leq 0.066:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq 1.2 \cdot 10^{+47}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* a b) (* x y)))
        (t_2 (+ (* c i) (* z t)))
        (t_3 (+ (* a b) (* z t))))
   (if (<= (* c i) -9e+82)
     t_2
     (if (<= (* c i) -8.5e-57)
       t_1
       (if (<= (* c i) -9e-180)
         t_3
         (if (<= (* c i) -5.2e-228)
           t_1
           (if (<= (* c i) 5.6e-159)
             t_3
             (if (<= (* c i) 0.066)
               t_1
               (if (<= (* c i) 1.2e+47) t_3 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (x * y);
	double t_2 = (c * i) + (z * t);
	double t_3 = (a * b) + (z * t);
	double tmp;
	if ((c * i) <= -9e+82) {
		tmp = t_2;
	} else if ((c * i) <= -8.5e-57) {
		tmp = t_1;
	} else if ((c * i) <= -9e-180) {
		tmp = t_3;
	} else if ((c * i) <= -5.2e-228) {
		tmp = t_1;
	} else if ((c * i) <= 5.6e-159) {
		tmp = t_3;
	} else if ((c * i) <= 0.066) {
		tmp = t_1;
	} else if ((c * i) <= 1.2e+47) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (a * b) + (x * y)
    t_2 = (c * i) + (z * t)
    t_3 = (a * b) + (z * t)
    if ((c * i) <= (-9d+82)) then
        tmp = t_2
    else if ((c * i) <= (-8.5d-57)) then
        tmp = t_1
    else if ((c * i) <= (-9d-180)) then
        tmp = t_3
    else if ((c * i) <= (-5.2d-228)) then
        tmp = t_1
    else if ((c * i) <= 5.6d-159) then
        tmp = t_3
    else if ((c * i) <= 0.066d0) then
        tmp = t_1
    else if ((c * i) <= 1.2d+47) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (x * y);
	double t_2 = (c * i) + (z * t);
	double t_3 = (a * b) + (z * t);
	double tmp;
	if ((c * i) <= -9e+82) {
		tmp = t_2;
	} else if ((c * i) <= -8.5e-57) {
		tmp = t_1;
	} else if ((c * i) <= -9e-180) {
		tmp = t_3;
	} else if ((c * i) <= -5.2e-228) {
		tmp = t_1;
	} else if ((c * i) <= 5.6e-159) {
		tmp = t_3;
	} else if ((c * i) <= 0.066) {
		tmp = t_1;
	} else if ((c * i) <= 1.2e+47) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (a * b) + (x * y)
	t_2 = (c * i) + (z * t)
	t_3 = (a * b) + (z * t)
	tmp = 0
	if (c * i) <= -9e+82:
		tmp = t_2
	elif (c * i) <= -8.5e-57:
		tmp = t_1
	elif (c * i) <= -9e-180:
		tmp = t_3
	elif (c * i) <= -5.2e-228:
		tmp = t_1
	elif (c * i) <= 5.6e-159:
		tmp = t_3
	elif (c * i) <= 0.066:
		tmp = t_1
	elif (c * i) <= 1.2e+47:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(a * b) + Float64(x * y))
	t_2 = Float64(Float64(c * i) + Float64(z * t))
	t_3 = Float64(Float64(a * b) + Float64(z * t))
	tmp = 0.0
	if (Float64(c * i) <= -9e+82)
		tmp = t_2;
	elseif (Float64(c * i) <= -8.5e-57)
		tmp = t_1;
	elseif (Float64(c * i) <= -9e-180)
		tmp = t_3;
	elseif (Float64(c * i) <= -5.2e-228)
		tmp = t_1;
	elseif (Float64(c * i) <= 5.6e-159)
		tmp = t_3;
	elseif (Float64(c * i) <= 0.066)
		tmp = t_1;
	elseif (Float64(c * i) <= 1.2e+47)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (a * b) + (x * y);
	t_2 = (c * i) + (z * t);
	t_3 = (a * b) + (z * t);
	tmp = 0.0;
	if ((c * i) <= -9e+82)
		tmp = t_2;
	elseif ((c * i) <= -8.5e-57)
		tmp = t_1;
	elseif ((c * i) <= -9e-180)
		tmp = t_3;
	elseif ((c * i) <= -5.2e-228)
		tmp = t_1;
	elseif ((c * i) <= 5.6e-159)
		tmp = t_3;
	elseif ((c * i) <= 0.066)
		tmp = t_1;
	elseif ((c * i) <= 1.2e+47)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -9e+82], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], -8.5e-57], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -9e-180], t$95$3, If[LessEqual[N[(c * i), $MachinePrecision], -5.2e-228], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 5.6e-159], t$95$3, If[LessEqual[N[(c * i), $MachinePrecision], 0.066], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 1.2e+47], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot b + x \cdot y\\
t_2 := c \cdot i + z \cdot t\\
t_3 := a \cdot b + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -9 \cdot 10^{+82}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \cdot i \leq -8.5 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \cdot i \leq -9 \cdot 10^{-180}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \cdot i \leq -5.2 \cdot 10^{-228}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \cdot i \leq 5.6 \cdot 10^{-159}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \cdot i \leq 0.066:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \cdot i \leq 1.2 \cdot 10^{+47}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 c i) < -8.9999999999999993e82 or 1.20000000000000009e47 < (*.f64 c i)

    1. Initial program 91.9%

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

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

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

    if -8.9999999999999993e82 < (*.f64 c i) < -8.49999999999999955e-57 or -9.00000000000000019e-180 < (*.f64 c i) < -5.2e-228 or 5.6000000000000004e-159 < (*.f64 c i) < 0.066000000000000003

    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. +-commutative100.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef100.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in t around 0 78.2%

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

    if -8.49999999999999955e-57 < (*.f64 c i) < -9.00000000000000019e-180 or -5.2e-228 < (*.f64 c i) < 5.6000000000000004e-159 or 0.066000000000000003 < (*.f64 c i) < 1.20000000000000009e47

    1. Initial program 98.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in x around 0 75.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -9 \cdot 10^{+82}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \mathbf{elif}\;c \cdot i \leq -8.5 \cdot 10^{-57}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;c \cdot i \leq -9 \cdot 10^{-180}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;c \cdot i \leq -5.2 \cdot 10^{-228}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;c \cdot i \leq 5.6 \cdot 10^{-159}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;c \cdot i \leq 0.066:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;c \cdot i \leq 1.2 \cdot 10^{+47}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \end{array} \]

Alternative 10: 42.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;c \cdot i \leq -2.5 \cdot 10^{+99}:\\
\;\;\;\;z \cdot t\\

\mathbf{elif}\;c \cdot i \leq -1.7 \cdot 10^{+82}:\\
\;\;\;\;c \cdot i\\

\mathbf{elif}\;c \cdot i \leq -2.4 \cdot 10^{-69}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;c \cdot i \leq 1.4 \cdot 10^{-195}:\\
\;\;\;\;z \cdot t\\

\mathbf{elif}\;c \cdot i \leq 3.8 \cdot 10^{-20}:\\
\;\;\;\;a \cdot b\\

\mathbf{elif}\;c \cdot i \leq 3.1 \cdot 10^{+106}:\\
\;\;\;\;z \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 c i) < -2.1000000000000002e140 or -2.50000000000000004e99 < (*.f64 c i) < -1.69999999999999997e82 or 3.0999999999999999e106 < (*.f64 c i)

    1. Initial program 90.2%

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

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

    if -2.1000000000000002e140 < (*.f64 c i) < -2.50000000000000004e99 or -2.4000000000000001e-69 < (*.f64 c i) < 1.40000000000000002e-195 or 3.7999999999999998e-20 < (*.f64 c i) < 3.0999999999999999e106

    1. Initial program 98.3%

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

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

    if -1.69999999999999997e82 < (*.f64 c i) < -2.4000000000000001e-69 or 1.40000000000000002e-195 < (*.f64 c i) < 3.7999999999999998e-20

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -2.1 \cdot 10^{+140}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq -2.5 \cdot 10^{+99}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;c \cdot i \leq -1.7 \cdot 10^{+82}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq -2.4 \cdot 10^{-69}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;c \cdot i \leq 1.4 \cdot 10^{-195}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;c \cdot i \leq 3.8 \cdot 10^{-20}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;c \cdot i \leq 3.1 \cdot 10^{+106}:\\ \;\;\;\;z \cdot t\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]

Alternative 11: 97.1% accurate, 0.5× speedup?

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

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

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


\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 \]

    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. +-commutative0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef40.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in x around 0 41.6%

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

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

Alternative 12: 58.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot i + a \cdot b\\
\mathbf{if}\;x \cdot y \leq -5.3 \cdot 10^{+75}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \cdot y \leq -6.8 \cdot 10^{+41}:\\
\;\;\;\;z \cdot t\\

\mathbf{elif}\;x \cdot y \leq -3.4 \cdot 10^{-115}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq 1.7 \cdot 10^{+238}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -5.2999999999999998e75 or 1.6999999999999999e238 < (*.f64 x y)

    1. Initial program 94.5%

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

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

    if -5.2999999999999998e75 < (*.f64 x y) < -6.79999999999999996e41 or -3.3999999999999998e-115 < (*.f64 x y) < -7.6999999999999997e-274

    1. Initial program 100.0%

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

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

    if -6.79999999999999996e41 < (*.f64 x y) < -3.3999999999999998e-115 or -7.6999999999999997e-274 < (*.f64 x y) < 1.6999999999999999e238

    1. Initial program 95.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5.3 \cdot 10^{+75}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -6.8 \cdot 10^{+41}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq -3.4 \cdot 10^{-115}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{elif}\;x \cdot y \leq -7.7 \cdot 10^{-274}:\\ \;\;\;\;z \cdot t\\ \mathbf{elif}\;x \cdot y \leq 1.7 \cdot 10^{+238}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 13: 60.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b + z \cdot t\\ t_2 := c \cdot i + x \cdot y\\ t_3 := a \cdot b + x \cdot y\\ \mathbf{if}\;c \leq -5.5 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.75 \cdot 10^{-140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.72 \cdot 10^{-186}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -9 \cdot 10^{-246}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{-302}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 5.2 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* a b) (* z t)))
        (t_2 (+ (* c i) (* x y)))
        (t_3 (+ (* a b) (* x y))))
   (if (<= c -5.5e+71)
     t_2
     (if (<= c -1.75e-140)
       t_1
       (if (<= c -1.72e-186)
         t_3
         (if (<= c -9e-246)
           t_1
           (if (<= c -1.1e-302) t_3 (if (<= c 5.2e-114) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (z * t);
	double t_2 = (c * i) + (x * y);
	double t_3 = (a * b) + (x * y);
	double tmp;
	if (c <= -5.5e+71) {
		tmp = t_2;
	} else if (c <= -1.75e-140) {
		tmp = t_1;
	} else if (c <= -1.72e-186) {
		tmp = t_3;
	} else if (c <= -9e-246) {
		tmp = t_1;
	} else if (c <= -1.1e-302) {
		tmp = t_3;
	} else if (c <= 5.2e-114) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (a * b) + (z * t)
    t_2 = (c * i) + (x * y)
    t_3 = (a * b) + (x * y)
    if (c <= (-5.5d+71)) then
        tmp = t_2
    else if (c <= (-1.75d-140)) then
        tmp = t_1
    else if (c <= (-1.72d-186)) then
        tmp = t_3
    else if (c <= (-9d-246)) then
        tmp = t_1
    else if (c <= (-1.1d-302)) then
        tmp = t_3
    else if (c <= 5.2d-114) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (z * t);
	double t_2 = (c * i) + (x * y);
	double t_3 = (a * b) + (x * y);
	double tmp;
	if (c <= -5.5e+71) {
		tmp = t_2;
	} else if (c <= -1.75e-140) {
		tmp = t_1;
	} else if (c <= -1.72e-186) {
		tmp = t_3;
	} else if (c <= -9e-246) {
		tmp = t_1;
	} else if (c <= -1.1e-302) {
		tmp = t_3;
	} else if (c <= 5.2e-114) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (a * b) + (z * t)
	t_2 = (c * i) + (x * y)
	t_3 = (a * b) + (x * y)
	tmp = 0
	if c <= -5.5e+71:
		tmp = t_2
	elif c <= -1.75e-140:
		tmp = t_1
	elif c <= -1.72e-186:
		tmp = t_3
	elif c <= -9e-246:
		tmp = t_1
	elif c <= -1.1e-302:
		tmp = t_3
	elif c <= 5.2e-114:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(a * b) + Float64(z * t))
	t_2 = Float64(Float64(c * i) + Float64(x * y))
	t_3 = Float64(Float64(a * b) + Float64(x * y))
	tmp = 0.0
	if (c <= -5.5e+71)
		tmp = t_2;
	elseif (c <= -1.75e-140)
		tmp = t_1;
	elseif (c <= -1.72e-186)
		tmp = t_3;
	elseif (c <= -9e-246)
		tmp = t_1;
	elseif (c <= -1.1e-302)
		tmp = t_3;
	elseif (c <= 5.2e-114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (a * b) + (z * t);
	t_2 = (c * i) + (x * y);
	t_3 = (a * b) + (x * y);
	tmp = 0.0;
	if (c <= -5.5e+71)
		tmp = t_2;
	elseif (c <= -1.75e-140)
		tmp = t_1;
	elseif (c <= -1.72e-186)
		tmp = t_3;
	elseif (c <= -9e-246)
		tmp = t_1;
	elseif (c <= -1.1e-302)
		tmp = t_3;
	elseif (c <= 5.2e-114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * i), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5.5e+71], t$95$2, If[LessEqual[c, -1.75e-140], t$95$1, If[LessEqual[c, -1.72e-186], t$95$3, If[LessEqual[c, -9e-246], t$95$1, If[LessEqual[c, -1.1e-302], t$95$3, If[LessEqual[c, 5.2e-114], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
t_2 := c \cdot i + x \cdot y\\
t_3 := a \cdot b + x \cdot y\\
\mathbf{if}\;c \leq -5.5 \cdot 10^{+71}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -1.75 \cdot 10^{-140}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -1.72 \cdot 10^{-186}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq -9 \cdot 10^{-246}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -1.1 \cdot 10^{-302}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 5.2 \cdot 10^{-114}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -5.5e71 or 5.20000000000000026e-114 < c

    1. Initial program 93.9%

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

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

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

    if -5.5e71 < c < -1.7499999999999999e-140 or -1.72e-186 < c < -8.99999999999999998e-246 or -1.10000000000000004e-302 < c < 5.20000000000000026e-114

    1. Initial program 99.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in x around 0 66.4%

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

    if -1.7499999999999999e-140 < c < -1.72e-186 or -8.99999999999999998e-246 < c < -1.10000000000000004e-302

    1. Initial program 95.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef100.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in t around 0 70.7%

      \[\leadsto \color{blue}{a \cdot b + x \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -5.5 \cdot 10^{+71}:\\ \;\;\;\;c \cdot i + x \cdot y\\ \mathbf{elif}\;c \leq -1.75 \cdot 10^{-140}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;c \leq -1.72 \cdot 10^{-186}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;c \leq -9 \cdot 10^{-246}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{-302}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;c \leq 5.2 \cdot 10^{-114}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + x \cdot y\\ \end{array} \]

Alternative 14: 60.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot b + z \cdot t\\ t_2 := c \cdot i + x \cdot y\\ \mathbf{if}\;c \leq -2.7 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.6 \cdot 10^{-140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -2.55 \cdot 10^{-186}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;c \leq -5.5 \cdot 10^{-227}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -5.4 \cdot 10^{-304}:\\ \;\;\;\;x \cdot y + z \cdot t\\ \mathbf{elif}\;c \leq 6.1 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* a b) (* z t))) (t_2 (+ (* c i) (* x y))))
   (if (<= c -2.7e+72)
     t_2
     (if (<= c -1.6e-140)
       t_1
       (if (<= c -2.55e-186)
         (+ (* a b) (* x y))
         (if (<= c -5.5e-227)
           t_1
           (if (<= c -5.4e-304)
             (+ (* x y) (* z t))
             (if (<= c 6.1e-114) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (z * t);
	double t_2 = (c * i) + (x * y);
	double tmp;
	if (c <= -2.7e+72) {
		tmp = t_2;
	} else if (c <= -1.6e-140) {
		tmp = t_1;
	} else if (c <= -2.55e-186) {
		tmp = (a * b) + (x * y);
	} else if (c <= -5.5e-227) {
		tmp = t_1;
	} else if (c <= -5.4e-304) {
		tmp = (x * y) + (z * t);
	} else if (c <= 6.1e-114) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (a * b) + (z * t)
    t_2 = (c * i) + (x * y)
    if (c <= (-2.7d+72)) then
        tmp = t_2
    else if (c <= (-1.6d-140)) then
        tmp = t_1
    else if (c <= (-2.55d-186)) then
        tmp = (a * b) + (x * y)
    else if (c <= (-5.5d-227)) then
        tmp = t_1
    else if (c <= (-5.4d-304)) then
        tmp = (x * y) + (z * t)
    else if (c <= 6.1d-114) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * b) + (z * t);
	double t_2 = (c * i) + (x * y);
	double tmp;
	if (c <= -2.7e+72) {
		tmp = t_2;
	} else if (c <= -1.6e-140) {
		tmp = t_1;
	} else if (c <= -2.55e-186) {
		tmp = (a * b) + (x * y);
	} else if (c <= -5.5e-227) {
		tmp = t_1;
	} else if (c <= -5.4e-304) {
		tmp = (x * y) + (z * t);
	} else if (c <= 6.1e-114) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (a * b) + (z * t)
	t_2 = (c * i) + (x * y)
	tmp = 0
	if c <= -2.7e+72:
		tmp = t_2
	elif c <= -1.6e-140:
		tmp = t_1
	elif c <= -2.55e-186:
		tmp = (a * b) + (x * y)
	elif c <= -5.5e-227:
		tmp = t_1
	elif c <= -5.4e-304:
		tmp = (x * y) + (z * t)
	elif c <= 6.1e-114:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(a * b) + Float64(z * t))
	t_2 = Float64(Float64(c * i) + Float64(x * y))
	tmp = 0.0
	if (c <= -2.7e+72)
		tmp = t_2;
	elseif (c <= -1.6e-140)
		tmp = t_1;
	elseif (c <= -2.55e-186)
		tmp = Float64(Float64(a * b) + Float64(x * y));
	elseif (c <= -5.5e-227)
		tmp = t_1;
	elseif (c <= -5.4e-304)
		tmp = Float64(Float64(x * y) + Float64(z * t));
	elseif (c <= 6.1e-114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (a * b) + (z * t);
	t_2 = (c * i) + (x * y);
	tmp = 0.0;
	if (c <= -2.7e+72)
		tmp = t_2;
	elseif (c <= -1.6e-140)
		tmp = t_1;
	elseif (c <= -2.55e-186)
		tmp = (a * b) + (x * y);
	elseif (c <= -5.5e-227)
		tmp = t_1;
	elseif (c <= -5.4e-304)
		tmp = (x * y) + (z * t);
	elseif (c <= 6.1e-114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * i), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.7e+72], t$95$2, If[LessEqual[c, -1.6e-140], t$95$1, If[LessEqual[c, -2.55e-186], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -5.5e-227], t$95$1, If[LessEqual[c, -5.4e-304], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.1e-114], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -1.6 \cdot 10^{-140}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -2.55 \cdot 10^{-186}:\\
\;\;\;\;a \cdot b + x \cdot y\\

\mathbf{elif}\;c \leq -5.5 \cdot 10^{-227}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -5.4 \cdot 10^{-304}:\\
\;\;\;\;x \cdot y + z \cdot t\\

\mathbf{elif}\;c \leq 6.1 \cdot 10^{-114}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -2.7000000000000001e72 or 6.09999999999999977e-114 < c

    1. Initial program 93.9%

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

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

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

    if -2.7000000000000001e72 < c < -1.6000000000000001e-140 or -2.5500000000000002e-186 < c < -5.5e-227 or -5.40000000000000021e-304 < c < 6.09999999999999977e-114

    1. Initial program 99.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in x around 0 65.4%

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

    if -1.6000000000000001e-140 < c < -2.5500000000000002e-186

    1. Initial program 91.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef100.0%

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

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    7. Taylor expanded in t around 0 67.6%

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

    if -5.5e-227 < c < -5.40000000000000021e-304

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.7 \cdot 10^{+72}:\\ \;\;\;\;c \cdot i + x \cdot y\\ \mathbf{elif}\;c \leq -1.6 \cdot 10^{-140}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;c \leq -2.55 \cdot 10^{-186}:\\ \;\;\;\;a \cdot b + x \cdot y\\ \mathbf{elif}\;c \leq -5.5 \cdot 10^{-227}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{elif}\;c \leq -5.4 \cdot 10^{-304}:\\ \;\;\;\;x \cdot y + z \cdot t\\ \mathbf{elif}\;c \leq 6.1 \cdot 10^{-114}:\\ \;\;\;\;a \cdot b + z \cdot t\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + x \cdot y\\ \end{array} \]

Alternative 15: 87.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y + z \cdot t\\ \mathbf{if}\;c \cdot i \leq -5.7 \cdot 10^{+76} \lor \neg \left(c \cdot i \leq 5 \cdot 10^{-20}\right):\\ \;\;\;\;c \cdot i + t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* x y) (* z t))))
   (if (or (<= (* c i) -5.7e+76) (not (<= (* c i) 5e-20)))
     (+ (* c i) t_1)
     (+ (* a b) 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) + (z * t);
	double tmp;
	if (((c * i) <= -5.7e+76) || !((c * i) <= 5e-20)) {
		tmp = (c * i) + t_1;
	} else {
		tmp = (a * b) + 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) + (z * t)
    if (((c * i) <= (-5.7d+76)) .or. (.not. ((c * i) <= 5d-20))) then
        tmp = (c * i) + t_1
    else
        tmp = (a * b) + 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) + (z * t);
	double tmp;
	if (((c * i) <= -5.7e+76) || !((c * i) <= 5e-20)) {
		tmp = (c * i) + t_1;
	} else {
		tmp = (a * b) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * y) + (z * t)
	tmp = 0
	if ((c * i) <= -5.7e+76) or not ((c * i) <= 5e-20):
		tmp = (c * i) + t_1
	else:
		tmp = (a * b) + t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * y) + Float64(z * t))
	tmp = 0.0
	if ((Float64(c * i) <= -5.7e+76) || !(Float64(c * i) <= 5e-20))
		tmp = Float64(Float64(c * i) + t_1);
	else
		tmp = Float64(Float64(a * b) + t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (x * y) + (z * t);
	tmp = 0.0;
	if (((c * i) <= -5.7e+76) || ~(((c * i) <= 5e-20)))
		tmp = (c * i) + t_1;
	else
		tmp = (a * b) + 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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(c * i), $MachinePrecision], -5.7e+76], N[Not[LessEqual[N[(c * i), $MachinePrecision], 5e-20]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -5.7 \cdot 10^{+76} \lor \neg \left(c \cdot i \leq 5 \cdot 10^{-20}\right):\\
\;\;\;\;c \cdot i + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 c i) < -5.70000000000000004e76 or 4.9999999999999999e-20 < (*.f64 c i)

    1. Initial program 92.8%

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

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

    if -5.70000000000000004e76 < (*.f64 c i) < 4.9999999999999999e-20

    1. Initial program 98.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -5.7 \cdot 10^{+76} \lor \neg \left(c \cdot i \leq 5 \cdot 10^{-20}\right):\\ \;\;\;\;c \cdot i + \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \end{array} \]

Alternative 16: 85.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 84.9%

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

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

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

    if -2.69999999999999998e147 < (*.f64 c i) < 6.4999999999999999e125

    1. Initial program 98.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.4%

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

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

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

    if 6.4999999999999999e125 < (*.f64 c i)

    1. Initial program 94.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -2.7 \cdot 10^{+147}:\\ \;\;\;\;c \cdot i + x \cdot y\\ \mathbf{elif}\;c \cdot i \leq 6.5 \cdot 10^{+125}:\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + z \cdot t\\ \end{array} \]

Alternative 17: 85.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -6.5 \cdot 10^{-9}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\

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

\mathbf{else}:\\
\;\;\;\;c \cdot i + x \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -6.5000000000000003e-9

    1. Initial program 95.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.0%

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

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

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

    if -6.5000000000000003e-9 < (*.f64 x y) < 9.0000000000000009e186

    1. Initial program 96.8%

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

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

    if 9.0000000000000009e186 < (*.f64 x y)

    1. Initial program 93.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -6.5 \cdot 10^{-9}:\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 9 \cdot 10^{+186}:\\ \;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + x \cdot y\\ \end{array} \]

Alternative 18: 86.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -6.5 \cdot 10^{-9}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -6.5000000000000003e-9

    1. Initial program 95.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.0%

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

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

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

    if -6.5000000000000003e-9 < (*.f64 x y) < 3.09999999999999983e166

    1. Initial program 96.8%

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

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

    if 3.09999999999999983e166 < (*.f64 x y)

    1. Initial program 93.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -6.5 \cdot 10^{-9}:\\ \;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 3.1 \cdot 10^{+166}:\\ \;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + \left(a \cdot b + x \cdot y\right)\\ \end{array} \]

Alternative 19: 42.9% accurate, 1.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 c i) < -1.4e82 or 2.7999999999999999e45 < (*.f64 c i)

    1. Initial program 91.9%

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

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

    if -1.4e82 < (*.f64 c i) < 2.7999999999999999e45

    1. Initial program 98.7%

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

      \[\leadsto \color{blue}{a \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -1.4 \cdot 10^{+82}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 2.8 \cdot 10^{+45}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]

Alternative 20: 27.5% 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. Taylor expanded in a around inf 24.4%

    \[\leadsto \color{blue}{a \cdot b} \]
  3. Final simplification24.4%

    \[\leadsto a \cdot b \]

Reproduce

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