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

Percentage Accurate: 90.7% → 96.4%
Time: 13.6s
Alternatives: 13
Speedup: 0.5×

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 13 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.7% 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.4% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(\left(i \cdot c\right) \cdot c\right) \cdot b\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.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), \left(-c\right) \cdot i, \mathsf{fma}\left(t, z, y \cdot x\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. Taylor expanded in x around inf

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

        \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
      2. lower-*.f6416.9

        \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
    5. Applied rewrites16.9%

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\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 \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(c \cdot i\right) \cdot c\right) \cdot b\right) \cdot -2 \]
    10. Recombined 2 regimes into one program.
    11. Final simplification96.1%

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

    Alternative 2: 72.6% accurate, 0.4× speedup?

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

      1. Initial program 82.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 inf

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

          \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
        2. lower-*.f6414.3

          \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
      5. Applied rewrites14.3%

        \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\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 \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

          \[\leadsto \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right) \cdot -2 \]
        2. Step-by-step derivation
          1. Applied rewrites75.8%

            \[\leadsto \left(c \cdot \left(\left(i \cdot b\right) \cdot c\right)\right) \cdot -2 \]

          if -1.99999999999999995e195 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2.0000000000000002e44

          1. Initial program 99.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 a around inf

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

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

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

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

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

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

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

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

          if -2.0000000000000002e44 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.0000000000000001e292

          1. Initial program 99.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 c around 0

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

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

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

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

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

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

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

          if 4.0000000000000001e292 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

          1. Initial program 69.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 x around inf

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

              \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
            2. lower-*.f644.7

              \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
          5. Applied rewrites4.7%

            \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\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 \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
            2. lower-*.f64N/A

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(c \cdot i\right) \cdot c\right) \cdot b\right) \cdot -2 \]
          10. Recombined 4 regimes into one program.
          11. Final simplification78.7%

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

          Alternative 3: 71.3% accurate, 0.4× speedup?

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

            1. Initial program 81.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 x around inf

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

                \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
              2. lower-*.f6412.9

                \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
            5. Applied rewrites12.9%

              \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\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 \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
              2. lower-*.f64N/A

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

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

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

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

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

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

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

                \[\leadsto \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right) \cdot -2 \]
              2. Step-by-step derivation
                1. Applied rewrites70.0%

                  \[\leadsto \left(c \cdot \left(\left(i \cdot b\right) \cdot c\right)\right) \cdot -2 \]

                if -1.99999999999999995e195 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2.0000000000000002e44

                1. Initial program 99.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 a around inf

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

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

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

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

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

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

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

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

                if -2.0000000000000002e44 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.0000000000000002e148

                1. Initial program 99.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 c around 0

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

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

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

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

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

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

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

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

              Alternative 4: 88.8% accurate, 0.5× speedup?

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

                1. Initial program 82.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 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. lower-*.f64N/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} \]
                  7. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

                if -5.0000000000000002e151 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000002e136

                1. Initial program 99.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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 5.0000000000000002e136 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 80.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. 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 5: 86.6% accurate, 0.5× speedup?

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

                1. Initial program 82.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 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. lower-*.f64N/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} \]
                  7. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

                if -5.0000000000000002e151 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.0000000000000002e148

                1. Initial program 99.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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4.0000000000000002e148 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 80.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 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot c\right)\right) \]
                  14. lower-fma.f6473.2

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

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

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

              Alternative 6: 85.9% accurate, 0.5× speedup?

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

                1. Initial program 82.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 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. lower-*.f64N/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} \]
                  7. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

                if -1.99999999999999995e195 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.0000000000000002e148

                1. Initial program 99.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 b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(i \cdot c\right) \cdot \color{blue}{\left(\frac{a}{b} + c\right)}\right) \cdot b\right) \]
                  15. lower-/.f6491.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4.0000000000000002e148 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 80.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 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot c\right)\right) \]
                  14. lower-fma.f6473.2

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

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

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

              Alternative 7: 81.1% accurate, 0.6× speedup?

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

                1. Initial program 84.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 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. lower-*.f64N/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} \]
                  7. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

                if -2.0000000000000002e44 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.0000000000000002e148

                1. Initial program 99.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 c around 0

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

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

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

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

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

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

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

                if 4.0000000000000002e148 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 80.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 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i\right)\right) \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot c\right)\right) \]
                  14. lower-fma.f6473.2

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

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

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

              Alternative 8: 81.4% accurate, 0.6× speedup?

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

                1. Initial program 82.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 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. lower-*.f64N/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} \]
                  7. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

                if -2.0000000000000002e44 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.0000000000000002e148

                1. Initial program 99.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 c around 0

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

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

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

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

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

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

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

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

              Alternative 9: 44.1% accurate, 0.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t \cdot z\right) \cdot 2\\ \mathbf{if}\;t \cdot z \leq -1.55 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq -2.8 \cdot 10^{-111}:\\ \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ \mathbf{elif}\;t \cdot z \leq 1.65 \cdot 10^{+49}:\\ \;\;\;\;\left(y \cdot x\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (* (* t z) 2.0)))
                 (if (<= (* t z) -1.55e+98)
                   t_1
                   (if (<= (* t z) -2.8e-111)
                     (* (* (* i c) a) -2.0)
                     (if (<= (* t z) 1.65e+49) (* (* y x) 2.0) t_1)))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = (t * z) * 2.0;
              	double tmp;
              	if ((t * z) <= -1.55e+98) {
              		tmp = t_1;
              	} else if ((t * z) <= -2.8e-111) {
              		tmp = ((i * c) * a) * -2.0;
              	} else if ((t * z) <= 1.65e+49) {
              		tmp = (y * x) * 2.0;
              	} 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 = (t * z) * 2.0d0
                  if ((t * z) <= (-1.55d+98)) then
                      tmp = t_1
                  else if ((t * z) <= (-2.8d-111)) then
                      tmp = ((i * c) * a) * (-2.0d0)
                  else if ((t * z) <= 1.65d+49) then
                      tmp = (y * x) * 2.0d0
                  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 = (t * z) * 2.0;
              	double tmp;
              	if ((t * z) <= -1.55e+98) {
              		tmp = t_1;
              	} else if ((t * z) <= -2.8e-111) {
              		tmp = ((i * c) * a) * -2.0;
              	} else if ((t * z) <= 1.65e+49) {
              		tmp = (y * x) * 2.0;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c, i):
              	t_1 = (t * z) * 2.0
              	tmp = 0
              	if (t * z) <= -1.55e+98:
              		tmp = t_1
              	elif (t * z) <= -2.8e-111:
              		tmp = ((i * c) * a) * -2.0
              	elif (t * z) <= 1.65e+49:
              		tmp = (y * x) * 2.0
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(Float64(t * z) * 2.0)
              	tmp = 0.0
              	if (Float64(t * z) <= -1.55e+98)
              		tmp = t_1;
              	elseif (Float64(t * z) <= -2.8e-111)
              		tmp = Float64(Float64(Float64(i * c) * a) * -2.0);
              	elseif (Float64(t * z) <= 1.65e+49)
              		tmp = Float64(Float64(y * x) * 2.0);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c, i)
              	t_1 = (t * z) * 2.0;
              	tmp = 0.0;
              	if ((t * z) <= -1.55e+98)
              		tmp = t_1;
              	elseif ((t * z) <= -2.8e-111)
              		tmp = ((i * c) * a) * -2.0;
              	elseif ((t * z) <= 1.65e+49)
              		tmp = (y * x) * 2.0;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t * z), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -1.55e+98], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], -2.8e-111], N[(N[(N[(i * c), $MachinePrecision] * a), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 1.65e+49], N[(N[(y * x), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(t \cdot z\right) \cdot 2\\
              \mathbf{if}\;t \cdot z \leq -1.55 \cdot 10^{+98}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t \cdot z \leq -2.8 \cdot 10^{-111}:\\
              \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\
              
              \mathbf{elif}\;t \cdot z \leq 1.65 \cdot 10^{+49}:\\
              \;\;\;\;\left(y \cdot x\right) \cdot 2\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (*.f64 z t) < -1.5500000000000001e98 or 1.6499999999999999e49 < (*.f64 z t)

                1. Initial program 90.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 inf

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

                    \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]
                  2. lower-*.f6460.7

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

                  \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]

                if -1.5500000000000001e98 < (*.f64 z t) < -2.79999999999999995e-111

                1. Initial program 88.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 a around inf

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

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

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

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

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

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

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

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

                if -2.79999999999999995e-111 < (*.f64 z t) < 1.6499999999999999e49

                1. Initial program 91.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 x around inf

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

                    \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                  2. lower-*.f6444.7

                    \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                5. Applied rewrites44.7%

                  \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
              3. Recombined 3 regimes into one program.
              4. Final simplification49.4%

                \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -1.55 \cdot 10^{+98}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \mathbf{elif}\;t \cdot z \leq -2.8 \cdot 10^{-111}:\\ \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ \mathbf{elif}\;t \cdot z \leq 1.65 \cdot 10^{+49}:\\ \;\;\;\;\left(y \cdot x\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \end{array} \]
              5. Add Preprocessing

              Alternative 10: 58.2% accurate, 1.0× speedup?

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

                1. Initial program 84.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 a around inf

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

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

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

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

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

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

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

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

                if -2.0000000000000002e44 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 93.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. +-commutativeN/A

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

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

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

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

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

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

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

              Alternative 11: 69.5% accurate, 1.2× speedup?

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

                1. Initial program 78.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 x around inf

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

                    \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                  2. lower-*.f648.0

                    \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                5. Applied rewrites8.0%

                  \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\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 \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
                  2. lower-*.f64N/A

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

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

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

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

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

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

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

                    \[\leadsto \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right) \cdot -2 \]

                  if -9.99999999999999953e67 < c < 9.0000000000000007e32

                  1. Initial program 99.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 c around 0

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

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

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

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

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

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

                    \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(y, x, z \cdot t\right)} \]
                10. Recombined 2 regimes into one program.
                11. Final simplification75.5%

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

                Alternative 12: 44.6% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y \cdot x\right) \cdot 2\\ \mathbf{if}\;y \cdot x \leq -1 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \cdot x \leq 2 \cdot 10^{-12}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (let* ((t_1 (* (* y x) 2.0)))
                   (if (<= (* y x) -1e+40) t_1 (if (<= (* y x) 2e-12) (* (* t z) 2.0) t_1))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = (y * x) * 2.0;
                	double tmp;
                	if ((y * x) <= -1e+40) {
                		tmp = t_1;
                	} else if ((y * x) <= 2e-12) {
                		tmp = (t * z) * 2.0;
                	} 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 = (y * x) * 2.0d0
                    if ((y * x) <= (-1d+40)) then
                        tmp = t_1
                    else if ((y * x) <= 2d-12) then
                        tmp = (t * z) * 2.0d0
                    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 = (y * x) * 2.0;
                	double tmp;
                	if ((y * x) <= -1e+40) {
                		tmp = t_1;
                	} else if ((y * x) <= 2e-12) {
                		tmp = (t * z) * 2.0;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	t_1 = (y * x) * 2.0
                	tmp = 0
                	if (y * x) <= -1e+40:
                		tmp = t_1
                	elif (y * x) <= 2e-12:
                		tmp = (t * z) * 2.0
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = Float64(Float64(y * x) * 2.0)
                	tmp = 0.0
                	if (Float64(y * x) <= -1e+40)
                		tmp = t_1;
                	elseif (Float64(y * x) <= 2e-12)
                		tmp = Float64(Float64(t * z) * 2.0);
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c, i)
                	t_1 = (y * x) * 2.0;
                	tmp = 0.0;
                	if ((y * x) <= -1e+40)
                		tmp = t_1;
                	elseif ((y * x) <= 2e-12)
                		tmp = (t * z) * 2.0;
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(y * x), $MachinePrecision], -1e+40], t$95$1, If[LessEqual[N[(y * x), $MachinePrecision], 2e-12], N[(N[(t * z), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(y \cdot x\right) \cdot 2\\
                \mathbf{if}\;y \cdot x \leq -1 \cdot 10^{+40}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;y \cdot x \leq 2 \cdot 10^{-12}:\\
                \;\;\;\;\left(t \cdot z\right) \cdot 2\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 x y) < -1.00000000000000003e40 or 1.99999999999999996e-12 < (*.f64 x y)

                  1. Initial program 87.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 inf

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

                      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                    2. lower-*.f6455.2

                      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                  5. Applied rewrites55.2%

                    \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]

                  if -1.00000000000000003e40 < (*.f64 x y) < 1.99999999999999996e-12

                  1. Initial program 93.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. *-commutativeN/A

                      \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]
                    2. lower-*.f6440.3

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

                    \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification47.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot x \leq -1 \cdot 10^{+40}:\\ \;\;\;\;\left(y \cdot x\right) \cdot 2\\ \mathbf{elif}\;y \cdot x \leq 2 \cdot 10^{-12}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot 2\\ \end{array} \]
                5. Add Preprocessing

                Alternative 13: 29.8% accurate, 3.6× speedup?

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

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

                    \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                  2. lower-*.f6430.2

                    \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                5. Applied rewrites30.2%

                  \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                6. Final simplification30.2%

                  \[\leadsto \left(y \cdot x\right) \cdot 2 \]
                7. Add Preprocessing

                Developer Target 1: 94.9% 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 2024235 
                (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))))