Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A

Percentage Accurate: 90.3% → 96.8%
Time: 18.2s
Alternatives: 21
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * 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 = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * 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 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i):
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i)
	return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i)))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\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 21 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: 90.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * 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 = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * 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 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i):
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i)
	return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i)))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 96.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq 10^{+272}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(-i\right), \mathsf{fma}\left(z, t, x \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \left(i \cdot \mathsf{fma}\left(c, b, a\right)\right) \cdot \left(-c\right)\right)\right)\\


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

    1. Initial program 98.7%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
      13. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

    if 1.0000000000000001e272 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i))

    1. Initial program 77.7%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
      13. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(\mathsf{neg}\left(i\right)\right), \color{blue}{z \cdot t} + x \cdot y\right) \]
      19. lower-fma.f6493.6

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) + \left(\left(a + b \cdot c\right) \cdot c\right) \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      12. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, c, a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c \cdot i\right)\right)}\right)\right) \]
      13. distribute-rgt-neg-inN/A

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right)} \cdot \left(c \cdot i\right)\right)\right)\right) \]
      16. associate-*l*N/A

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{\left(c \cdot \mathsf{fma}\left(b, c, a\right)\right)} \cdot i\right)\right)\right) \]
      21. associate-*l*N/A

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

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

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

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

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

Alternative 2: 85.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot \left(-i\right)\\
t_2 := 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), t\_1, x \cdot y\right)\\
t_3 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_3 \leq 10^{-179}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(b \cdot c, t\_1, \mathsf{fma}\left(z, t, x \cdot y\right)\right)\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-18}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \mathsf{fma}\left(b, c, a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.99999999999999979e27 or 5.00000000000000036e-18 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 86.0%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
      13. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(\mathsf{neg}\left(i\right)\right), \color{blue}{z \cdot t} + x \cdot y\right) \]
      19. lower-fma.f6495.9

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

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

      \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(\mathsf{neg}\left(i\right)\right), \color{blue}{x \cdot y}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6490.9

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

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

    if -4.99999999999999979e27 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e-179

    1. Initial program 97.7%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
      13. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{b \cdot c}, c \cdot \left(\mathsf{neg}\left(i\right)\right), \mathsf{fma}\left(z, t, x \cdot y\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{c \cdot b}, c \cdot \left(-i\right), \mathsf{fma}\left(z, t, x \cdot y\right)\right) \]
    7. Applied rewrites96.1%

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

    if 1e-179 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.00000000000000036e-18

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(-i\right), x \cdot y\right)\\
t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{-179}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \left(i \cdot \left(b \cdot c\right)\right) \cdot \left(-c\right)\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.99999999999999979e27 or 5.00000000000000036e-18 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 86.0%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
      13. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(\mathsf{neg}\left(i\right)\right), \color{blue}{z \cdot t} + x \cdot y\right) \]
      19. lower-fma.f6495.9

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

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

      \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(\mathsf{neg}\left(i\right)\right), \color{blue}{x \cdot y}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6490.9

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

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

    if -4.99999999999999979e27 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e-179

    1. Initial program 97.7%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
      13. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) + \left(\left(a + b \cdot c\right) \cdot c\right) \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      12. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, c, a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c \cdot i\right)\right)}\right)\right) \]
      13. distribute-rgt-neg-inN/A

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right)} \cdot \left(c \cdot i\right)\right)\right)\right) \]
      16. associate-*l*N/A

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{\left(c \cdot \mathsf{fma}\left(b, c, a\right)\right)} \cdot i\right)\right)\right) \]
      21. associate-*l*N/A

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

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

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

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

      \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(c \cdot \color{blue}{\left(b \cdot \left(c \cdot i\right)\right)}\right)\right)\right) \]
    10. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, -c \cdot \left(i \cdot \color{blue}{\left(c \cdot b\right)}\right)\right)\right) \]
    11. Applied rewrites96.1%

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

    if 1e-179 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.00000000000000036e-18

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 85.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(-i\right), x \cdot y\right)\\
t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{-179}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.99999999999999979e27 or 5.00000000000000036e-18 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 86.0%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
      13. distribute-rgt-neg-inN/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(\mathsf{neg}\left(i\right)\right), \color{blue}{z \cdot t} + x \cdot y\right) \]
      19. lower-fma.f6495.9

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

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

      \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(\mathsf{neg}\left(i\right)\right), \color{blue}{x \cdot y}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6490.9

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

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

    if -4.99999999999999979e27 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e-179

    1. Initial program 97.7%

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

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

    if 1e-179 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.00000000000000036e-18

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 81.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot \left(i \cdot \mathsf{fma}\left(b, c, a\right)\right)\\
t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+95}:\\
\;\;\;\;\mathsf{fma}\left(c, b, a\right) \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\

