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

Percentage Accurate: 90.2% → 96.0%
Time: 13.9s
Alternatives: 16
Speedup: 0.8×

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 16 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 96.0% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -5.50000000000000006e-73 or 6.4999999999999999e-163 < c

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{z \cdot t} + \left(x \cdot y - \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(z, t, x \cdot y - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)} \]
      7. sub-negN/A

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \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(z, t, \mathsf{fma}\left(y, x, \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(z, t, \mathsf{fma}\left(y, x, \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(z, t, \mathsf{fma}\left(y, x, \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(z, t, \mathsf{fma}\left(y, x, \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.2%

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

    if -5.50000000000000006e-73 < c < 6.4999999999999999e-163

    1. Initial program 93.5%

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(a \cdot \left(c \cdot i\right)\right) + \left(t \cdot z + x \cdot y\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)} + \left(t \cdot z + x \cdot y\right)\right) \]
      2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 41.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ t_2 := \left(\left(b \cdot c + a\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-163}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \mathbf{elif}\;t\_2 \leq 1000000000:\\ \;\;\;\;\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 (* (* (* i c) a) -2.0)) (t_2 (* (* (+ (* b c) a) c) i)))
   (if (<= t_2 -2e+88)
     t_1
     (if (<= t_2 -5e-163)
       (* (* t z) 2.0)
       (if (<= t_2 1000000000.0) (* (* 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 = (((b * c) + a) * c) * i;
	double tmp;
	if (t_2 <= -2e+88) {
		tmp = t_1;
	} else if (t_2 <= -5e-163) {
		tmp = (t * z) * 2.0;
	} else if (t_2 <= 1000000000.0) {
		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) :: t_2
    real(8) :: tmp
    t_1 = ((i * c) * a) * (-2.0d0)
    t_2 = (((b * c) + a) * c) * i
    if (t_2 <= (-2d+88)) then
        tmp = t_1
    else if (t_2 <= (-5d-163)) then
        tmp = (t * z) * 2.0d0
    else if (t_2 <= 1000000000.0d0) 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 = ((i * c) * a) * -2.0;
	double t_2 = (((b * c) + a) * c) * i;
	double tmp;
	if (t_2 <= -2e+88) {
		tmp = t_1;
	} else if (t_2 <= -5e-163) {
		tmp = (t * z) * 2.0;
	} else if (t_2 <= 1000000000.0) {
		tmp = (x * y) * 2.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = ((i * c) * a) * -2.0
	t_2 = (((b * c) + a) * c) * i
	tmp = 0
	if t_2 <= -2e+88:
		tmp = t_1
	elif t_2 <= -5e-163:
		tmp = (t * z) * 2.0
	elif t_2 <= 1000000000.0:
		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(Float64(i * c) * a) * -2.0)
	t_2 = Float64(Float64(Float64(Float64(b * c) + a) * c) * i)
	tmp = 0.0
	if (t_2 <= -2e+88)
		tmp = t_1;
	elseif (t_2 <= -5e-163)
		tmp = Float64(Float64(t * z) * 2.0);
	elseif (t_2 <= 1000000000.0)
		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 = ((i * c) * a) * -2.0;
	t_2 = (((b * c) + a) * c) * i;
	tmp = 0.0;
	if (t_2 <= -2e+88)
		tmp = t_1;
	elseif (t_2 <= -5e-163)
		tmp = (t * z) * 2.0;
	elseif (t_2 <= 1000000000.0)
		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[(N[(i * c), $MachinePrecision] * a), $MachinePrecision] * -2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(b * c), $MachinePrecision] + a), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+88], t$95$1, If[LessEqual[t$95$2, -5e-163], N[(N[(t * z), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[t$95$2, 1000000000.0], N[(N[(x * y), $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 := \left(\left(b \cdot c + a\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_2 \leq 1000000000:\\
\;\;\;\;\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 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1.99999999999999992e88 or 1e9 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

    if -1.99999999999999992e88 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.99999999999999977e-163

    1. Initial program 96.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 t around inf

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

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

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

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

    if -4.99999999999999977e-163 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e9

    1. Initial program 98.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(b \cdot c + a\right) \cdot c\right) \cdot i \leq -2 \cdot 10^{+88}:\\ \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ \mathbf{elif}\;\left(\left(b \cdot c + a\right) \cdot c\right) \cdot i \leq -5 \cdot 10^{-163}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \mathbf{elif}\;\left(\left(b \cdot c + a\right) \cdot c\right) \cdot i \leq 1000000000:\\ \;\;\;\;\left(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 3: 39.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c + a\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+88}:\\
\;\;\;\;\left(\left(a \cdot i\right) \cdot c\right) \cdot -2\\

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

\mathbf{elif}\;t\_1 \leq 1000000000:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

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


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

    1. Initial program 87.9%

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

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

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

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

      if -1.99999999999999992e88 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.99999999999999977e-163

      1. Initial program 96.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 t around inf

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

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

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

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

      if -4.99999999999999977e-163 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e9

      1. Initial program 98.7%

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

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

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

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

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

      if 1e9 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

      1. Initial program 85.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-*.f6442.0

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

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

          \[\leadsto \left(\left(a \cdot c\right) \cdot i\right) \cdot -2 \]
      7. Recombined 4 regimes into one program.
      8. Final simplification50.4%

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

      Alternative 4: 39.8% accurate, 0.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(a \cdot c\right) \cdot i\right) \cdot -2\\ t_2 := \left(\left(b \cdot c + a\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-163}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \mathbf{elif}\;t\_2 \leq 1000000000:\\ \;\;\;\;\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 (* (* (* a c) i) -2.0)) (t_2 (* (* (+ (* b c) a) c) i)))
         (if (<= t_2 -2e+88)
           t_1
           (if (<= t_2 -5e-163)
             (* (* t z) 2.0)
             (if (<= t_2 1000000000.0) (* (* 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 = ((a * c) * i) * -2.0;
      	double t_2 = (((b * c) + a) * c) * i;
      	double tmp;
      	if (t_2 <= -2e+88) {
      		tmp = t_1;
      	} else if (t_2 <= -5e-163) {
      		tmp = (t * z) * 2.0;
      	} else if (t_2 <= 1000000000.0) {
      		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) :: t_2
          real(8) :: tmp
          t_1 = ((a * c) * i) * (-2.0d0)
          t_2 = (((b * c) + a) * c) * i
          if (t_2 <= (-2d+88)) then
              tmp = t_1
          else if (t_2 <= (-5d-163)) then
              tmp = (t * z) * 2.0d0
          else if (t_2 <= 1000000000.0d0) 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 = ((a * c) * i) * -2.0;
      	double t_2 = (((b * c) + a) * c) * i;
      	double tmp;
      	if (t_2 <= -2e+88) {
      		tmp = t_1;
      	} else if (t_2 <= -5e-163) {
      		tmp = (t * z) * 2.0;
      	} else if (t_2 <= 1000000000.0) {
      		tmp = (x * y) * 2.0;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b, c, i):
      	t_1 = ((a * c) * i) * -2.0
      	t_2 = (((b * c) + a) * c) * i
      	tmp = 0
      	if t_2 <= -2e+88:
      		tmp = t_1
      	elif t_2 <= -5e-163:
      		tmp = (t * z) * 2.0
      	elif t_2 <= 1000000000.0:
      		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(Float64(a * c) * i) * -2.0)
      	t_2 = Float64(Float64(Float64(Float64(b * c) + a) * c) * i)
      	tmp = 0.0
      	if (t_2 <= -2e+88)
      		tmp = t_1;
      	elseif (t_2 <= -5e-163)
      		tmp = Float64(Float64(t * z) * 2.0);
      	elseif (t_2 <= 1000000000.0)
      		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 = ((a * c) * i) * -2.0;
      	t_2 = (((b * c) + a) * c) * i;
      	tmp = 0.0;
      	if (t_2 <= -2e+88)
      		tmp = t_1;
      	elseif (t_2 <= -5e-163)
      		tmp = (t * z) * 2.0;
      	elseif (t_2 <= 1000000000.0)
      		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[(N[(a * c), $MachinePrecision] * i), $MachinePrecision] * -2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(b * c), $MachinePrecision] + a), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+88], t$95$1, If[LessEqual[t$95$2, -5e-163], N[(N[(t * z), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[t$95$2, 1000000000.0], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(\left(a \cdot c\right) \cdot i\right) \cdot -2\\
      t_2 := \left(\left(b \cdot c + a\right) \cdot c\right) \cdot i\\
      \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+88}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-163}:\\
      \;\;\;\;\left(t \cdot z\right) \cdot 2\\
      
      \mathbf{elif}\;t\_2 \leq 1000000000:\\
      \;\;\;\;\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 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1.99999999999999992e88 or 1e9 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

        1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

          if -1.99999999999999992e88 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.99999999999999977e-163

          1. Initial program 96.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 t around inf

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

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

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

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

          if -4.99999999999999977e-163 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e9

          1. Initial program 98.7%

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

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

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

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

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

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

        Alternative 5: 87.9% accurate, 0.5× speedup?

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

          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 x around inf

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

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

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

            \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
          6. Taylor expanded in t around 0

            \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - 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(x \cdot y + \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(x \cdot y + \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) + x \cdot y\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)} + x \cdot y\right) \]
            5. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

          if -5.0000000000000001e132 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.99999999999999993e118

          1. Initial program 97.5%

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

            \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(a \cdot \left(c \cdot i\right)\right) + \left(t \cdot z + x \cdot y\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)} + \left(t \cdot z + x \cdot y\right)\right) \]
            2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 82.2% accurate, 0.5× speedup?

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

          1. Initial program 88.6%

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

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

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

              \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \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. *-commutativeN/A

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

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

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

          if -1e-107 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999996e-24

          1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

        Alternative 7: 83.5% accurate, 0.5× speedup?

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

          1. Initial program 87.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 t around 0

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

              \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \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) + x \cdot y\right)} \]
            3. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.00000000000000001e41 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1e19

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

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

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

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

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

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

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

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

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

        Alternative 8: 81.8% accurate, 0.6× speedup?

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

          1. Initial program 84.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 \color{blue}{\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2} \]
            2. lower-*.f64N/A

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

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

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

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

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

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

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

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

          if -4.99999999999999962e125 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999993e111

          1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

        Alternative 9: 73.1% accurate, 0.6× speedup?

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

          1. Initial program 88.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 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 \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \]
            2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

            if -5.0000000000000001e132 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999996e297

            1. Initial program 97.8%

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

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

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

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

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

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

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

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

            if 9.9999999999999996e297 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

            1. Initial program 76.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 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 \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \]
              2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 73.1% accurate, 0.6× speedup?

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

                1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

                  if -5.0000000000000001e132 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999996e297

                  1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

                Alternative 11: 83.6% accurate, 0.6× speedup?

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

                  1. Initial program 86.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 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. associate-*r*N/A

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

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

                      \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \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. *-commutativeN/A

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

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

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

                  if -2e22 < (*.f64 (+.f64 a (*.f64 b c)) c) < 4.9999999999999997e111

                  1. Initial program 95.9%

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

                    \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(a \cdot \left(c \cdot i\right)\right) + \left(t \cdot z + x \cdot y\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)} + \left(t \cdot z + x \cdot y\right)\right) \]
                    2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

                  if 4.9999999999999997e111 < (*.f64 (+.f64 a (*.f64 b c)) c)

                  1. Initial program 87.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 t around 0

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

                      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \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) + x \cdot y\right)} \]
                    3. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 82.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-*.f6454.4

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

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

                  if -2e153 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999996e297

                  1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

                Alternative 13: 69.2% accurate, 0.7× speedup?

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

                  1. Initial program 81.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 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 \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \]
                    2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                      if -1.00000000000000007e246 < (*.f64 (+.f64 a (*.f64 b c)) c) < 9.9999999999999998e119

                      1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

                      1. Initial program 87.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 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 \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \]
                        2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                      Alternative 14: 84.5% accurate, 0.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\left(-c\right) \cdot b, i \cdot c, \mathsf{fma}\left(y, x, t \cdot z\right)\right) \cdot 2\\ \mathbf{if}\;b \leq -1.7 \cdot 10^{-58}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.06 \cdot 10^{-66}:\\ \;\;\;\;\mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \left(a \cdot i\right) \cdot \left(-c\right)\right)\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* (fma (* (- c) b) (* i c) (fma y x (* t z))) 2.0)))
                         (if (<= b -1.7e-58)
                           t_1
                           (if (<= b 1.06e-66) (* (fma z t (fma y x (* (* a i) (- c)))) 2.0) t_1))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = fma((-c * b), (i * c), fma(y, x, (t * z))) * 2.0;
                      	double tmp;
                      	if (b <= -1.7e-58) {
                      		tmp = t_1;
                      	} else if (b <= 1.06e-66) {
                      		tmp = fma(z, t, fma(y, x, ((a * i) * -c))) * 2.0;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(fma(Float64(Float64(-c) * b), Float64(i * c), fma(y, x, Float64(t * z))) * 2.0)
                      	tmp = 0.0
                      	if (b <= -1.7e-58)
                      		tmp = t_1;
                      	elseif (b <= 1.06e-66)
                      		tmp = Float64(fma(z, t, fma(y, x, Float64(Float64(a * i) * Float64(-c)))) * 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[((-c) * b), $MachinePrecision] * N[(i * c), $MachinePrecision] + N[(y * x + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[b, -1.7e-58], t$95$1, If[LessEqual[b, 1.06e-66], N[(N[(z * t + N[(y * x + N[(N[(a * i), $MachinePrecision] * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \mathsf{fma}\left(\left(-c\right) \cdot b, i \cdot c, \mathsf{fma}\left(y, x, t \cdot z\right)\right) \cdot 2\\
                      \mathbf{if}\;b \leq -1.7 \cdot 10^{-58}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;b \leq 1.06 \cdot 10^{-66}:\\
                      \;\;\;\;\mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \left(a \cdot i\right) \cdot \left(-c\right)\right)\right) \cdot 2\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if b < -1.69999999999999987e-58 or 1.05999999999999994e-66 < b

                        1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -1.69999999999999987e-58 < b < 1.05999999999999994e-66

                        1. Initial program 91.7%

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

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

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

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

                            \[\leadsto 2 \cdot \left(\color{blue}{z \cdot t} + \left(x \cdot y - \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(z, t, x \cdot y - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)} \]
                          7. sub-negN/A

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

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

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

                            \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \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(z, t, \mathsf{fma}\left(y, x, \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(z, t, \mathsf{fma}\left(y, x, \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(z, t, \mathsf{fma}\left(y, x, \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(z, t, \mathsf{fma}\left(y, x, \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.2%

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

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

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

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

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

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

                      Alternative 15: 44.6% accurate, 1.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t \cdot z\right) \cdot 2\\ \mathbf{if}\;t \cdot z \leq -2.5 \cdot 10^{+37}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 2.3 \cdot 10^{+67}:\\ \;\;\;\;\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 (* (* t z) 2.0)))
                         (if (<= (* t z) -2.5e+37)
                           t_1
                           (if (<= (* t z) 2.3e+67) (* (* 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 = (t * z) * 2.0;
                      	double tmp;
                      	if ((t * z) <= -2.5e+37) {
                      		tmp = t_1;
                      	} else if ((t * z) <= 2.3e+67) {
                      		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 = (t * z) * 2.0d0
                          if ((t * z) <= (-2.5d+37)) then
                              tmp = t_1
                          else if ((t * z) <= 2.3d+67) 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 = (t * z) * 2.0;
                      	double tmp;
                      	if ((t * z) <= -2.5e+37) {
                      		tmp = t_1;
                      	} else if ((t * z) <= 2.3e+67) {
                      		tmp = (x * y) * 2.0;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b, c, i):
                      	t_1 = (t * z) * 2.0
                      	tmp = 0
                      	if (t * z) <= -2.5e+37:
                      		tmp = t_1
                      	elif (t * z) <= 2.3e+67:
                      		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(t * z) * 2.0)
                      	tmp = 0.0
                      	if (Float64(t * z) <= -2.5e+37)
                      		tmp = t_1;
                      	elseif (Float64(t * z) <= 2.3e+67)
                      		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 = (t * z) * 2.0;
                      	tmp = 0.0;
                      	if ((t * z) <= -2.5e+37)
                      		tmp = t_1;
                      	elseif ((t * z) <= 2.3e+67)
                      		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[(t * z), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -2.5e+37], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 2.3e+67], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \left(t \cdot z\right) \cdot 2\\
                      \mathbf{if}\;t \cdot z \leq -2.5 \cdot 10^{+37}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;t \cdot z \leq 2.3 \cdot 10^{+67}:\\
                      \;\;\;\;\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) < -2.49999999999999994e37 or 2.2999999999999999e67 < (*.f64 z t)

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

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

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

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

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

                        if -2.49999999999999994e37 < (*.f64 z t) < 2.2999999999999999e67

                        1. Initial program 94.0%

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

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

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

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

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

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

                      Alternative 16: 29.6% accurate, 3.6× speedup?

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

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

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

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

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

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

                      Developer Target 1: 94.1% 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 2024248 
                      (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))))