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

Percentage Accurate: 95.9% → 97.7%
Time: 8.5s
Alternatives: 14
Speedup: 1.3×

Specification

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

\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 95.9% 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, 1.3× speedup?

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

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

    \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, \color{blue}{b \cdot a}\right)\right)\right) \]
    18. lower-*.f6498.0

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

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

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

Alternative 2: 75.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(z, t, x \cdot y\right)\\ t_2 := t \cdot z + x \cdot y\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+170}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma z t (* x y))) (t_2 (+ (* t z) (* x y))))
   (if (<= t_2 -1e+170)
     t_1
     (if (<= t_2 2e+15)
       (fma i c (* a b))
       (if (<= t_2 5e+152) (fma b a (* x y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(z, t, (x * y));
	double t_2 = (t * z) + (x * y);
	double tmp;
	if (t_2 <= -1e+170) {
		tmp = t_1;
	} else if (t_2 <= 2e+15) {
		tmp = fma(i, c, (a * b));
	} else if (t_2 <= 5e+152) {
		tmp = fma(b, a, (x * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(z, t, Float64(x * y))
	t_2 = Float64(Float64(t * z) + Float64(x * y))
	tmp = 0.0
	if (t_2 <= -1e+170)
		tmp = t_1;
	elseif (t_2 <= 2e+15)
		tmp = fma(i, c, Float64(a * b));
	elseif (t_2 <= 5e+152)
		tmp = fma(b, a, Float64(x * y));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(z * t + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+170], t$95$1, If[LessEqual[t$95$2, 2e+15], N[(i * c + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+152], N[(b * a + N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, t, x \cdot y\right)\\
t_2 := t \cdot z + x \cdot y\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (*.f64 x y) (*.f64 z t)) < -1.00000000000000003e170 or 5e152 < (+.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 93.6%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, \color{blue}{b \cdot a}\right)\right)\right) \]
      18. lower-*.f6496.0

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

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

      \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{x \cdot y}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6478.1

        \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{x \cdot y}\right) \]
    7. Applied rewrites78.1%

      \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{x \cdot y}\right) \]

    if -1.00000000000000003e170 < (+.f64 (*.f64 x y) (*.f64 z t)) < 2e15

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{a \cdot b} + c \cdot i \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
      2. lower-*.f6479.9

        \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
    5. Applied rewrites79.9%

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

        \[\leadsto \color{blue}{b \cdot a + c \cdot i} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{c \cdot i + b \cdot a} \]
      3. lift-*.f64N/A

        \[\leadsto \color{blue}{c \cdot i} + b \cdot a \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{i \cdot c} + b \cdot a \]
      5. lower-fma.f6479.9

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, b \cdot a\right)} \]
    7. Applied rewrites79.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, a \cdot b\right)} \]

    if 2e15 < (+.f64 (*.f64 x y) (*.f64 z t)) < 5e152

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
      5. lower-*.f6478.5

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

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

      \[\leadsto \mathsf{fma}\left(b, a, x \cdot y\right) \]
    7. Step-by-step derivation
      1. Applied rewrites63.9%

        \[\leadsto \mathsf{fma}\left(b, a, y \cdot x\right) \]
    8. Recombined 3 regimes into one program.
    9. Final simplification76.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z + x \cdot y \leq -1 \cdot 10^{+170}:\\ \;\;\;\;\mathsf{fma}\left(z, t, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z + x \cdot y \leq 2 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{elif}\;t \cdot z + x \cdot y \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, t, x \cdot y\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 67.4% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(i, c, x \cdot y\right)\\ \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+69}:\\ \;\;\;\;\mathsf{fma}\left(z, t, c \cdot i\right)\\ \mathbf{elif}\;t \cdot z \leq -2 \cdot 10^{-130}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-234}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-108}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+49}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (fma i c (* x y))))
       (if (<= (* t z) -2e+69)
         (fma z t (* c i))
         (if (<= (* t z) -2e-130)
           (fma b a (* x y))
           (if (<= (* t z) -5e-234)
             t_1
             (if (<= (* t z) 5e-108)
               (fma i c (* a b))
               (if (<= (* t z) 2e+49) t_1 (fma b a (* t z)))))))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = fma(i, c, (x * y));
    	double tmp;
    	if ((t * z) <= -2e+69) {
    		tmp = fma(z, t, (c * i));
    	} else if ((t * z) <= -2e-130) {
    		tmp = fma(b, a, (x * y));
    	} else if ((t * z) <= -5e-234) {
    		tmp = t_1;
    	} else if ((t * z) <= 5e-108) {
    		tmp = fma(i, c, (a * b));
    	} else if ((t * z) <= 2e+49) {
    		tmp = t_1;
    	} else {
    		tmp = fma(b, a, (t * z));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = fma(i, c, Float64(x * y))
    	tmp = 0.0
    	if (Float64(t * z) <= -2e+69)
    		tmp = fma(z, t, Float64(c * i));
    	elseif (Float64(t * z) <= -2e-130)
    		tmp = fma(b, a, Float64(x * y));
    	elseif (Float64(t * z) <= -5e-234)
    		tmp = t_1;
    	elseif (Float64(t * z) <= 5e-108)
    		tmp = fma(i, c, Float64(a * b));
    	elseif (Float64(t * z) <= 2e+49)
    		tmp = t_1;
    	else
    		tmp = fma(b, a, Float64(t * z));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -2e+69], N[(z * t + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], -2e-130], N[(b * a + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], -5e-234], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e-108], N[(i * c + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 2e+49], t$95$1, N[(b * a + N[(t * z), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(i, c, x \cdot y\right)\\
    \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+69}:\\
    \;\;\;\;\mathsf{fma}\left(z, t, c \cdot i\right)\\
    
    \mathbf{elif}\;t \cdot z \leq -2 \cdot 10^{-130}:\\
    \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\
    
    \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-234}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-108}:\\
    \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\
    
    \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+49}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if (*.f64 z t) < -2.0000000000000001e69

      1. Initial program 90.0%

        \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, \color{blue}{b \cdot a}\right)\right)\right) \]
        18. lower-*.f6492.0

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

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

        \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{c \cdot i}\right) \]
      6. Step-by-step derivation
        1. lower-*.f6478.0

          \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{c \cdot i}\right) \]
      7. Applied rewrites78.0%

        \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{c \cdot i}\right) \]

      if -2.0000000000000001e69 < (*.f64 z t) < -2.0000000000000002e-130

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
        3. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
        5. lower-*.f6490.6

          \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
      5. Applied rewrites90.6%

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

        \[\leadsto \mathsf{fma}\left(b, a, x \cdot y\right) \]
      7. Step-by-step derivation
        1. Applied rewrites77.3%

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

        if -2.0000000000000002e-130 < (*.f64 z t) < -4.99999999999999979e-234 or 5e-108 < (*.f64 z t) < 1.99999999999999989e49

        1. Initial program 97.6%

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

          \[\leadsto \color{blue}{x \cdot y} + c \cdot i \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{y \cdot x} + c \cdot i \]
          2. lower-*.f6482.6

            \[\leadsto \color{blue}{y \cdot x} + c \cdot i \]
        5. Applied rewrites82.6%

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

            \[\leadsto \color{blue}{y \cdot x + c \cdot i} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{c \cdot i + y \cdot x} \]
          3. lift-*.f64N/A

            \[\leadsto \color{blue}{c \cdot i} + y \cdot x \]
          4. *-commutativeN/A

            \[\leadsto \color{blue}{i \cdot c} + y \cdot x \]
          5. lower-fma.f6485.1

            \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, y \cdot x\right)} \]
        7. Applied rewrites85.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, x \cdot y\right)} \]

        if -4.99999999999999979e-234 < (*.f64 z t) < 5e-108

        1. Initial program 98.5%

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

          \[\leadsto \color{blue}{a \cdot b} + c \cdot i \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
          2. lower-*.f6473.9

            \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
        5. Applied rewrites73.9%

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

            \[\leadsto \color{blue}{b \cdot a + c \cdot i} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{c \cdot i + b \cdot a} \]
          3. lift-*.f64N/A

            \[\leadsto \color{blue}{c \cdot i} + b \cdot a \]
          4. *-commutativeN/A

            \[\leadsto \color{blue}{i \cdot c} + b \cdot a \]
          5. lower-fma.f6473.9

            \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, b \cdot a\right)} \]
        7. Applied rewrites73.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, a \cdot b\right)} \]

        if 1.99999999999999989e49 < (*.f64 z t)

        1. Initial program 98.4%

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

          \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
          3. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
          5. lower-*.f6484.6

            \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
        5. Applied rewrites84.6%

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

          \[\leadsto \mathsf{fma}\left(b, a, t \cdot z\right) \]
        7. Step-by-step derivation
          1. Applied rewrites75.9%

            \[\leadsto \mathsf{fma}\left(b, a, t \cdot z\right) \]
        8. Recombined 5 regimes into one program.
        9. Final simplification77.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{+69}:\\ \;\;\;\;\mathsf{fma}\left(z, t, c \cdot i\right)\\ \mathbf{elif}\;t \cdot z \leq -2 \cdot 10^{-130}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-234}:\\ \;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-108}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+49}:\\ \;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \end{array} \]
        10. Add Preprocessing

        Alternative 4: 67.3% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(i, c, x \cdot y\right)\\ t_2 := \mathsf{fma}\left(b, a, t \cdot z\right)\\ \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \cdot z \leq -2 \cdot 10^{-130}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-234}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-108}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+49}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i)
         :precision binary64
         (let* ((t_1 (fma i c (* x y))) (t_2 (fma b a (* t z))))
           (if (<= (* t z) -5e+134)
             t_2
             (if (<= (* t z) -2e-130)
               (fma b a (* x y))
               (if (<= (* t z) -5e-234)
                 t_1
                 (if (<= (* t z) 5e-108)
                   (fma i c (* a b))
                   (if (<= (* t z) 2e+49) 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 = fma(i, c, (x * y));
        	double t_2 = fma(b, a, (t * z));
        	double tmp;
        	if ((t * z) <= -5e+134) {
        		tmp = t_2;
        	} else if ((t * z) <= -2e-130) {
        		tmp = fma(b, a, (x * y));
        	} else if ((t * z) <= -5e-234) {
        		tmp = t_1;
        	} else if ((t * z) <= 5e-108) {
        		tmp = fma(i, c, (a * b));
        	} else if ((t * z) <= 2e+49) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b, c, i)
        	t_1 = fma(i, c, Float64(x * y))
        	t_2 = fma(b, a, Float64(t * z))
        	tmp = 0.0
        	if (Float64(t * z) <= -5e+134)
        		tmp = t_2;
        	elseif (Float64(t * z) <= -2e-130)
        		tmp = fma(b, a, Float64(x * y));
        	elseif (Float64(t * z) <= -5e-234)
        		tmp = t_1;
        	elseif (Float64(t * z) <= 5e-108)
        		tmp = fma(i, c, Float64(a * b));
        	elseif (Float64(t * z) <= 2e+49)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * a + N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -5e+134], t$95$2, If[LessEqual[N[(t * z), $MachinePrecision], -2e-130], N[(b * a + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], -5e-234], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e-108], N[(i * c + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 2e+49], t$95$1, t$95$2]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(i, c, x \cdot y\right)\\
        t_2 := \mathsf{fma}\left(b, a, t \cdot z\right)\\
        \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t \cdot z \leq -2 \cdot 10^{-130}:\\
        \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\
        
        \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-234}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-108}:\\
        \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\
        
        \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+49}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (*.f64 z t) < -4.99999999999999981e134 or 1.99999999999999989e49 < (*.f64 z t)

          1. Initial program 94.2%

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

            \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
            3. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
            5. lower-*.f6482.1

              \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
          5. Applied rewrites82.1%

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

            \[\leadsto \mathsf{fma}\left(b, a, t \cdot z\right) \]
          7. Step-by-step derivation
            1. Applied rewrites76.4%

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

            if -4.99999999999999981e134 < (*.f64 z t) < -2.0000000000000002e-130

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
              3. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
              4. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
              5. lower-*.f6485.5

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

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

              \[\leadsto \mathsf{fma}\left(b, a, x \cdot y\right) \]
            7. Step-by-step derivation
              1. Applied rewrites69.4%

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

              if -2.0000000000000002e-130 < (*.f64 z t) < -4.99999999999999979e-234 or 5e-108 < (*.f64 z t) < 1.99999999999999989e49

              1. Initial program 97.6%

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

                \[\leadsto \color{blue}{x \cdot y} + c \cdot i \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{y \cdot x} + c \cdot i \]
                2. lower-*.f6482.6

                  \[\leadsto \color{blue}{y \cdot x} + c \cdot i \]
              5. Applied rewrites82.6%

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

                  \[\leadsto \color{blue}{y \cdot x + c \cdot i} \]
                2. +-commutativeN/A

                  \[\leadsto \color{blue}{c \cdot i + y \cdot x} \]
                3. lift-*.f64N/A

                  \[\leadsto \color{blue}{c \cdot i} + y \cdot x \]
                4. *-commutativeN/A

                  \[\leadsto \color{blue}{i \cdot c} + y \cdot x \]
                5. lower-fma.f6485.1

                  \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, y \cdot x\right)} \]
              7. Applied rewrites85.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, x \cdot y\right)} \]

              if -4.99999999999999979e-234 < (*.f64 z t) < 5e-108

              1. Initial program 98.5%

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

                \[\leadsto \color{blue}{a \cdot b} + c \cdot i \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
                2. lower-*.f6473.9

                  \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
              5. Applied rewrites73.9%

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

                  \[\leadsto \color{blue}{b \cdot a + c \cdot i} \]
                2. +-commutativeN/A

                  \[\leadsto \color{blue}{c \cdot i + b \cdot a} \]
                3. lift-*.f64N/A

                  \[\leadsto \color{blue}{c \cdot i} + b \cdot a \]
                4. *-commutativeN/A

                  \[\leadsto \color{blue}{i \cdot c} + b \cdot a \]
                5. lower-fma.f6473.9

                  \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, b \cdot a\right)} \]
              7. Applied rewrites73.9%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \mathbf{elif}\;t \cdot z \leq -2 \cdot 10^{-130}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-234}:\\ \;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-108}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+49}:\\ \;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \end{array} \]
            10. Add Preprocessing

            Alternative 5: 42.7% accurate, 0.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+199}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-159}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 10^{-87}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+132}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (if (<= (* a b) -2e+199)
               (* a b)
               (if (<= (* a b) 5e-159)
                 (* t z)
                 (if (<= (* a b) 1e-87)
                   (* x y)
                   (if (<= (* a b) 5e+132) (* c i) (* a b))))))
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double tmp;
            	if ((a * b) <= -2e+199) {
            		tmp = a * b;
            	} else if ((a * b) <= 5e-159) {
            		tmp = t * z;
            	} else if ((a * b) <= 1e-87) {
            		tmp = x * y;
            	} else if ((a * b) <= 5e+132) {
            		tmp = c * i;
            	} else {
            		tmp = a * b;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a, b, c, i)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8), intent (in) :: c
                real(8), intent (in) :: i
                real(8) :: tmp
                if ((a * b) <= (-2d+199)) then
                    tmp = a * b
                else if ((a * b) <= 5d-159) then
                    tmp = t * z
                else if ((a * b) <= 1d-87) then
                    tmp = x * y
                else if ((a * b) <= 5d+132) then
                    tmp = c * i
                else
                    tmp = a * b
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double tmp;
            	if ((a * b) <= -2e+199) {
            		tmp = a * b;
            	} else if ((a * b) <= 5e-159) {
            		tmp = t * z;
            	} else if ((a * b) <= 1e-87) {
            		tmp = x * y;
            	} else if ((a * b) <= 5e+132) {
            		tmp = c * i;
            	} else {
            		tmp = a * b;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c, i):
            	tmp = 0
            	if (a * b) <= -2e+199:
            		tmp = a * b
            	elif (a * b) <= 5e-159:
            		tmp = t * z
            	elif (a * b) <= 1e-87:
            		tmp = x * y
            	elif (a * b) <= 5e+132:
            		tmp = c * i
            	else:
            		tmp = a * b
            	return tmp
            
            function code(x, y, z, t, a, b, c, i)
            	tmp = 0.0
            	if (Float64(a * b) <= -2e+199)
            		tmp = Float64(a * b);
            	elseif (Float64(a * b) <= 5e-159)
            		tmp = Float64(t * z);
            	elseif (Float64(a * b) <= 1e-87)
            		tmp = Float64(x * y);
            	elseif (Float64(a * b) <= 5e+132)
            		tmp = Float64(c * i);
            	else
            		tmp = Float64(a * b);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b, c, i)
            	tmp = 0.0;
            	if ((a * b) <= -2e+199)
            		tmp = a * b;
            	elseif ((a * b) <= 5e-159)
            		tmp = t * z;
            	elseif ((a * b) <= 1e-87)
            		tmp = x * y;
            	elseif ((a * b) <= 5e+132)
            		tmp = c * i;
            	else
            		tmp = a * b;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -2e+199], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e-159], N[(t * z), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e-87], N[(x * y), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+132], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+199}:\\
            \;\;\;\;a \cdot b\\
            
            \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-159}:\\
            \;\;\;\;t \cdot z\\
            
            \mathbf{elif}\;a \cdot b \leq 10^{-87}:\\
            \;\;\;\;x \cdot y\\
            
            \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+132}:\\
            \;\;\;\;c \cdot i\\
            
            \mathbf{else}:\\
            \;\;\;\;a \cdot b\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if (*.f64 a b) < -2.00000000000000019e199 or 5.0000000000000001e132 < (*.f64 a b)

              1. Initial program 96.4%

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

                \[\leadsto \color{blue}{a \cdot b} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{b \cdot a} \]
                2. lower-*.f6487.8

                  \[\leadsto \color{blue}{b \cdot a} \]
              5. Applied rewrites87.8%

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

              if -2.00000000000000019e199 < (*.f64 a b) < 5.00000000000000032e-159

              1. Initial program 97.8%

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

                \[\leadsto \color{blue}{t \cdot z} \]
              4. Step-by-step derivation
                1. lower-*.f6441.1

                  \[\leadsto \color{blue}{t \cdot z} \]
              5. Applied rewrites41.1%

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

              if 5.00000000000000032e-159 < (*.f64 a b) < 1.00000000000000002e-87

              1. Initial program 100.0%

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

                \[\leadsto \color{blue}{x \cdot y} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{y \cdot x} \]
                2. lower-*.f6462.9

                  \[\leadsto \color{blue}{y \cdot x} \]
              5. Applied rewrites62.9%

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

              if 1.00000000000000002e-87 < (*.f64 a b) < 5.0000000000000001e132

              1. Initial program 93.3%

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

                \[\leadsto \color{blue}{c \cdot i} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{i \cdot c} \]
                2. lower-*.f6441.3

                  \[\leadsto \color{blue}{i \cdot c} \]
              5. Applied rewrites41.3%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+199}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-159}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 10^{-87}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+132}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
            5. Add Preprocessing

            Alternative 6: 85.6% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+170}:\\ \;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+50}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, t, x \cdot y\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (if (<= (* x y) -1e+170)
               (fma i c (* x y))
               (if (<= (* x y) 2e+50)
                 (fma b a (fma i c (* t z)))
                 (if (<= (* x y) 5e+152) (fma b a (* x y)) (fma z t (* 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) <= -1e+170) {
            		tmp = fma(i, c, (x * y));
            	} else if ((x * y) <= 2e+50) {
            		tmp = fma(b, a, fma(i, c, (t * z)));
            	} else if ((x * y) <= 5e+152) {
            		tmp = fma(b, a, (x * y));
            	} else {
            		tmp = fma(z, t, (x * y));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b, c, i)
            	tmp = 0.0
            	if (Float64(x * y) <= -1e+170)
            		tmp = fma(i, c, Float64(x * y));
            	elseif (Float64(x * y) <= 2e+50)
            		tmp = fma(b, a, fma(i, c, Float64(t * z)));
            	elseif (Float64(x * y) <= 5e+152)
            		tmp = fma(b, a, Float64(x * y));
            	else
            		tmp = fma(z, t, Float64(x * y));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1e+170], N[(i * c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+50], N[(b * a + N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+152], N[(b * a + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(z * t + N[(x * y), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+170}:\\
            \;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\
            
            \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+50}:\\
            \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\
            
            \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+152}:\\
            \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(z, t, x \cdot y\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if (*.f64 x y) < -1.00000000000000003e170

              1. Initial program 91.8%

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

                \[\leadsto \color{blue}{x \cdot y} + c \cdot i \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{y \cdot x} + c \cdot i \]
                2. lower-*.f6478.5

                  \[\leadsto \color{blue}{y \cdot x} + c \cdot i \]
              5. Applied rewrites78.5%

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

                  \[\leadsto \color{blue}{y \cdot x + c \cdot i} \]
                2. +-commutativeN/A

                  \[\leadsto \color{blue}{c \cdot i + y \cdot x} \]
                3. lift-*.f64N/A

                  \[\leadsto \color{blue}{c \cdot i} + y \cdot x \]
                4. *-commutativeN/A

                  \[\leadsto \color{blue}{i \cdot c} + y \cdot x \]
                5. lower-fma.f6481.2

                  \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, y \cdot x\right)} \]
              7. Applied rewrites81.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, x \cdot y\right)} \]

              if -1.00000000000000003e170 < (*.f64 x y) < 2.0000000000000002e50

              1. Initial program 99.4%

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

                \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

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

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

                  \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                5. lower-*.f6493.0

                  \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
              5. Applied rewrites93.0%

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

              if 2.0000000000000002e50 < (*.f64 x y) < 5e152

              1. Initial program 99.9%

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

                \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
                3. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                5. lower-*.f6487.6

                  \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
              5. Applied rewrites87.6%

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

                \[\leadsto \mathsf{fma}\left(b, a, x \cdot y\right) \]
              7. Step-by-step derivation
                1. Applied rewrites82.8%

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

                if 5e152 < (*.f64 x y)

                1. Initial program 87.1%

                  \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, \color{blue}{b \cdot a}\right)\right)\right) \]
                  18. lower-*.f6490.3

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

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

                  \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{x \cdot y}\right) \]
                6. Step-by-step derivation
                  1. lower-*.f6481.7

                    \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{x \cdot y}\right) \]
                7. Applied rewrites81.7%

                  \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{x \cdot y}\right) \]
              8. Recombined 4 regimes into one program.
              9. Final simplification89.0%

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+170}:\\ \;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+50}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, t, x \cdot y\right)\\ \end{array} \]
              10. Add Preprocessing

              Alternative 7: 67.0% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b, a, t \cdot z\right)\\ \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-139}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+14}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (fma b a (* t z))))
                 (if (<= (* t z) -5e+134)
                   t_1
                   (if (<= (* t z) -5e-139)
                     (fma b a (* x y))
                     (if (<= (* t z) 5e+14) (fma i c (* 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 = fma(b, a, (t * z));
              	double tmp;
              	if ((t * z) <= -5e+134) {
              		tmp = t_1;
              	} else if ((t * z) <= -5e-139) {
              		tmp = fma(b, a, (x * y));
              	} else if ((t * z) <= 5e+14) {
              		tmp = fma(i, c, (a * b));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = fma(b, a, Float64(t * z))
              	tmp = 0.0
              	if (Float64(t * z) <= -5e+134)
              		tmp = t_1;
              	elseif (Float64(t * z) <= -5e-139)
              		tmp = fma(b, a, Float64(x * y));
              	elseif (Float64(t * z) <= 5e+14)
              		tmp = fma(i, c, Float64(a * b));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * a + N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -5e+134], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], -5e-139], N[(b * a + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 5e+14], N[(i * c + N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \mathsf{fma}\left(b, a, t \cdot z\right)\\
              \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-139}:\\
              \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\
              
              \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+14}:\\
              \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (*.f64 z t) < -4.99999999999999981e134 or 5e14 < (*.f64 z t)

                1. Initial program 94.6%

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

                  \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
                  3. lower-fma.f64N/A

                    \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                  4. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                  5. lower-*.f6483.3

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

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

                  \[\leadsto \mathsf{fma}\left(b, a, t \cdot z\right) \]
                7. Step-by-step derivation
                  1. Applied rewrites74.4%

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

                  if -4.99999999999999981e134 < (*.f64 z t) < -5.00000000000000034e-139

                  1. Initial program 100.0%

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

                    \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
                    3. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                    4. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                    5. lower-*.f6486.1

                      \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                  5. Applied rewrites86.1%

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

                    \[\leadsto \mathsf{fma}\left(b, a, x \cdot y\right) \]
                  7. Step-by-step derivation
                    1. Applied rewrites70.8%

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

                    if -5.00000000000000034e-139 < (*.f64 z t) < 5e14

                    1. Initial program 98.0%

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

                      \[\leadsto \color{blue}{a \cdot b} + c \cdot i \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
                      2. lower-*.f6468.5

                        \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
                    5. Applied rewrites68.5%

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

                        \[\leadsto \color{blue}{b \cdot a + c \cdot i} \]
                      2. +-commutativeN/A

                        \[\leadsto \color{blue}{c \cdot i + b \cdot a} \]
                      3. lift-*.f64N/A

                        \[\leadsto \color{blue}{c \cdot i} + b \cdot a \]
                      4. *-commutativeN/A

                        \[\leadsto \color{blue}{i \cdot c} + b \cdot a \]
                      5. lower-fma.f6469.5

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-139}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+14}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 8: 87.5% accurate, 0.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+203}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{elif}\;a \cdot b \leq 0.001:\\ \;\;\;\;\mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (if (<= (* a b) -5e+203)
                     (fma i c (* a b))
                     (if (<= (* a b) 0.001)
                       (fma z t (fma y x (* c i)))
                       (fma b a (fma i c (* t z))))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double tmp;
                  	if ((a * b) <= -5e+203) {
                  		tmp = fma(i, c, (a * b));
                  	} else if ((a * b) <= 0.001) {
                  		tmp = fma(z, t, fma(y, x, (c * i)));
                  	} else {
                  		tmp = fma(b, a, fma(i, c, (t * z)));
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	tmp = 0.0
                  	if (Float64(a * b) <= -5e+203)
                  		tmp = fma(i, c, Float64(a * b));
                  	elseif (Float64(a * b) <= 0.001)
                  		tmp = fma(z, t, fma(y, x, Float64(c * i)));
                  	else
                  		tmp = fma(b, a, fma(i, c, Float64(t * z)));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -5e+203], N[(i * c + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 0.001], N[(z * t + N[(y * x + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * a + N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+203}:\\
                  \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\
                  
                  \mathbf{elif}\;a \cdot b \leq 0.001:\\
                  \;\;\;\;\mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, c \cdot i\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if (*.f64 a b) < -4.99999999999999994e203

                    1. Initial program 96.8%

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

                      \[\leadsto \color{blue}{a \cdot b} + c \cdot i \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
                      2. lower-*.f6496.8

                        \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
                    5. Applied rewrites96.8%

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

                        \[\leadsto \color{blue}{b \cdot a + c \cdot i} \]
                      2. +-commutativeN/A

                        \[\leadsto \color{blue}{c \cdot i + b \cdot a} \]
                      3. lift-*.f64N/A

                        \[\leadsto \color{blue}{c \cdot i} + b \cdot a \]
                      4. *-commutativeN/A

                        \[\leadsto \color{blue}{i \cdot c} + b \cdot a \]
                      5. lower-fma.f64100.0

                        \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, b \cdot a\right)} \]
                    7. Applied rewrites100.0%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, a \cdot b\right)} \]

                    if -4.99999999999999994e203 < (*.f64 a b) < 1e-3

                    1. Initial program 97.1%

                      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \color{blue}{i \cdot c} + a \cdot b\right)\right) \]
                      15. lower-fma.f6497.7

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

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

                        \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, \color{blue}{b \cdot a}\right)\right)\right) \]
                      18. lower-*.f6497.7

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

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

                      \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \color{blue}{c \cdot i}\right)\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f6493.3

                        \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \color{blue}{c \cdot i}\right)\right) \]
                    7. Applied rewrites93.3%

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

                    if 1e-3 < (*.f64 a b)

                    1. Initial program 96.0%

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

                      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

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

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                      4. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                      5. lower-*.f6490.4

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                    5. Applied rewrites90.4%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 9: 87.7% accurate, 0.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \mathbf{if}\;c \cdot i \leq -1 \cdot 10^{+197}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \cdot i \leq 2 \cdot 10^{-29}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (let* ((t_1 (fma b a (fma i c (* t z)))))
                     (if (<= (* c i) -1e+197)
                       t_1
                       (if (<= (* c i) 2e-29) (fma b a (fma t z (* x y))) t_1))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = fma(b, a, fma(i, c, (t * z)));
                  	double tmp;
                  	if ((c * i) <= -1e+197) {
                  		tmp = t_1;
                  	} else if ((c * i) <= 2e-29) {
                  		tmp = fma(b, a, fma(t, z, (x * y)));
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = fma(b, a, fma(i, c, Float64(t * z)))
                  	tmp = 0.0
                  	if (Float64(c * i) <= -1e+197)
                  		tmp = t_1;
                  	elseif (Float64(c * i) <= 2e-29)
                  		tmp = fma(b, a, fma(t, z, Float64(x * y)));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * a + N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -1e+197], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 2e-29], N[(b * a + N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\
                  \mathbf{if}\;c \cdot i \leq -1 \cdot 10^{+197}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;c \cdot i \leq 2 \cdot 10^{-29}:\\
                  \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, x \cdot y\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 c i) < -9.9999999999999995e196 or 1.99999999999999989e-29 < (*.f64 c i)

                    1. Initial program 97.1%

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

                      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

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

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                      4. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                      5. lower-*.f6487.0

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                    5. Applied rewrites87.0%

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

                    if -9.9999999999999995e196 < (*.f64 c i) < 1.99999999999999989e-29

                    1. Initial program 96.7%

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

                      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
                      3. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                      4. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                      5. lower-*.f6494.9

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                    5. Applied rewrites94.9%

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

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

                  Alternative 10: 42.7% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+199}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-110}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+132}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (if (<= (* a b) -2e+199)
                     (* a b)
                     (if (<= (* a b) 2e-110) (* t z) (if (<= (* a b) 5e+132) (* c i) (* a b)))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double tmp;
                  	if ((a * b) <= -2e+199) {
                  		tmp = a * b;
                  	} else if ((a * b) <= 2e-110) {
                  		tmp = t * z;
                  	} else if ((a * b) <= 5e+132) {
                  		tmp = c * i;
                  	} else {
                  		tmp = a * b;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t, a, b, c, i)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: c
                      real(8), intent (in) :: i
                      real(8) :: tmp
                      if ((a * b) <= (-2d+199)) then
                          tmp = a * b
                      else if ((a * b) <= 2d-110) then
                          tmp = t * z
                      else if ((a * b) <= 5d+132) then
                          tmp = c * i
                      else
                          tmp = a * b
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double tmp;
                  	if ((a * b) <= -2e+199) {
                  		tmp = a * b;
                  	} else if ((a * b) <= 2e-110) {
                  		tmp = t * z;
                  	} else if ((a * b) <= 5e+132) {
                  		tmp = c * i;
                  	} else {
                  		tmp = a * b;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b, c, i):
                  	tmp = 0
                  	if (a * b) <= -2e+199:
                  		tmp = a * b
                  	elif (a * b) <= 2e-110:
                  		tmp = t * z
                  	elif (a * b) <= 5e+132:
                  		tmp = c * i
                  	else:
                  		tmp = a * b
                  	return tmp
                  
                  function code(x, y, z, t, a, b, c, i)
                  	tmp = 0.0
                  	if (Float64(a * b) <= -2e+199)
                  		tmp = Float64(a * b);
                  	elseif (Float64(a * b) <= 2e-110)
                  		tmp = Float64(t * z);
                  	elseif (Float64(a * b) <= 5e+132)
                  		tmp = Float64(c * i);
                  	else
                  		tmp = Float64(a * b);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b, c, i)
                  	tmp = 0.0;
                  	if ((a * b) <= -2e+199)
                  		tmp = a * b;
                  	elseif ((a * b) <= 2e-110)
                  		tmp = t * z;
                  	elseif ((a * b) <= 5e+132)
                  		tmp = c * i;
                  	else
                  		tmp = a * b;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -2e+199], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e-110], N[(t * z), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+132], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+199}:\\
                  \;\;\;\;a \cdot b\\
                  
                  \mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-110}:\\
                  \;\;\;\;t \cdot z\\
                  
                  \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+132}:\\
                  \;\;\;\;c \cdot i\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;a \cdot b\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if (*.f64 a b) < -2.00000000000000019e199 or 5.0000000000000001e132 < (*.f64 a b)

                    1. Initial program 96.4%

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

                      \[\leadsto \color{blue}{a \cdot b} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{b \cdot a} \]
                      2. lower-*.f6487.8

                        \[\leadsto \color{blue}{b \cdot a} \]
                    5. Applied rewrites87.8%

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

                    if -2.00000000000000019e199 < (*.f64 a b) < 2.0000000000000001e-110

                    1. Initial program 98.0%

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

                      \[\leadsto \color{blue}{t \cdot z} \]
                    4. Step-by-step derivation
                      1. lower-*.f6440.5

                        \[\leadsto \color{blue}{t \cdot z} \]
                    5. Applied rewrites40.5%

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

                    if 2.0000000000000001e-110 < (*.f64 a b) < 5.0000000000000001e132

                    1. Initial program 94.0%

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

                      \[\leadsto \color{blue}{c \cdot i} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{i \cdot c} \]
                      2. lower-*.f6439.4

                        \[\leadsto \color{blue}{i \cdot c} \]
                    5. Applied rewrites39.4%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+199}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-110}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+132}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 11: 67.1% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b, a, t \cdot z\right)\\ \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+70}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (let* ((t_1 (fma b a (* t z))))
                     (if (<= (* t z) -5e+134)
                       t_1
                       (if (<= (* t z) 2e+70) (fma b a (* x y)) t_1))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = fma(b, a, (t * z));
                  	double tmp;
                  	if ((t * z) <= -5e+134) {
                  		tmp = t_1;
                  	} else if ((t * z) <= 2e+70) {
                  		tmp = fma(b, a, (x * y));
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = fma(b, a, Float64(t * z))
                  	tmp = 0.0
                  	if (Float64(t * z) <= -5e+134)
                  		tmp = t_1;
                  	elseif (Float64(t * z) <= 2e+70)
                  		tmp = fma(b, a, Float64(x * y));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * a + N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -5e+134], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 2e+70], N[(b * a + N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \mathsf{fma}\left(b, a, t \cdot z\right)\\
                  \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+70}:\\
                  \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 z t) < -4.99999999999999981e134 or 2.00000000000000015e70 < (*.f64 z t)

                    1. Initial program 93.8%

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

                      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
                      3. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                      4. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                      5. lower-*.f6483.0

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                    5. Applied rewrites83.0%

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

                      \[\leadsto \mathsf{fma}\left(b, a, t \cdot z\right) \]
                    7. Step-by-step derivation
                      1. Applied rewrites77.9%

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

                      if -4.99999999999999981e134 < (*.f64 z t) < 2.00000000000000015e70

                      1. Initial program 98.7%

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

                        \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
                        3. lower-fma.f64N/A

                          \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                        4. *-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                        5. lower-*.f6471.7

                          \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                      5. Applied rewrites71.7%

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

                        \[\leadsto \mathsf{fma}\left(b, a, x \cdot y\right) \]
                      7. Step-by-step derivation
                        1. Applied rewrites65.0%

                          \[\leadsto \mathsf{fma}\left(b, a, y \cdot x\right) \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification69.8%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+134}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+70}:\\ \;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 12: 62.2% accurate, 0.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+272}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 10^{+110}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (if (<= (* c i) -5e+272)
                         (* c i)
                         (if (<= (* c i) 1e+110) (fma b a (* t z)) (* 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) <= -5e+272) {
                      		tmp = c * i;
                      	} else if ((c * i) <= 1e+110) {
                      		tmp = fma(b, a, (t * z));
                      	} else {
                      		tmp = c * i;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	tmp = 0.0
                      	if (Float64(c * i) <= -5e+272)
                      		tmp = Float64(c * i);
                      	elseif (Float64(c * i) <= 1e+110)
                      		tmp = fma(b, a, Float64(t * z));
                      	else
                      		tmp = Float64(c * i);
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -5e+272], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1e+110], N[(b * a + N[(t * z), $MachinePrecision]), $MachinePrecision], N[(c * i), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+272}:\\
                      \;\;\;\;c \cdot i\\
                      
                      \mathbf{elif}\;c \cdot i \leq 10^{+110}:\\
                      \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;c \cdot i\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (*.f64 c i) < -4.99999999999999973e272 or 1e110 < (*.f64 c i)

                        1. Initial program 96.9%

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

                          \[\leadsto \color{blue}{c \cdot i} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \color{blue}{i \cdot c} \]
                          2. lower-*.f6469.4

                            \[\leadsto \color{blue}{i \cdot c} \]
                        5. Applied rewrites69.4%

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

                        if -4.99999999999999973e272 < (*.f64 c i) < 1e110

                        1. Initial program 96.9%

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

                          \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, t \cdot z + x \cdot y\right)} \]
                          3. lower-fma.f64N/A

                            \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                          4. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                          5. lower-*.f6489.1

                            \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                        5. Applied rewrites89.1%

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

                          \[\leadsto \mathsf{fma}\left(b, a, t \cdot z\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites63.8%

                            \[\leadsto \mathsf{fma}\left(b, a, t \cdot z\right) \]
                        8. Recombined 2 regimes into one program.
                        9. Final simplification65.3%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+272}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 10^{+110}:\\ \;\;\;\;\mathsf{fma}\left(b, a, t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 13: 41.3% accurate, 1.1× speedup?

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

                          1. Initial program 96.3%

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

                            \[\leadsto \color{blue}{a \cdot b} \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \color{blue}{b \cdot a} \]
                            2. lower-*.f6489.3

                              \[\leadsto \color{blue}{b \cdot a} \]
                          5. Applied rewrites89.3%

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

                          if -4.99999999999999994e203 < (*.f64 a b) < 5.0000000000000001e132

                          1. Initial program 97.0%

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

                            \[\leadsto \color{blue}{c \cdot i} \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \color{blue}{i \cdot c} \]
                            2. lower-*.f6428.6

                              \[\leadsto \color{blue}{i \cdot c} \]
                          5. Applied rewrites28.6%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+203}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+132}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 14: 26.9% 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.9%

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

                          \[\leadsto \color{blue}{a \cdot b} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \color{blue}{b \cdot a} \]
                          2. lower-*.f6425.5

                            \[\leadsto \color{blue}{b \cdot a} \]
                        5. Applied rewrites25.5%

                          \[\leadsto \color{blue}{b \cdot a} \]
                        6. Final simplification25.5%

                          \[\leadsto a \cdot b \]
                        7. Add Preprocessing

                        Reproduce

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