\mathbf{elif}\;t\_2 \leq 10^{-179}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-18}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2.00000000000000004e95

    1. Initial program 83.2%

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto 2 \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot \left({c}^{2} \cdot i\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{\left({c}^{2} \cdot i\right) \cdot b}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{\left(i \cdot {c}^{2}\right)} \cdot b\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{i \cdot \left({c}^{2} \cdot b\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto 2 \cdot \left(\mathsf{neg}\left(i \cdot \color{blue}{\left(b \cdot {c}^{2}\right)}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(\mathsf{neg}\left(b \cdot {c}^{2}\right)\right)\right)} \]
      7. mul-1-negN/A

        \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot \left(b \cdot {c}^{2}\right)\right)}\right) \]
      8. lower-*.f64N/A

        \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(-1 \cdot \left(b \cdot {c}^{2}\right)\right)\right)} \]
      9. mul-1-negN/A

        \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot {c}^{2}\right)\right)}\right) \]
      10. distribute-rgt-neg-outN/A

        \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(b \cdot \left(\mathsf{neg}\left({c}^{2}\right)\right)\right)}\right) \]
      11. mul-1-negN/A

        \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(-1 \cdot {c}^{2}\right)}\right)\right) \]
      12. lower-*.f64N/A

        \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(b \cdot \left(-1 \cdot {c}^{2}\right)\right)}\right) \]
      13. mul-1-negN/A

        \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left({c}^{2}\right)\right)}\right)\right) \]
      14. unpow2N/A

        \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(\mathsf{neg}\left(\color{blue}{c \cdot c}\right)\right)\right)\right) \]
      15. distribute-rgt-neg-inN/A

        \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)}\right)\right) \]
      16. mul-1-negN/A

        \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot c\right)}\right)\right)\right) \]
      17. lower-*.f64N/A

        \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(-1 \cdot c\right)\right)}\right)\right) \]
      18. mul-1-negN/A

        \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(\mathsf{neg}\left(c\right)\right)}\right)\right)\right) \]
      19. lower-neg.f6450.0

        \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(-c\right)}\right)\right)\right) \]
    5. Applied rewrites50.0%

      \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)\right)\right) \cdot 2} \]
      3. lower-*.f6450.0

        \[\leadsto \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right) \cdot 2} \]
    7. Applied rewrites51.3%

      \[\leadsto \color{blue}{\left(i \cdot \left(c \cdot \left(\left(-c\right) \cdot b\right)\right)\right) \cdot 2} \]
    8. Taylor expanded in i around inf

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \]
      2. associate-*r*N/A

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(-2 \cdot \left(c \cdot \left(\color{blue}{c \cdot b} + a\right)\right)\right) \]
      10. lower-fma.f6480.2

        \[\leadsto i \cdot \left(-2 \cdot \left(c \cdot \color{blue}{\mathsf{fma}\left(c, b, a\right)}\right)\right) \]
    10. Applied rewrites80.2%

      \[\leadsto \color{blue}{i \cdot \left(-2 \cdot \left(c \cdot \mathsf{fma}\left(c, b, a\right)\right)\right)} \]
    11. Step-by-step derivation
      1. Applied rewrites88.9%

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

      if -2.00000000000000004e95 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e-179

      1. Initial program 97.8%

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

        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
      4. Step-by-step derivation
        1. lower-fma.f64N/A

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

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

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

      if 1e-179 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.00000000000000036e-18

      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

      if 5.00000000000000036e-18 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

      1. Initial program 88.6%

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

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

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

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

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

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

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

          \[\leadsto 2 \cdot \left(x \cdot y - c \cdot \left(\color{blue}{\left(b \cdot c + a\right)} \cdot i\right)\right) \]
        7. lower-fma.f6485.4

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

        \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - c \cdot \left(\mathsf{fma}\left(b, c, a\right) \cdot i\right)\right)} \]
    12. Recombined 4 regimes into one program.
    13. Final simplification90.7%

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

    Alternative 6: 73.9% accurate, 0.4× speedup?

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

      1. Initial program 79.0%

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

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

          \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{b \cdot \left(\left({c}^{2} \cdot i\right) \cdot -2\right)} \]
        3. *-commutativeN/A

          \[\leadsto b \cdot \color{blue}{\left(-2 \cdot \left({c}^{2} \cdot i\right)\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \color{blue}{b \cdot \left(-2 \cdot \left({c}^{2} \cdot i\right)\right)} \]
        5. associate-*r*N/A

          \[\leadsto b \cdot \color{blue}{\left(\left(-2 \cdot {c}^{2}\right) \cdot i\right)} \]
        6. *-commutativeN/A

          \[\leadsto b \cdot \color{blue}{\left(i \cdot \left(-2 \cdot {c}^{2}\right)\right)} \]
        7. lower-*.f64N/A

          \[\leadsto b \cdot \color{blue}{\left(i \cdot \left(-2 \cdot {c}^{2}\right)\right)} \]
        8. lower-*.f64N/A

          \[\leadsto b \cdot \left(i \cdot \color{blue}{\left(-2 \cdot {c}^{2}\right)}\right) \]
        9. unpow2N/A

          \[\leadsto b \cdot \left(i \cdot \left(-2 \cdot \color{blue}{\left(c \cdot c\right)}\right)\right) \]
        10. lower-*.f6471.1

          \[\leadsto b \cdot \left(i \cdot \left(-2 \cdot \color{blue}{\left(c \cdot c\right)}\right)\right) \]
      5. Applied rewrites71.1%

        \[\leadsto \color{blue}{b \cdot \left(i \cdot \left(-2 \cdot \left(c \cdot c\right)\right)\right)} \]
      6. Step-by-step derivation
        1. Applied rewrites68.4%

          \[\leadsto \left(i \cdot -2\right) \cdot \color{blue}{\left(c \cdot \left(c \cdot b\right)\right)} \]
        2. Step-by-step derivation
          1. Applied rewrites72.9%

            \[\leadsto \left(\left(i \cdot \left(c \cdot -2\right)\right) \cdot b\right) \cdot \color{blue}{c} \]

          if -2.00000000000000007e286 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e161

          1. Initial program 98.5%

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

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
          4. Step-by-step derivation
            1. lower-fma.f64N/A

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

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

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

          if 2.0000000000000001e161 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.00000000000000008e284

          1. Initial program 99.4%

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

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          4. Step-by-step derivation
            1. lower-*.f6410.5

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          5. Applied rewrites10.5%

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          6. Taylor expanded in a around inf

            \[\leadsto \color{blue}{-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(a \cdot \left(c \cdot i\right)\right) \cdot -2} \]
            2. associate-*r*N/A

              \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
            3. *-commutativeN/A

              \[\leadsto a \cdot \color{blue}{\left(-2 \cdot \left(c \cdot i\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \color{blue}{a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)} \]
            5. *-commutativeN/A

              \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
            6. lower-*.f64N/A

              \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
            7. lower-*.f6462.2

              \[\leadsto a \cdot \left(\color{blue}{\left(c \cdot i\right)} \cdot -2\right) \]
          8. Applied rewrites62.2%

            \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification76.0%

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

        Alternative 7: 72.8% accurate, 0.4× speedup?

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

          1. Initial program 78.5%

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

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          4. Step-by-step derivation
            1. lower-*.f648.4

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          5. Applied rewrites8.4%

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          6. Taylor expanded in b around inf

            \[\leadsto \color{blue}{-2 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto -2 \cdot \left(b \cdot \color{blue}{\left(i \cdot {c}^{2}\right)}\right) \]
            2. associate-*r*N/A

              \[\leadsto -2 \cdot \color{blue}{\left(\left(b \cdot i\right) \cdot {c}^{2}\right)} \]
            3. associate-*l*N/A

              \[\leadsto \color{blue}{\left(-2 \cdot \left(b \cdot i\right)\right) \cdot {c}^{2}} \]
            4. *-commutativeN/A

              \[\leadsto \color{blue}{{c}^{2} \cdot \left(-2 \cdot \left(b \cdot i\right)\right)} \]
            5. unpow2N/A

              \[\leadsto \color{blue}{\left(c \cdot c\right)} \cdot \left(-2 \cdot \left(b \cdot i\right)\right) \]
            6. associate-*l*N/A

              \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(-2 \cdot \left(b \cdot i\right)\right)\right)} \]
            7. lower-*.f64N/A

              \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(-2 \cdot \left(b \cdot i\right)\right)\right)} \]
            8. lower-*.f64N/A

              \[\leadsto c \cdot \color{blue}{\left(c \cdot \left(-2 \cdot \left(b \cdot i\right)\right)\right)} \]
            9. associate-*r*N/A

              \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(\left(-2 \cdot b\right) \cdot i\right)}\right) \]
            10. *-commutativeN/A

              \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(i \cdot \left(-2 \cdot b\right)\right)}\right) \]
            11. lower-*.f64N/A

              \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(i \cdot \left(-2 \cdot b\right)\right)}\right) \]
            12. lower-*.f6466.1

              \[\leadsto c \cdot \left(c \cdot \left(i \cdot \color{blue}{\left(-2 \cdot b\right)}\right)\right) \]
          8. Applied rewrites66.1%

            \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(i \cdot \left(-2 \cdot b\right)\right)\right)} \]

          if -2.00000000000000007e286 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e161

          1. Initial program 98.5%

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

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
          4. Step-by-step derivation
            1. lower-fma.f64N/A

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

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

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

          if 2.0000000000000001e161 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.00000000000000008e284

          1. Initial program 99.4%

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

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          4. Step-by-step derivation
            1. lower-*.f6410.5

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          5. Applied rewrites10.5%

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
          6. Taylor expanded in a around inf

            \[\leadsto \color{blue}{-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(a \cdot \left(c \cdot i\right)\right) \cdot -2} \]
            2. associate-*r*N/A

              \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
            3. *-commutativeN/A

              \[\leadsto a \cdot \color{blue}{\left(-2 \cdot \left(c \cdot i\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \color{blue}{a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)} \]
            5. *-commutativeN/A

              \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
            6. lower-*.f64N/A

              \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
            7. lower-*.f6462.2

              \[\leadsto a \cdot \left(\color{blue}{\left(c \cdot i\right)} \cdot -2\right) \]
          8. Applied rewrites62.2%

            \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]

          if 1.00000000000000008e284 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

          1. Initial program 80.1%

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

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

              \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
            2. associate-*r*N/A

              \[\leadsto \color{blue}{b \cdot \left(\left({c}^{2} \cdot i\right) \cdot -2\right)} \]
            3. *-commutativeN/A

              \[\leadsto b \cdot \color{blue}{\left(-2 \cdot \left({c}^{2} \cdot i\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \color{blue}{b \cdot \left(-2 \cdot \left({c}^{2} \cdot i\right)\right)} \]
            5. associate-*r*N/A

              \[\leadsto b \cdot \color{blue}{\left(\left(-2 \cdot {c}^{2}\right) \cdot i\right)} \]
            6. *-commutativeN/A

              \[\leadsto b \cdot \color{blue}{\left(i \cdot \left(-2 \cdot {c}^{2}\right)\right)} \]
            7. lower-*.f64N/A

              \[\leadsto b \cdot \color{blue}{\left(i \cdot \left(-2 \cdot {c}^{2}\right)\right)} \]
            8. lower-*.f64N/A

              \[\leadsto b \cdot \left(i \cdot \color{blue}{\left(-2 \cdot {c}^{2}\right)}\right) \]
            9. unpow2N/A

              \[\leadsto b \cdot \left(i \cdot \left(-2 \cdot \color{blue}{\left(c \cdot c\right)}\right)\right) \]
            10. lower-*.f6482.9

              \[\leadsto b \cdot \left(i \cdot \left(-2 \cdot \color{blue}{\left(c \cdot c\right)}\right)\right) \]
          5. Applied rewrites82.9%

            \[\leadsto \color{blue}{b \cdot \left(i \cdot \left(-2 \cdot \left(c \cdot c\right)\right)\right)} \]
          6. Step-by-step derivation
            1. Applied rewrites83.0%

              \[\leadsto \left(i \cdot -2\right) \cdot \color{blue}{\left(c \cdot \left(c \cdot b\right)\right)} \]
          7. Recombined 4 regimes into one program.
          8. Final simplification75.6%

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

          Alternative 8: 73.6% accurate, 0.4× speedup?

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

            1. Initial program 78.5%

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

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            4. Step-by-step derivation
              1. lower-*.f648.4

                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            5. Applied rewrites8.4%

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            6. Taylor expanded in b around inf

              \[\leadsto \color{blue}{-2 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)} \]
            7. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto -2 \cdot \left(b \cdot \color{blue}{\left(i \cdot {c}^{2}\right)}\right) \]
              2. associate-*r*N/A

                \[\leadsto -2 \cdot \color{blue}{\left(\left(b \cdot i\right) \cdot {c}^{2}\right)} \]
              3. associate-*l*N/A

                \[\leadsto \color{blue}{\left(-2 \cdot \left(b \cdot i\right)\right) \cdot {c}^{2}} \]
              4. *-commutativeN/A

                \[\leadsto \color{blue}{{c}^{2} \cdot \left(-2 \cdot \left(b \cdot i\right)\right)} \]
              5. unpow2N/A

                \[\leadsto \color{blue}{\left(c \cdot c\right)} \cdot \left(-2 \cdot \left(b \cdot i\right)\right) \]
              6. associate-*l*N/A

                \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(-2 \cdot \left(b \cdot i\right)\right)\right)} \]
              7. lower-*.f64N/A

                \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(-2 \cdot \left(b \cdot i\right)\right)\right)} \]
              8. lower-*.f64N/A

                \[\leadsto c \cdot \color{blue}{\left(c \cdot \left(-2 \cdot \left(b \cdot i\right)\right)\right)} \]
              9. associate-*r*N/A

                \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(\left(-2 \cdot b\right) \cdot i\right)}\right) \]
              10. *-commutativeN/A

                \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(i \cdot \left(-2 \cdot b\right)\right)}\right) \]
              11. lower-*.f64N/A

                \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(i \cdot \left(-2 \cdot b\right)\right)}\right) \]
              12. lower-*.f6466.1

                \[\leadsto c \cdot \left(c \cdot \left(i \cdot \color{blue}{\left(-2 \cdot b\right)}\right)\right) \]
            8. Applied rewrites66.1%

              \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(i \cdot \left(-2 \cdot b\right)\right)\right)} \]

            if -2.00000000000000007e286 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e161

            1. Initial program 98.5%

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

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
            4. Step-by-step derivation
              1. lower-fma.f64N/A

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

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

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

            if 2.0000000000000001e161 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.00000000000000008e284

            1. Initial program 99.4%

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

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            4. Step-by-step derivation
              1. lower-*.f6410.5

                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            5. Applied rewrites10.5%

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            6. Taylor expanded in a around inf

              \[\leadsto \color{blue}{-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)} \]
            7. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(a \cdot \left(c \cdot i\right)\right) \cdot -2} \]
              2. associate-*r*N/A

                \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
              3. *-commutativeN/A

                \[\leadsto a \cdot \color{blue}{\left(-2 \cdot \left(c \cdot i\right)\right)} \]
              4. lower-*.f64N/A

                \[\leadsto \color{blue}{a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)} \]
              5. *-commutativeN/A

                \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
              6. lower-*.f64N/A

                \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
              7. lower-*.f6462.2

                \[\leadsto a \cdot \left(\color{blue}{\left(c \cdot i\right)} \cdot -2\right) \]
            8. Applied rewrites62.2%

              \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]

            if 1.00000000000000008e284 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

            1. Initial program 80.1%

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

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

                \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
              2. associate-*r*N/A

                \[\leadsto \color{blue}{b \cdot \left(\left({c}^{2} \cdot i\right) \cdot -2\right)} \]
              3. *-commutativeN/A

                \[\leadsto b \cdot \color{blue}{\left(-2 \cdot \left({c}^{2} \cdot i\right)\right)} \]
              4. lower-*.f64N/A

                \[\leadsto \color{blue}{b \cdot \left(-2 \cdot \left({c}^{2} \cdot i\right)\right)} \]
              5. associate-*r*N/A

                \[\leadsto b \cdot \color{blue}{\left(\left(-2 \cdot {c}^{2}\right) \cdot i\right)} \]
              6. *-commutativeN/A

                \[\leadsto b \cdot \color{blue}{\left(i \cdot \left(-2 \cdot {c}^{2}\right)\right)} \]
              7. lower-*.f64N/A

                \[\leadsto b \cdot \color{blue}{\left(i \cdot \left(-2 \cdot {c}^{2}\right)\right)} \]
              8. lower-*.f64N/A

                \[\leadsto b \cdot \left(i \cdot \color{blue}{\left(-2 \cdot {c}^{2}\right)}\right) \]
              9. unpow2N/A

                \[\leadsto b \cdot \left(i \cdot \left(-2 \cdot \color{blue}{\left(c \cdot c\right)}\right)\right) \]
              10. lower-*.f6482.9

                \[\leadsto b \cdot \left(i \cdot \left(-2 \cdot \color{blue}{\left(c \cdot c\right)}\right)\right) \]
            5. Applied rewrites82.9%

              \[\leadsto \color{blue}{b \cdot \left(i \cdot \left(-2 \cdot \left(c \cdot c\right)\right)\right)} \]
          3. Recombined 4 regimes into one program.
          4. Final simplification75.6%

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

          Alternative 9: 73.6% accurate, 0.4× speedup?

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

            1. Initial program 79.0%

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

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

                \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
              2. associate-*r*N/A

                \[\leadsto \color{blue}{b \cdot \left(\left({c}^{2} \cdot i\right) \cdot -2\right)} \]
              3. *-commutativeN/A

                \[\leadsto b \cdot \color{blue}{\left(-2 \cdot \left({c}^{2} \cdot i\right)\right)} \]
              4. lower-*.f64N/A

                \[\leadsto \color{blue}{b \cdot \left(-2 \cdot \left({c}^{2} \cdot i\right)\right)} \]
              5. associate-*r*N/A

                \[\leadsto b \cdot \color{blue}{\left(\left(-2 \cdot {c}^{2}\right) \cdot i\right)} \]
              6. *-commutativeN/A

                \[\leadsto b \cdot \color{blue}{\left(i \cdot \left(-2 \cdot {c}^{2}\right)\right)} \]
              7. lower-*.f64N/A

                \[\leadsto b \cdot \color{blue}{\left(i \cdot \left(-2 \cdot {c}^{2}\right)\right)} \]
              8. lower-*.f64N/A

                \[\leadsto b \cdot \left(i \cdot \color{blue}{\left(-2 \cdot {c}^{2}\right)}\right) \]
              9. unpow2N/A

                \[\leadsto b \cdot \left(i \cdot \left(-2 \cdot \color{blue}{\left(c \cdot c\right)}\right)\right) \]
              10. lower-*.f6471.1

                \[\leadsto b \cdot \left(i \cdot \left(-2 \cdot \color{blue}{\left(c \cdot c\right)}\right)\right) \]
            5. Applied rewrites71.1%

              \[\leadsto \color{blue}{b \cdot \left(i \cdot \left(-2 \cdot \left(c \cdot c\right)\right)\right)} \]

            if -2.00000000000000007e286 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e161

            1. Initial program 98.5%

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

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
            4. Step-by-step derivation
              1. lower-fma.f64N/A

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

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

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

            if 2.0000000000000001e161 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.00000000000000008e284

            1. Initial program 99.4%

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

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            4. Step-by-step derivation
              1. lower-*.f6410.5

                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            5. Applied rewrites10.5%

              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            6. Taylor expanded in a around inf

              \[\leadsto \color{blue}{-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)} \]
            7. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(a \cdot \left(c \cdot i\right)\right) \cdot -2} \]
              2. associate-*r*N/A

                \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
              3. *-commutativeN/A

                \[\leadsto a \cdot \color{blue}{\left(-2 \cdot \left(c \cdot i\right)\right)} \]
              4. lower-*.f64N/A

                \[\leadsto \color{blue}{a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)} \]
              5. *-commutativeN/A

                \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
              6. lower-*.f64N/A

                \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
              7. lower-*.f6462.2

                \[\leadsto a \cdot \left(\color{blue}{\left(c \cdot i\right)} \cdot -2\right) \]
            8. Applied rewrites62.2%

              \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
          3. Recombined 3 regimes into one program.
          4. Final simplification75.3%

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

          Alternative 10: 81.5% accurate, 0.5× speedup?

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

            1. Initial program 83.2%

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

              \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)\right)} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto 2 \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot \left({c}^{2} \cdot i\right)\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{\left({c}^{2} \cdot i\right) \cdot b}\right)\right) \]
              3. *-commutativeN/A

                \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{\left(i \cdot {c}^{2}\right)} \cdot b\right)\right) \]
              4. associate-*l*N/A

                \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{i \cdot \left({c}^{2} \cdot b\right)}\right)\right) \]
              5. *-commutativeN/A

                \[\leadsto 2 \cdot \left(\mathsf{neg}\left(i \cdot \color{blue}{\left(b \cdot {c}^{2}\right)}\right)\right) \]
              6. distribute-rgt-neg-inN/A

                \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(\mathsf{neg}\left(b \cdot {c}^{2}\right)\right)\right)} \]
              7. mul-1-negN/A

                \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot \left(b \cdot {c}^{2}\right)\right)}\right) \]
              8. lower-*.f64N/A

                \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(-1 \cdot \left(b \cdot {c}^{2}\right)\right)\right)} \]
              9. mul-1-negN/A

                \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot {c}^{2}\right)\right)}\right) \]
              10. distribute-rgt-neg-outN/A

                \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(b \cdot \left(\mathsf{neg}\left({c}^{2}\right)\right)\right)}\right) \]
              11. mul-1-negN/A

                \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(-1 \cdot {c}^{2}\right)}\right)\right) \]
              12. lower-*.f64N/A

                \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(b \cdot \left(-1 \cdot {c}^{2}\right)\right)}\right) \]
              13. mul-1-negN/A

                \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left({c}^{2}\right)\right)}\right)\right) \]
              14. unpow2N/A

                \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(\mathsf{neg}\left(\color{blue}{c \cdot c}\right)\right)\right)\right) \]
              15. distribute-rgt-neg-inN/A

                \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)}\right)\right) \]
              16. mul-1-negN/A

                \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot c\right)}\right)\right)\right) \]
              17. lower-*.f64N/A

                \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(-1 \cdot c\right)\right)}\right)\right) \]
              18. mul-1-negN/A

                \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(\mathsf{neg}\left(c\right)\right)}\right)\right)\right) \]
              19. lower-neg.f6450.0

                \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(-c\right)}\right)\right)\right) \]
            5. Applied rewrites50.0%

              \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right)} \]
            6. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \color{blue}{2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)\right)\right)} \]
              2. *-commutativeN/A

                \[\leadsto \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)\right)\right) \cdot 2} \]
              3. lower-*.f6450.0

                \[\leadsto \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right) \cdot 2} \]
            7. Applied rewrites51.3%

              \[\leadsto \color{blue}{\left(i \cdot \left(c \cdot \left(\left(-c\right) \cdot b\right)\right)\right) \cdot 2} \]
            8. Taylor expanded in i around inf

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

                \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \]
              2. associate-*r*N/A

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

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

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

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

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

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

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

                \[\leadsto i \cdot \left(-2 \cdot \left(c \cdot \left(\color{blue}{c \cdot b} + a\right)\right)\right) \]
              10. lower-fma.f6480.2

                \[\leadsto i \cdot \left(-2 \cdot \left(c \cdot \color{blue}{\mathsf{fma}\left(c, b, a\right)}\right)\right) \]
            10. Applied rewrites80.2%

              \[\leadsto \color{blue}{i \cdot \left(-2 \cdot \left(c \cdot \mathsf{fma}\left(c, b, a\right)\right)\right)} \]
            11. Step-by-step derivation
              1. Applied rewrites88.9%

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

              if -2.00000000000000004e95 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e-179

              1. Initial program 97.8%

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

                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
              4. Step-by-step derivation
                1. lower-fma.f64N/A

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

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

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

              if 1e-179 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

              1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z - c \cdot \left(\mathsf{fma}\left(b, c, a\right) \cdot i\right)\right)} \]
            12. Recombined 3 regimes into one program.
            13. Final simplification88.1%

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

            Alternative 11: 95.2% accurate, 0.5× speedup?

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

              1. Initial program 98.7%

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
                7. distribute-rgt-neg-inN/A

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
                13. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) + \left(\left(a + b \cdot c\right) \cdot c\right) \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
                12. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

              if 1.0000000000000001e272 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i))

              1. Initial program 77.7%

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
                7. distribute-rgt-neg-inN/A

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
                13. distribute-rgt-neg-inN/A

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(\mathsf{neg}\left(i\right)\right), \color{blue}{z \cdot t} + x \cdot y\right) \]
                19. lower-fma.f6493.6

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) + \left(\left(a + b \cdot c\right) \cdot c\right) \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
                12. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, c, a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c \cdot i\right)\right)}\right)\right) \]
                13. distribute-rgt-neg-inN/A

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right)} \cdot \left(c \cdot i\right)\right)\right)\right) \]
                16. associate-*l*N/A

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{\left(c \cdot \mathsf{fma}\left(b, c, a\right)\right)} \cdot i\right)\right)\right) \]
                21. associate-*l*N/A

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

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

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

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

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

            Alternative 12: 94.1% accurate, 0.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq \infty:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(y, x, z \cdot t - c \cdot \left(i \cdot \mathsf{fma}\left(b, c, a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \left(i \cdot \left(b \cdot c\right)\right) \cdot \left(-c\right)\right)\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (if (<= (- (+ (* x y) (* z t)) (* (* c (+ a (* b c))) i)) INFINITY)
               (* 2.0 (fma y x (- (* z t) (* c (* i (fma b c a))))))
               (* 2.0 (fma z t (fma y x (* (* i (* b c)) (- c)))))))
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double tmp;
            	if ((((x * y) + (z * t)) - ((c * (a + (b * c))) * i)) <= ((double) INFINITY)) {
            		tmp = 2.0 * fma(y, x, ((z * t) - (c * (i * fma(b, c, a)))));
            	} else {
            		tmp = 2.0 * fma(z, t, fma(y, x, ((i * (b * c)) * -c)));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b, c, i)
            	tmp = 0.0
            	if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * Float64(a + Float64(b * c))) * i)) <= Inf)
            		tmp = Float64(2.0 * fma(y, x, Float64(Float64(z * t) - Float64(c * Float64(i * fma(b, c, a))))));
            	else
            		tmp = Float64(2.0 * fma(z, t, fma(y, x, Float64(Float64(i * Float64(b * c)) * Float64(-c)))));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(y * x + N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(b * c + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t + N[(y * x + N[(N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision] * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq \infty:\\
            \;\;\;\;2 \cdot \mathsf{fma}\left(y, x, z \cdot t - c \cdot \left(i \cdot \mathsf{fma}\left(b, c, a\right)\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \left(i \cdot \left(b \cdot c\right)\right) \cdot \left(-c\right)\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0

              1. Initial program 95.0%

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
                7. distribute-rgt-neg-inN/A

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
                13. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(y, x, \left(\left(a + b \cdot c\right) \cdot c\right) \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)} + z \cdot t\right) \]
                16. distribute-rgt-neg-inN/A

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

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

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

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

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

              1. Initial program 0.0%

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
                7. distribute-rgt-neg-inN/A

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
                13. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) + \left(\left(a + b \cdot c\right) \cdot c\right) \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
                12. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, c, a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c \cdot i\right)\right)}\right)\right) \]
                13. distribute-rgt-neg-inN/A

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right)} \cdot \left(c \cdot i\right)\right)\right)\right) \]
                16. associate-*l*N/A

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(\color{blue}{\left(c \cdot \mathsf{fma}\left(b, c, a\right)\right)} \cdot i\right)\right)\right) \]
                21. associate-*l*N/A

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

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

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

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

                \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{neg}\left(c \cdot \color{blue}{\left(b \cdot \left(c \cdot i\right)\right)}\right)\right)\right) \]
              10. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, -c \cdot \left(i \cdot \color{blue}{\left(c \cdot b\right)}\right)\right)\right) \]
              11. Applied rewrites90.9%

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

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

            Alternative 13: 83.2% accurate, 0.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(c, b, a\right) \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\ t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+161}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(t, z, 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 c b a) (* i (* c -2.0)))) (t_2 (* (* c (+ a (* b c))) i)))
               (if (<= t_2 -2e+95)
                 t_1
                 (if (<= t_2 2e+161) (* 2.0 (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(c, b, a) * (i * (c * -2.0));
            	double t_2 = (c * (a + (b * c))) * i;
            	double tmp;
            	if (t_2 <= -2e+95) {
            		tmp = t_1;
            	} else if (t_2 <= 2e+161) {
            		tmp = 2.0 * fma(t, z, (x * y));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b, c, i)
            	t_1 = Float64(fma(c, b, a) * Float64(i * Float64(c * -2.0)))
            	t_2 = Float64(Float64(c * Float64(a + Float64(b * c))) * i)
            	tmp = 0.0
            	if (t_2 <= -2e+95)
            		tmp = t_1;
            	elseif (t_2 <= 2e+161)
            		tmp = Float64(2.0 * 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[(N[(c * b + a), $MachinePrecision] * N[(i * N[(c * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+95], t$95$1, If[LessEqual[t$95$2, 2e+161], N[(2.0 * N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \mathsf{fma}\left(c, b, a\right) \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\
            t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\
            \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+95}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+161}:\\
            \;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2.00000000000000004e95 or 2.0000000000000001e161 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

              1. Initial program 84.0%

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

                \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)\right)} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto 2 \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot \left({c}^{2} \cdot i\right)\right)\right)} \]
                2. *-commutativeN/A

                  \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{\left({c}^{2} \cdot i\right) \cdot b}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{\left(i \cdot {c}^{2}\right)} \cdot b\right)\right) \]
                4. associate-*l*N/A

                  \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{i \cdot \left({c}^{2} \cdot b\right)}\right)\right) \]
                5. *-commutativeN/A

                  \[\leadsto 2 \cdot \left(\mathsf{neg}\left(i \cdot \color{blue}{\left(b \cdot {c}^{2}\right)}\right)\right) \]
                6. distribute-rgt-neg-inN/A

                  \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(\mathsf{neg}\left(b \cdot {c}^{2}\right)\right)\right)} \]
                7. mul-1-negN/A

                  \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot \left(b \cdot {c}^{2}\right)\right)}\right) \]
                8. lower-*.f64N/A

                  \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(-1 \cdot \left(b \cdot {c}^{2}\right)\right)\right)} \]
                9. mul-1-negN/A

                  \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot {c}^{2}\right)\right)}\right) \]
                10. distribute-rgt-neg-outN/A

                  \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(b \cdot \left(\mathsf{neg}\left({c}^{2}\right)\right)\right)}\right) \]
                11. mul-1-negN/A

                  \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(-1 \cdot {c}^{2}\right)}\right)\right) \]
                12. lower-*.f64N/A

                  \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(b \cdot \left(-1 \cdot {c}^{2}\right)\right)}\right) \]
                13. mul-1-negN/A

                  \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left({c}^{2}\right)\right)}\right)\right) \]
                14. unpow2N/A

                  \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(\mathsf{neg}\left(\color{blue}{c \cdot c}\right)\right)\right)\right) \]
                15. distribute-rgt-neg-inN/A

                  \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)}\right)\right) \]
                16. mul-1-negN/A

                  \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot c\right)}\right)\right)\right) \]
                17. lower-*.f64N/A

                  \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(-1 \cdot c\right)\right)}\right)\right) \]
                18. mul-1-negN/A

                  \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(\mathsf{neg}\left(c\right)\right)}\right)\right)\right) \]
                19. lower-neg.f6455.4

                  \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(-c\right)}\right)\right)\right) \]
              5. Applied rewrites55.4%

                \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right)} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)\right)\right)} \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)\right)\right) \cdot 2} \]
                3. lower-*.f6455.4

                  \[\leadsto \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right) \cdot 2} \]
              7. Applied rewrites56.2%

                \[\leadsto \color{blue}{\left(i \cdot \left(c \cdot \left(\left(-c\right) \cdot b\right)\right)\right) \cdot 2} \]
              8. Taylor expanded in i around inf

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

                  \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \]
                2. associate-*r*N/A

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

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

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

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

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

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

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

                  \[\leadsto i \cdot \left(-2 \cdot \left(c \cdot \left(\color{blue}{c \cdot b} + a\right)\right)\right) \]
                10. lower-fma.f6482.1

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

                \[\leadsto \color{blue}{i \cdot \left(-2 \cdot \left(c \cdot \mathsf{fma}\left(c, b, a\right)\right)\right)} \]
              11. Step-by-step derivation
                1. Applied rewrites88.4%

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

                if -2.00000000000000004e95 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e161

                1. Initial program 98.3%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
                4. Step-by-step derivation
                  1. lower-fma.f64N/A

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

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

                  \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)} \]
              12. Recombined 2 regimes into one program.
              13. Final simplification87.4%

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

              Alternative 14: 81.4% accurate, 0.6× speedup?

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

                1. Initial program 83.2%

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

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

                    \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
                  2. associate-*r*N/A

                    \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
                  3. distribute-rgt-inN/A

                    \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                  4. associate-*r*N/A

                    \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
                  5. distribute-lft-outN/A

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

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

                    \[\leadsto \color{blue}{c \cdot \left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \]
                  8. distribute-lft-outN/A

                    \[\leadsto c \cdot \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \]
                  9. associate-*r*N/A

                    \[\leadsto c \cdot \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \]
                  10. distribute-rgt-inN/A

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

                    \[\leadsto c \cdot \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \]
                  12. associate-*r*N/A

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

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

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

                    \[\leadsto c \cdot \left(\left(-2 \cdot \color{blue}{\left(b \cdot c + a\right)}\right) \cdot i\right) \]
                  16. lower-fma.f6484.5

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

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

                if -2.00000000000000004e95 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e161

                1. Initial program 98.3%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
                4. Step-by-step derivation
                  1. lower-fma.f64N/A

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

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

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

                if 2.0000000000000001e161 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 85.4%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)\right)} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto 2 \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot \left({c}^{2} \cdot i\right)\right)\right)} \]
                  2. *-commutativeN/A

                    \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{\left({c}^{2} \cdot i\right) \cdot b}\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{\left(i \cdot {c}^{2}\right)} \cdot b\right)\right) \]
                  4. associate-*l*N/A

                    \[\leadsto 2 \cdot \left(\mathsf{neg}\left(\color{blue}{i \cdot \left({c}^{2} \cdot b\right)}\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto 2 \cdot \left(\mathsf{neg}\left(i \cdot \color{blue}{\left(b \cdot {c}^{2}\right)}\right)\right) \]
                  6. distribute-rgt-neg-inN/A

                    \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(\mathsf{neg}\left(b \cdot {c}^{2}\right)\right)\right)} \]
                  7. mul-1-negN/A

                    \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(-1 \cdot \left(b \cdot {c}^{2}\right)\right)}\right) \]
                  8. lower-*.f64N/A

                    \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(-1 \cdot \left(b \cdot {c}^{2}\right)\right)\right)} \]
                  9. mul-1-negN/A

                    \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot {c}^{2}\right)\right)}\right) \]
                  10. distribute-rgt-neg-outN/A

                    \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(b \cdot \left(\mathsf{neg}\left({c}^{2}\right)\right)\right)}\right) \]
                  11. mul-1-negN/A

                    \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(-1 \cdot {c}^{2}\right)}\right)\right) \]
                  12. lower-*.f64N/A

                    \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(b \cdot \left(-1 \cdot {c}^{2}\right)\right)}\right) \]
                  13. mul-1-negN/A

                    \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left({c}^{2}\right)\right)}\right)\right) \]
                  14. unpow2N/A

                    \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(\mathsf{neg}\left(\color{blue}{c \cdot c}\right)\right)\right)\right) \]
                  15. distribute-rgt-neg-inN/A

                    \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)}\right)\right) \]
                  16. mul-1-negN/A

                    \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot c\right)}\right)\right)\right) \]
                  17. lower-*.f64N/A

                    \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(-1 \cdot c\right)\right)}\right)\right) \]
                  18. mul-1-negN/A

                    \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(\mathsf{neg}\left(c\right)\right)}\right)\right)\right) \]
                  19. lower-neg.f6465.0

                    \[\leadsto 2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \color{blue}{\left(-c\right)}\right)\right)\right) \]
                5. Applied rewrites65.0%

                  \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right)} \]
                6. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \color{blue}{2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)\right)\right)} \]
                  2. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(\mathsf{neg}\left(c\right)\right)\right)\right)\right) \cdot 2} \]
                  3. lower-*.f6465.0

                    \[\leadsto \color{blue}{\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right) \cdot 2} \]
                7. Applied rewrites65.0%

                  \[\leadsto \color{blue}{\left(i \cdot \left(c \cdot \left(\left(-c\right) \cdot b\right)\right)\right) \cdot 2} \]
                8. Taylor expanded in i around inf

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

                    \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \]
                  2. associate-*r*N/A

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

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

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

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

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

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

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

                    \[\leadsto i \cdot \left(-2 \cdot \left(c \cdot \left(\color{blue}{c \cdot b} + a\right)\right)\right) \]
                  10. lower-fma.f6485.5

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

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

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

              Alternative 15: 81.9% accurate, 0.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(i \cdot \left(\mathsf{fma}\left(b, c, a\right) \cdot -2\right)\right)\\ t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+161}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(t, z, 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 (* c (* i (* (fma b c a) -2.0)))) (t_2 (* (* c (+ a (* b c))) i)))
                 (if (<= t_2 -2e+95)
                   t_1
                   (if (<= t_2 2e+161) (* 2.0 (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 = c * (i * (fma(b, c, a) * -2.0));
              	double t_2 = (c * (a + (b * c))) * i;
              	double tmp;
              	if (t_2 <= -2e+95) {
              		tmp = t_1;
              	} else if (t_2 <= 2e+161) {
              		tmp = 2.0 * fma(t, z, (x * y));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(c * Float64(i * Float64(fma(b, c, a) * -2.0)))
              	t_2 = Float64(Float64(c * Float64(a + Float64(b * c))) * i)
              	tmp = 0.0
              	if (t_2 <= -2e+95)
              		tmp = t_1;
              	elseif (t_2 <= 2e+161)
              		tmp = Float64(2.0 * 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[(c * N[(i * N[(N[(b * c + a), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+95], t$95$1, If[LessEqual[t$95$2, 2e+161], N[(2.0 * N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := c \cdot \left(i \cdot \left(\mathsf{fma}\left(b, c, a\right) \cdot -2\right)\right)\\
              t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\
              \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+95}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+161}:\\
              \;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2.00000000000000004e95 or 2.0000000000000001e161 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 84.0%

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

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

                    \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
                  2. associate-*r*N/A

                    \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
                  3. distribute-rgt-inN/A

                    \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                  4. associate-*r*N/A

                    \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
                  5. distribute-lft-outN/A

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

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

                    \[\leadsto \color{blue}{c \cdot \left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \]
                  8. distribute-lft-outN/A

                    \[\leadsto c \cdot \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \]
                  9. associate-*r*N/A

                    \[\leadsto c \cdot \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \]
                  10. distribute-rgt-inN/A

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

                    \[\leadsto c \cdot \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \]
                  12. associate-*r*N/A

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

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

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

                    \[\leadsto c \cdot \left(\left(-2 \cdot \color{blue}{\left(b \cdot c + a\right)}\right) \cdot i\right) \]
                  16. lower-fma.f6483.5

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

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

                if -2.00000000000000004e95 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e161

                1. Initial program 98.3%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
                4. Step-by-step derivation
                  1. lower-fma.f64N/A

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

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

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

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

              Alternative 16: 63.0% accurate, 0.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)\\ t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+161}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(t, z, 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 (* a (* -2.0 (* c i)))) (t_2 (* (* c (+ a (* b c))) i)))
                 (if (<= t_2 -5e+111)
                   t_1
                   (if (<= t_2 2e+161) (* 2.0 (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 = a * (-2.0 * (c * i));
              	double t_2 = (c * (a + (b * c))) * i;
              	double tmp;
              	if (t_2 <= -5e+111) {
              		tmp = t_1;
              	} else if (t_2 <= 2e+161) {
              		tmp = 2.0 * fma(t, z, (x * y));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(a * Float64(-2.0 * Float64(c * i)))
              	t_2 = Float64(Float64(c * Float64(a + Float64(b * c))) * i)
              	tmp = 0.0
              	if (t_2 <= -5e+111)
              		tmp = t_1;
              	elseif (t_2 <= 2e+161)
              		tmp = Float64(2.0 * 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[(a * N[(-2.0 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+111], t$95$1, If[LessEqual[t$95$2, 2e+161], N[(2.0 * N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)\\
              t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\
              \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+111}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+161}:\\
              \;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.9999999999999997e111 or 2.0000000000000001e161 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 83.4%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                4. Step-by-step derivation
                  1. lower-*.f649.3

                    \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                5. Applied rewrites9.3%

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                6. Taylor expanded in a around inf

                  \[\leadsto \color{blue}{-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)} \]
                7. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(a \cdot \left(c \cdot i\right)\right) \cdot -2} \]
                  2. associate-*r*N/A

                    \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
                  3. *-commutativeN/A

                    \[\leadsto a \cdot \color{blue}{\left(-2 \cdot \left(c \cdot i\right)\right)} \]
                  4. lower-*.f64N/A

                    \[\leadsto \color{blue}{a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
                  6. lower-*.f64N/A

                    \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
                  7. lower-*.f6450.7

                    \[\leadsto a \cdot \left(\color{blue}{\left(c \cdot i\right)} \cdot -2\right) \]
                8. Applied rewrites50.7%

                  \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]

                if -4.9999999999999997e111 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e161

                1. Initial program 98.4%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
                4. Step-by-step derivation
                  1. lower-fma.f64N/A

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

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

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

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

              Alternative 17: 42.5% accurate, 0.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)\\ t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+122}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (* a (* -2.0 (* c i)))) (t_2 (* (* c (+ a (* b c))) i)))
                 (if (<= t_2 -5e+27) t_1 (if (<= t_2 1e+122) (* 2.0 (* z t)) t_1))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = a * (-2.0 * (c * i));
              	double t_2 = (c * (a + (b * c))) * i;
              	double tmp;
              	if (t_2 <= -5e+27) {
              		tmp = t_1;
              	} else if (t_2 <= 1e+122) {
              		tmp = 2.0 * (z * t);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b, c, i)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8), intent (in) :: c
                  real(8), intent (in) :: i
                  real(8) :: t_1
                  real(8) :: t_2
                  real(8) :: tmp
                  t_1 = a * ((-2.0d0) * (c * i))
                  t_2 = (c * (a + (b * c))) * i
                  if (t_2 <= (-5d+27)) then
                      tmp = t_1
                  else if (t_2 <= 1d+122) then
                      tmp = 2.0d0 * (z * t)
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = a * (-2.0 * (c * i));
              	double t_2 = (c * (a + (b * c))) * i;
              	double tmp;
              	if (t_2 <= -5e+27) {
              		tmp = t_1;
              	} else if (t_2 <= 1e+122) {
              		tmp = 2.0 * (z * t);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c, i):
              	t_1 = a * (-2.0 * (c * i))
              	t_2 = (c * (a + (b * c))) * i
              	tmp = 0
              	if t_2 <= -5e+27:
              		tmp = t_1
              	elif t_2 <= 1e+122:
              		tmp = 2.0 * (z * t)
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(a * Float64(-2.0 * Float64(c * i)))
              	t_2 = Float64(Float64(c * Float64(a + Float64(b * c))) * i)
              	tmp = 0.0
              	if (t_2 <= -5e+27)
              		tmp = t_1;
              	elseif (t_2 <= 1e+122)
              		tmp = Float64(2.0 * Float64(z * t));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c, i)
              	t_1 = a * (-2.0 * (c * i));
              	t_2 = (c * (a + (b * c))) * i;
              	tmp = 0.0;
              	if (t_2 <= -5e+27)
              		tmp = t_1;
              	elseif (t_2 <= 1e+122)
              		tmp = 2.0 * (z * t);
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a * N[(-2.0 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+27], t$95$1, If[LessEqual[t$95$2, 1e+122], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)\\
              t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\
              \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+27}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t\_2 \leq 10^{+122}:\\
              \;\;\;\;2 \cdot \left(z \cdot t\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.99999999999999979e27 or 1.00000000000000001e122 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 84.9%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                4. Step-by-step derivation
                  1. lower-*.f6410.0

                    \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                5. Applied rewrites10.0%

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                6. Taylor expanded in a around inf

                  \[\leadsto \color{blue}{-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)} \]
                7. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(a \cdot \left(c \cdot i\right)\right) \cdot -2} \]
                  2. associate-*r*N/A

                    \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
                  3. *-commutativeN/A

                    \[\leadsto a \cdot \color{blue}{\left(-2 \cdot \left(c \cdot i\right)\right)} \]
                  4. lower-*.f64N/A

                    \[\leadsto \color{blue}{a \cdot \left(-2 \cdot \left(c \cdot i\right)\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
                  6. lower-*.f64N/A

                    \[\leadsto a \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot -2\right)} \]
                  7. lower-*.f6449.0

                    \[\leadsto a \cdot \left(\color{blue}{\left(c \cdot i\right)} \cdot -2\right) \]
                8. Applied rewrites49.0%

                  \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]

                if -4.99999999999999979e27 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.00000000000000001e122

                1. Initial program 98.2%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                4. Step-by-step derivation
                  1. lower-*.f6452.6

                    \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                5. Applied rewrites52.6%

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification50.6%

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

              Alternative 18: 94.6% accurate, 0.7× speedup?

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

                1. Initial program 78.1%

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
                  7. distribute-rgt-neg-inN/A

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

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

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

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

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

                    \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
                  13. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \mathsf{fma}\left(y, x, \left(\left(a + b \cdot c\right) \cdot c\right) \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)} + z \cdot t\right) \]
                  16. distribute-rgt-neg-inN/A

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

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

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

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

                if -2.00000000000000003e306 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 95.2%

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
                  7. distribute-rgt-neg-inN/A

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

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

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

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

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

                    \[\leadsto 2 \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, c, a\right)}, \mathsf{neg}\left(c \cdot i\right), x \cdot y + z \cdot t\right) \]
                  13. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) + \left(\left(a + b \cdot c\right) \cdot c\right) \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
                  12. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

              Alternative 19: 93.0% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \left(\mathsf{neg}\left(\color{blue}{c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)}\right)\right) + x \cdot y\right) \]
                13. distribute-rgt-neg-inN/A

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

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

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

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

              Alternative 20: 44.5% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ \mathbf{if}\;x \cdot y \leq -2.6 \cdot 10^{+106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{+111}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (* 2.0 (* x y))))
                 (if (<= (* x y) -2.6e+106)
                   t_1
                   (if (<= (* x y) 2.1e+111) (* 2.0 (* z t)) t_1))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = 2.0 * (x * y);
              	double tmp;
              	if ((x * y) <= -2.6e+106) {
              		tmp = t_1;
              	} else if ((x * y) <= 2.1e+111) {
              		tmp = 2.0 * (z * t);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b, c, i)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8), intent (in) :: c
                  real(8), intent (in) :: i
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = 2.0d0 * (x * y)
                  if ((x * y) <= (-2.6d+106)) then
                      tmp = t_1
                  else if ((x * y) <= 2.1d+111) then
                      tmp = 2.0d0 * (z * t)
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = 2.0 * (x * y);
              	double tmp;
              	if ((x * y) <= -2.6e+106) {
              		tmp = t_1;
              	} else if ((x * y) <= 2.1e+111) {
              		tmp = 2.0 * (z * t);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c, i):
              	t_1 = 2.0 * (x * y)
              	tmp = 0
              	if (x * y) <= -2.6e+106:
              		tmp = t_1
              	elif (x * y) <= 2.1e+111:
              		tmp = 2.0 * (z * t)
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(2.0 * Float64(x * y))
              	tmp = 0.0
              	if (Float64(x * y) <= -2.6e+106)
              		tmp = t_1;
              	elseif (Float64(x * y) <= 2.1e+111)
              		tmp = Float64(2.0 * Float64(z * t));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c, i)
              	t_1 = 2.0 * (x * y);
              	tmp = 0.0;
              	if ((x * y) <= -2.6e+106)
              		tmp = t_1;
              	elseif ((x * y) <= 2.1e+111)
              		tmp = 2.0 * (z * t);
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.6e+106], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.1e+111], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := 2 \cdot \left(x \cdot y\right)\\
              \mathbf{if}\;x \cdot y \leq -2.6 \cdot 10^{+106}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{+111}:\\
              \;\;\;\;2 \cdot \left(z \cdot t\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 x y) < -2.6000000000000002e106 or 2.09999999999999995e111 < (*.f64 x y)

                1. Initial program 86.9%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y\right)} \]
                4. Step-by-step derivation
                  1. lower-*.f6465.7

                    \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y\right)} \]
                5. Applied rewrites65.7%

                  \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y\right)} \]

                if -2.6000000000000002e106 < (*.f64 x y) < 2.09999999999999995e111

                1. Initial program 92.5%

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

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                4. Step-by-step derivation
                  1. lower-*.f6434.4

                    \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                5. Applied rewrites34.4%

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification43.6%

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.6 \cdot 10^{+106}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{+111}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 21: 29.6% accurate, 3.6× speedup?

              \[\begin{array}{l} \\ 2 \cdot \left(z \cdot t\right) \end{array} \]
              (FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	return 2.0 * (z * t);
              }
              
              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 = 2.0d0 * (z * t)
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	return 2.0 * (z * t);
              }
              
              def code(x, y, z, t, a, b, c, i):
              	return 2.0 * (z * t)
              
              function code(x, y, z, t, a, b, c, i)
              	return Float64(2.0 * Float64(z * t))
              end
              
              function tmp = code(x, y, z, t, a, b, c, i)
              	tmp = 2.0 * (z * t);
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              2 \cdot \left(z \cdot t\right)
              \end{array}
              
              Derivation
              1. Initial program 90.9%

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

                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
              4. Step-by-step derivation
                1. lower-*.f6429.1

                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
              5. Applied rewrites29.1%

                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
              6. Final simplification29.1%

                \[\leadsto 2 \cdot \left(z \cdot t\right) \]
              7. Add Preprocessing

              Developer Target 1: 94.2% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (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 = 2.0d0 * (((x * y) + (z * t)) - ((a + (b * c)) * (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 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
              }
              
              def code(x, y, z, t, a, b, c, i):
              	return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
              
              function code(x, y, z, t, a, b, c, i)
              	return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i))))
              end
              
              function tmp = code(x, y, z, t, a, b, c, i)
              	tmp = 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
              \end{array}
              

              Reproduce

              ?
              herbie shell --seed 2024220 
              (FPCore (x y z t a b c i)
                :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
                :precision binary64
              
                :alt
                (! :herbie-platform default (* 2 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
              
                (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))