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

Percentage Accurate: 90.4% → 94.9%
Time: 10.7s
Alternatives: 14
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 90.4% 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: 94.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \cdot \left(\left(c \cdot b + a\right) \cdot c\right) \leq 10^{+192}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), \left(-c\right) \cdot i, \mathsf{fma}\left(t, z, x \cdot y\right)\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \mathsf{fma}\left(t, z, \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot \left(-c\right)\right)\right) \cdot 2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* i (* (+ (* c b) a) c)) 1e+192)
   (* (fma (fma c b a) (* (- c) i) (fma t z (* x y))) 2.0)
   (* (fma y x (fma t z (* (* (fma c b a) i) (- c)))) 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)) <= 1e+192) {
		tmp = fma(fma(c, b, a), (-c * i), fma(t, z, (x * y))) * 2.0;
	} else {
		tmp = fma(y, x, fma(t, z, ((fma(c, b, a) * i) * -c))) * 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)) <= 1e+192)
		tmp = Float64(fma(fma(c, b, a), Float64(Float64(-c) * i), fma(t, z, Float64(x * y))) * 2.0);
	else
		tmp = Float64(fma(y, x, fma(t, z, Float64(Float64(fma(c, b, a) * i) * Float64(-c)))) * 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], 1e+192], N[(N[(N[(c * b + a), $MachinePrecision] * N[((-c) * i), $MachinePrecision] + N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(y * x + N[(t * z + N[(N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision] * (-c)), $MachinePrecision]), $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 10^{+192}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), \left(-c\right) \cdot i, \mathsf{fma}\left(t, z, x \cdot y\right)\right) \cdot 2\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \mathsf{fma}\left(t, z, \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot \left(-c\right)\right)\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) < 1.00000000000000004e192

    1. Initial program 94.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.f6498.9

        \[\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(-c\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(-c\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(-c\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(-c\right) \cdot i, \color{blue}{t \cdot z} + x \cdot y\right) \]
      21. lower-fma.f6499.9

        \[\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(-c\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(-c\right) \cdot i, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
      24. lower-*.f6499.9

        \[\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 rewrites99.9%

      \[\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 1.00000000000000004e192 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.2% 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 -1 \cdot 10^{+248}:\\ \;\;\;\;\mathsf{fma}\left(-c, \mathsf{fma}\left(b, c, a\right) \cdot i, z \cdot t\right) \cdot 2\\ \mathbf{elif}\;t\_1 \leq 10^{-14}:\\ \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\right) \cdot 2\\ \mathbf{elif}\;t\_1 \leq 10^{+261}:\\ \;\;\;\;\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(i \cdot c\right) \cdot \mathsf{fma}\left(b, c, a\right)\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 -1e+248)
     (* (fma (- c) (* (fma b c a) i) (* z t)) 2.0)
     (if (<= t_1 1e-14)
       (* (fma t z (* x y)) 2.0)
       (if (<= t_1 1e+261)
         (* (fma (- i) (* (fma c b a) c) (* z t)) 2.0)
         (* -2.0 (* (* i c) (fma b c a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = i * (((c * b) + a) * c);
	double tmp;
	if (t_1 <= -1e+248) {
		tmp = fma(-c, (fma(b, c, a) * i), (z * t)) * 2.0;
	} else if (t_1 <= 1e-14) {
		tmp = fma(t, z, (x * y)) * 2.0;
	} else if (t_1 <= 1e+261) {
		tmp = fma(-i, (fma(c, b, a) * c), (z * t)) * 2.0;
	} else {
		tmp = -2.0 * ((i * c) * fma(b, c, a));
	}
	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 <= -1e+248)
		tmp = Float64(fma(Float64(-c), Float64(fma(b, c, a) * i), Float64(z * t)) * 2.0);
	elseif (t_1 <= 1e-14)
		tmp = Float64(fma(t, z, Float64(x * y)) * 2.0);
	elseif (t_1 <= 1e+261)
		tmp = Float64(fma(Float64(-i), Float64(fma(c, b, a) * c), Float64(z * t)) * 2.0);
	else
		tmp = Float64(-2.0 * Float64(Float64(i * c) * fma(b, c, a)));
	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, -1e+248], N[(N[((-c) * N[(N[(b * c + a), $MachinePrecision] * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[t$95$1, 1e-14], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+261], N[(N[((-i) * N[(N[(c * b + a), $MachinePrecision] * c), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(-2.0 * N[(N[(i * c), $MachinePrecision] * N[(b * c + a), $MachinePrecision]), $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 -1 \cdot 10^{+248}:\\
\;\;\;\;\mathsf{fma}\left(-c, \mathsf{fma}\left(b, c, a\right) \cdot i, z \cdot t\right) \cdot 2\\

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

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

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


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

    1. Initial program 85.1%

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot c\right) \cdot i\right) \]
      7. lower-neg.f6443.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000005e248 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.99999999999999999e-15

    1. Initial program 98.1%

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

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

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

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

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

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

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

    if 9.99999999999999999e-15 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999993e260

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
      6. distribute-lft-neg-inN/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)} + t \cdot z\right) \]
      7. 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) + t \cdot z\right) \]
      8. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999993e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

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

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

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

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

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

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

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

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

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

    Alternative 3: 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 -\infty:\\ \;\;\;\;\mathsf{fma}\left(-c, \mathsf{fma}\left(b, c, a\right) \cdot i, z \cdot t\right) \cdot 2\\ \mathbf{elif}\;t\_1 \leq 10^{+261}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \mathsf{fma}\left(\left(-b\right) \cdot c, i \cdot c, z \cdot t\right)\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(i \cdot c\right) \cdot \mathsf{fma}\left(b, c, a\right)\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 (- INFINITY))
         (* (fma (- c) (* (fma b c a) i) (* z t)) 2.0)
         (if (<= t_1 1e+261)
           (* (fma y x (fma (* (- b) c) (* i c) (* z t))) 2.0)
           (* -2.0 (* (* i c) (fma b c a)))))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = i * (((c * b) + a) * c);
    	double tmp;
    	if (t_1 <= -((double) INFINITY)) {
    		tmp = fma(-c, (fma(b, c, a) * i), (z * t)) * 2.0;
    	} else if (t_1 <= 1e+261) {
    		tmp = fma(y, x, fma((-b * c), (i * c), (z * t))) * 2.0;
    	} else {
    		tmp = -2.0 * ((i * c) * fma(b, c, a));
    	}
    	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 <= Float64(-Inf))
    		tmp = Float64(fma(Float64(-c), Float64(fma(b, c, a) * i), Float64(z * t)) * 2.0);
    	elseif (t_1 <= 1e+261)
    		tmp = Float64(fma(y, x, fma(Float64(Float64(-b) * c), Float64(i * c), Float64(z * t))) * 2.0);
    	else
    		tmp = Float64(-2.0 * Float64(Float64(i * c) * fma(b, c, a)));
    	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, (-Infinity)], N[(N[((-c) * N[(N[(b * c + a), $MachinePrecision] * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+261], N[(N[(y * x + N[(N[((-b) * c), $MachinePrecision] * N[(i * c), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(-2.0 * N[(N[(i * c), $MachinePrecision] * N[(b * c + a), $MachinePrecision]), $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 -\infty:\\
    \;\;\;\;\mathsf{fma}\left(-c, \mathsf{fma}\left(b, c, a\right) \cdot i, z \cdot t\right) \cdot 2\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+261}:\\
    \;\;\;\;\mathsf{fma}\left(y, x, \mathsf{fma}\left(\left(-b\right) \cdot c, i \cdot c, z \cdot t\right)\right) \cdot 2\\
    
    \mathbf{else}:\\
    \;\;\;\;-2 \cdot \left(\left(i \cdot c\right) \cdot \mathsf{fma}\left(b, c, a\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0

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

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

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

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

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

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

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

          \[\leadsto 2 \cdot \left(\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot c\right) \cdot i\right) \]
        7. lower-neg.f6445.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999993e260

      1. Initial program 98.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. Step-by-step derivation
        1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.9999999999999993e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

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

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

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

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

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

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

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

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

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

      Alternative 4: 82.9% 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 -1 \cdot 10^{+248}:\\ \;\;\;\;\mathsf{fma}\left(-c, \mathsf{fma}\left(b, c, a\right) \cdot i, z \cdot t\right) \cdot 2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+119}:\\ \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(i \cdot c\right) \cdot \mathsf{fma}\left(b, c, a\right)\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 -1e+248)
           (* (fma (- c) (* (fma b c a) i) (* z t)) 2.0)
           (if (<= t_1 2e+119)
             (* (fma t z (* x y)) 2.0)
             (* -2.0 (* (* i c) (fma b c a)))))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double t_1 = i * (((c * b) + a) * c);
      	double tmp;
      	if (t_1 <= -1e+248) {
      		tmp = fma(-c, (fma(b, c, a) * i), (z * t)) * 2.0;
      	} else if (t_1 <= 2e+119) {
      		tmp = fma(t, z, (x * y)) * 2.0;
      	} else {
      		tmp = -2.0 * ((i * c) * fma(b, c, a));
      	}
      	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 <= -1e+248)
      		tmp = Float64(fma(Float64(-c), Float64(fma(b, c, a) * i), Float64(z * t)) * 2.0);
      	elseif (t_1 <= 2e+119)
      		tmp = Float64(fma(t, z, Float64(x * y)) * 2.0);
      	else
      		tmp = Float64(-2.0 * Float64(Float64(i * c) * fma(b, c, a)));
      	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, -1e+248], N[(N[((-c) * N[(N[(b * c + a), $MachinePrecision] * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[t$95$1, 2e+119], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(-2.0 * N[(N[(i * c), $MachinePrecision] * N[(b * c + a), $MachinePrecision]), $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 -1 \cdot 10^{+248}:\\
      \;\;\;\;\mathsf{fma}\left(-c, \mathsf{fma}\left(b, c, a\right) \cdot i, z \cdot t\right) \cdot 2\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+119}:\\
      \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\right) \cdot 2\\
      
      \mathbf{else}:\\
      \;\;\;\;-2 \cdot \left(\left(i \cdot c\right) \cdot \mathsf{fma}\left(b, c, a\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1.00000000000000005e248

        1. Initial program 85.1%

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

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

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

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

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

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

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

            \[\leadsto 2 \cdot \left(\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot c\right) \cdot i\right) \]
          7. lower-neg.f6443.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.00000000000000005e248 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.99999999999999989e119

        1. Initial program 98.4%

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

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

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

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

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

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

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

        if 1.99999999999999989e119 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

        1. Initial program 77.2%

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
          6. 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. *-commutativeN/A

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

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

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

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

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

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

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

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

        Alternative 5: 82.3% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := -2 \cdot \left(\left(i \cdot c\right) \cdot \mathsf{fma}\left(b, c, a\right)\right)\\ t_2 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+119}:\\ \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\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 (* -2.0 (* (* i c) (fma b c a)))) (t_2 (* i (* (+ (* c b) a) c))))
           (if (<= t_2 (- INFINITY))
             t_1
             (if (<= t_2 2e+119) (* (fma t z (* x y)) 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 = -2.0 * ((i * c) * fma(b, c, a));
        	double t_2 = i * (((c * b) + a) * c);
        	double tmp;
        	if (t_2 <= -((double) INFINITY)) {
        		tmp = t_1;
        	} else if (t_2 <= 2e+119) {
        		tmp = fma(t, z, (x * y)) * 2.0;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b, c, i)
        	t_1 = Float64(-2.0 * Float64(Float64(i * c) * fma(b, c, a)))
        	t_2 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
        	tmp = 0.0
        	if (t_2 <= Float64(-Inf))
        		tmp = t_1;
        	elseif (t_2 <= 2e+119)
        		tmp = Float64(fma(t, z, Float64(x * y)) * 2.0);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-2.0 * N[(N[(i * c), $MachinePrecision] * N[(b * c + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(i * N[(N[(N[(c * b), $MachinePrecision] + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e+119], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := -2 \cdot \left(\left(i \cdot c\right) \cdot \mathsf{fma}\left(b, c, a\right)\right)\\
        t_2 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
        \mathbf{if}\;t\_2 \leq -\infty:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+119}:\\
        \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\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) < -inf.0 or 1.99999999999999989e119 < (*.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. 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. *-commutativeN/A

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

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

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

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

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

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

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

            if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.99999999999999989e119

            1. Initial program 98.4%

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

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

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

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

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

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

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

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

          Alternative 6: 81.2% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ t_2 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+205}:\\ \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\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 (* (* -2.0 (* (fma c b a) i)) c)) (t_2 (* i (* (+ (* c b) a) c))))
             (if (<= t_2 (- INFINITY))
               t_1
               (if (<= t_2 5e+205) (* (fma t z (* x y)) 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 = (-2.0 * (fma(c, b, a) * i)) * c;
          	double t_2 = i * (((c * b) + a) * c);
          	double tmp;
          	if (t_2 <= -((double) INFINITY)) {
          		tmp = t_1;
          	} else if (t_2 <= 5e+205) {
          		tmp = fma(t, z, (x * y)) * 2.0;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c)
          	t_2 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
          	tmp = 0.0
          	if (t_2 <= Float64(-Inf))
          		tmp = t_1;
          	elseif (t_2 <= 5e+205)
          		tmp = Float64(fma(t, z, Float64(x * y)) * 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[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $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, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 5e+205], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
          t_2 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
          \mathbf{if}\;t\_2 \leq -\infty:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+205}:\\
          \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\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) < -inf.0 or 5.0000000000000002e205 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

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

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

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

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

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

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

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

            if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000002e205

            1. Initial program 98.5%

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

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

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

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

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

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

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

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

          Alternative 7: 74.2% 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 -\infty:\\ \;\;\;\;\left(-2 \cdot b\right) \cdot \left(\left(i \cdot c\right) \cdot c\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\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 (- INFINITY))
               (* (* -2.0 b) (* (* i c) c))
               (if (<= t_1 2e+306)
                 (* (fma t z (* x y)) 2.0)
                 (* (* (* (* c c) i) b) -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 <= -((double) INFINITY)) {
          		tmp = (-2.0 * b) * ((i * c) * c);
          	} else if (t_1 <= 2e+306) {
          		tmp = fma(t, z, (x * y)) * 2.0;
          	} else {
          		tmp = (((c * c) * i) * b) * -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 <= Float64(-Inf))
          		tmp = Float64(Float64(-2.0 * b) * Float64(Float64(i * c) * c));
          	elseif (t_1 <= 2e+306)
          		tmp = Float64(fma(t, z, Float64(x * y)) * 2.0);
          	else
          		tmp = Float64(Float64(Float64(Float64(c * c) * i) * b) * -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, (-Infinity)], N[(N[(-2.0 * b), $MachinePrecision] * N[(N[(i * c), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+306], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(N[(N[(c * c), $MachinePrecision] * i), $MachinePrecision] * b), $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 -\infty:\\
          \;\;\;\;\left(-2 \cdot b\right) \cdot \left(\left(i \cdot c\right) \cdot c\right)\\
          
          \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+306}:\\
          \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\right) \cdot 2\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\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) < -inf.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000003e306

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

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

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

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

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

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

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

              if 2.00000000000000003e306 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

              1. Initial program 71.1%

                \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
              2. Add Preprocessing
              3. Taylor expanded in 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

              Alternative 8: 73.7% 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 -\infty:\\ \;\;\;\;\left(\left(-2 \cdot b\right) \cdot c\right) \cdot \left(i \cdot c\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\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 (- INFINITY))
                   (* (* (* -2.0 b) c) (* i c))
                   (if (<= t_1 2e+306)
                     (* (fma t z (* x y)) 2.0)
                     (* (* (* (* c c) i) b) -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 <= -((double) INFINITY)) {
              		tmp = ((-2.0 * b) * c) * (i * c);
              	} else if (t_1 <= 2e+306) {
              		tmp = fma(t, z, (x * y)) * 2.0;
              	} else {
              		tmp = (((c * c) * i) * b) * -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 <= Float64(-Inf))
              		tmp = Float64(Float64(Float64(-2.0 * b) * c) * Float64(i * c));
              	elseif (t_1 <= 2e+306)
              		tmp = Float64(fma(t, z, Float64(x * y)) * 2.0);
              	else
              		tmp = Float64(Float64(Float64(Float64(c * c) * i) * b) * -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, (-Infinity)], N[(N[(N[(-2.0 * b), $MachinePrecision] * c), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+306], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(N[(N[(c * c), $MachinePrecision] * i), $MachinePrecision] * b), $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 -\infty:\\
              \;\;\;\;\left(\left(-2 \cdot b\right) \cdot c\right) \cdot \left(i \cdot c\right)\\
              
              \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+306}:\\
              \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\right) \cdot 2\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\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) < -inf.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000003e306

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

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

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

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

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

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

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

                  if 2.00000000000000003e306 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                  1. Initial program 71.1%

                    \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                  Alternative 9: 73.7% accurate, 0.6× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2\\ t_2 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\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 (* (* (* (* c c) i) b) -2.0)) (t_2 (* i (* (+ (* c b) a) c))))
                     (if (<= t_2 (- INFINITY))
                       t_1
                       (if (<= t_2 2e+306) (* (fma t z (* x y)) 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 = (((c * c) * i) * b) * -2.0;
                  	double t_2 = i * (((c * b) + a) * c);
                  	double tmp;
                  	if (t_2 <= -((double) INFINITY)) {
                  		tmp = t_1;
                  	} else if (t_2 <= 2e+306) {
                  		tmp = fma(t, z, (x * y)) * 2.0;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = Float64(Float64(Float64(Float64(c * c) * i) * b) * -2.0)
                  	t_2 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
                  	tmp = 0.0
                  	if (t_2 <= Float64(-Inf))
                  		tmp = t_1;
                  	elseif (t_2 <= 2e+306)
                  		tmp = Float64(fma(t, z, Float64(x * y)) * 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 * c), $MachinePrecision] * i), $MachinePrecision] * b), $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, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e+306], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2\\
                  t_2 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
                  \mathbf{if}\;t\_2 \leq -\infty:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
                  \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\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) < -inf.0 or 2.00000000000000003e306 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

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

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

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

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

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

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

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

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

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

                      if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000003e306

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

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

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

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

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

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

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

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

                    Alternative 10: 62.3% accurate, 0.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ t_2 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+261}:\\ \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\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) a) -2.0)) (t_2 (* i (* (+ (* c b) a) c))))
                       (if (<= t_2 (- INFINITY))
                         t_1
                         (if (<= t_2 1e+261) (* (fma t z (* x y)) 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) * a) * -2.0;
                    	double t_2 = i * (((c * b) + a) * c);
                    	double tmp;
                    	if (t_2 <= -((double) INFINITY)) {
                    		tmp = t_1;
                    	} else if (t_2 <= 1e+261) {
                    		tmp = fma(t, z, (x * y)) * 2.0;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(i * c) * a) * -2.0)
                    	t_2 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
                    	tmp = 0.0
                    	if (t_2 <= Float64(-Inf))
                    		tmp = t_1;
                    	elseif (t_2 <= 1e+261)
                    		tmp = Float64(fma(t, z, Float64(x * y)) * 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 * c), $MachinePrecision] * a), $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, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 1e+261], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\
                    t_2 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
                    \mathbf{if}\;t\_2 \leq -\infty:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t\_2 \leq 10^{+261}:\\
                    \;\;\;\;\mathsf{fma}\left(t, z, x \cdot y\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) < -inf.0 or 9.9999999999999993e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                      1. Initial program 78.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 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-*.f6448.6

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

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

                      if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999993e260

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

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

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

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

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

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

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

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

                    Alternative 11: 41.8% accurate, 0.9× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot t\right) \cdot 2\\ \mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+220}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \cdot t \leq -5 \cdot 10^{-172}:\\ \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ \mathbf{elif}\;z \cdot t \leq 10^{+132}:\\ \;\;\;\;\left(x \cdot y\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 (* (* z t) 2.0)))
                       (if (<= (* z t) -5e+220)
                         t_1
                         (if (<= (* z t) -5e-172)
                           (* (* (* i c) a) -2.0)
                           (if (<= (* z t) 1e+132) (* (* x y) 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 = (z * t) * 2.0;
                    	double tmp;
                    	if ((z * t) <= -5e+220) {
                    		tmp = t_1;
                    	} else if ((z * t) <= -5e-172) {
                    		tmp = ((i * c) * a) * -2.0;
                    	} else if ((z * t) <= 1e+132) {
                    		tmp = (x * y) * 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 = (z * t) * 2.0d0
                        if ((z * t) <= (-5d+220)) then
                            tmp = t_1
                        else if ((z * t) <= (-5d-172)) then
                            tmp = ((i * c) * a) * (-2.0d0)
                        else if ((z * t) <= 1d+132) then
                            tmp = (x * y) * 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 = (z * t) * 2.0;
                    	double tmp;
                    	if ((z * t) <= -5e+220) {
                    		tmp = t_1;
                    	} else if ((z * t) <= -5e-172) {
                    		tmp = ((i * c) * a) * -2.0;
                    	} else if ((z * t) <= 1e+132) {
                    		tmp = (x * y) * 2.0;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b, c, i):
                    	t_1 = (z * t) * 2.0
                    	tmp = 0
                    	if (z * t) <= -5e+220:
                    		tmp = t_1
                    	elif (z * t) <= -5e-172:
                    		tmp = ((i * c) * a) * -2.0
                    	elif (z * t) <= 1e+132:
                    		tmp = (x * y) * 2.0
                    	else:
                    		tmp = t_1
                    	return tmp
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(z * t) * 2.0)
                    	tmp = 0.0
                    	if (Float64(z * t) <= -5e+220)
                    		tmp = t_1;
                    	elseif (Float64(z * t) <= -5e-172)
                    		tmp = Float64(Float64(Float64(i * c) * a) * -2.0);
                    	elseif (Float64(z * t) <= 1e+132)
                    		tmp = Float64(Float64(x * y) * 2.0);
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                    	t_1 = (z * t) * 2.0;
                    	tmp = 0.0;
                    	if ((z * t) <= -5e+220)
                    		tmp = t_1;
                    	elseif ((z * t) <= -5e-172)
                    		tmp = ((i * c) * a) * -2.0;
                    	elseif ((z * t) <= 1e+132)
                    		tmp = (x * y) * 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[(z * t), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -5e+220], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], -5e-172], N[(N[(N[(i * c), $MachinePrecision] * a), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1e+132], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(z \cdot t\right) \cdot 2\\
                    \mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+220}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \cdot t \leq -5 \cdot 10^{-172}:\\
                    \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\
                    
                    \mathbf{elif}\;z \cdot t \leq 10^{+132}:\\
                    \;\;\;\;\left(x \cdot y\right) \cdot 2\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (*.f64 z t) < -5.0000000000000002e220 or 9.99999999999999991e131 < (*.f64 z t)

                      1. Initial program 89.1%

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

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

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

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

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

                      if -5.0000000000000002e220 < (*.f64 z t) < -4.9999999999999999e-172

                      1. Initial program 89.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 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-*.f6440.3

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

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

                      if -4.9999999999999999e-172 < (*.f64 z t) < 9.99999999999999991e131

                      1. Initial program 91.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 \color{blue}{2 \cdot \left(x \cdot y\right)} \]
                      4. Step-by-step derivation
                        1. lower-*.f64N/A

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

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

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

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

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

                    Alternative 12: 93.6% accurate, 1.1× speedup?

                    \[\begin{array}{l} \\ \mathsf{fma}\left(y, x, \mathsf{fma}\left(t, z, \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot \left(-c\right)\right)\right) \cdot 2 \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (* (fma y x (fma t z (* (* (fma c b a) i) (- c)))) 2.0))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	return fma(y, x, fma(t, z, ((fma(c, b, a) * i) * -c))) * 2.0;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	return Float64(fma(y, x, fma(t, z, Float64(Float64(fma(c, b, a) * i) * Float64(-c)))) * 2.0)
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * x + N[(t * z + N[(N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision] * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    \mathsf{fma}\left(y, x, \mathsf{fma}\left(t, z, \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot \left(-c\right)\right)\right) \cdot 2
                    \end{array}
                    
                    Derivation
                    1. Initial program 89.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. Step-by-step derivation
                      1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 13: 43.8% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot t\right) \cdot 2\\ \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+58}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \cdot t \leq 10^{+132}:\\ \;\;\;\;\left(x \cdot y\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 (* (* z t) 2.0)))
                       (if (<= (* z t) -2e+58) t_1 (if (<= (* z t) 1e+132) (* (* x y) 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 = (z * t) * 2.0;
                    	double tmp;
                    	if ((z * t) <= -2e+58) {
                    		tmp = t_1;
                    	} else if ((z * t) <= 1e+132) {
                    		tmp = (x * y) * 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 = (z * t) * 2.0d0
                        if ((z * t) <= (-2d+58)) then
                            tmp = t_1
                        else if ((z * t) <= 1d+132) then
                            tmp = (x * y) * 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 = (z * t) * 2.0;
                    	double tmp;
                    	if ((z * t) <= -2e+58) {
                    		tmp = t_1;
                    	} else if ((z * t) <= 1e+132) {
                    		tmp = (x * y) * 2.0;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b, c, i):
                    	t_1 = (z * t) * 2.0
                    	tmp = 0
                    	if (z * t) <= -2e+58:
                    		tmp = t_1
                    	elif (z * t) <= 1e+132:
                    		tmp = (x * y) * 2.0
                    	else:
                    		tmp = t_1
                    	return tmp
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(z * t) * 2.0)
                    	tmp = 0.0
                    	if (Float64(z * t) <= -2e+58)
                    		tmp = t_1;
                    	elseif (Float64(z * t) <= 1e+132)
                    		tmp = Float64(Float64(x * y) * 2.0);
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                    	t_1 = (z * t) * 2.0;
                    	tmp = 0.0;
                    	if ((z * t) <= -2e+58)
                    		tmp = t_1;
                    	elseif ((z * t) <= 1e+132)
                    		tmp = (x * y) * 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[(z * t), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -2e+58], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 1e+132], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(z \cdot t\right) \cdot 2\\
                    \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+58}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \cdot t \leq 10^{+132}:\\
                    \;\;\;\;\left(x \cdot y\right) \cdot 2\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 z t) < -1.99999999999999989e58 or 9.99999999999999991e131 < (*.f64 z t)

                      1. Initial program 89.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 z around inf

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

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

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

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

                      if -1.99999999999999989e58 < (*.f64 z t) < 9.99999999999999991e131

                      1. Initial program 90.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 \color{blue}{2 \cdot \left(x \cdot y\right)} \]
                      4. Step-by-step derivation
                        1. lower-*.f64N/A

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

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

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

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

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

                    Alternative 14: 28.7% accurate, 3.6× speedup?

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

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

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

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

                      \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
                    6. Final simplification31.4%

                      \[\leadsto \left(z \cdot t\right) \cdot 2 \]
                    7. Add Preprocessing

                    Developer Target 1: 94.2% accurate, 1.0× speedup?

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

                    Reproduce

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