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

Percentage Accurate: 90.4% → 95.5%
Time: 13.7s
Alternatives: 15
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 90.4% accurate, 1.0× speedup?

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

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

Alternative 1: 95.5% accurate, 0.5× speedup?

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

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

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


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

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

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

    1. Initial program 79.0%

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

        \[\leadsto \color{blue}{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. 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)} \]
      3. 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) \]
      4. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+40} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+70}\right):\\
\;\;\;\;\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right) \cdot 2\\

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


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

    1. Initial program 79.2%

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

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

        \[\leadsto \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.f6494.2

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

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

    if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2.00000000000000006e40 or 2.00000000000000015e70 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 88.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 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(\left(c \cdot i\right) \cdot \color{blue}{\left(b \cdot c + a\right)}\right)\right) + x \cdot y\right) \]
      5. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(\mathsf{neg}\left(b \cdot \left({c}^{2} \cdot i\right)\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(c \cdot i\right)\right)\right)\right)} + x \cdot y\right) \]
    5. Applied rewrites82.4%

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

    if -2.00000000000000006e40 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000015e70

    1. Initial program 99.9%

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

        \[\leadsto \color{blue}{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. 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)} \]
      3. 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) \]
      4. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 94.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+288}:\\
\;\;\;\;2 \cdot \left(\left(t \cdot z + y \cdot x\right) - t\_2\right)\\

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


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

    1. Initial program 79.2%

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

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

        \[\leadsto \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.f6494.2

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

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

    if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2e288

    1. Initial program 99.8%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Add Preprocessing

    if 2e288 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 77.8%

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

        \[\leadsto \color{blue}{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. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \cdot 2} \]
      3. lower-*.f6477.8

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

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

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

Alternative 4: 92.7% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 96.0%

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

        \[\leadsto \color{blue}{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. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \cdot 2} \]
      3. lower-*.f6496.0

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

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

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

    1. Initial program 0.0%

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

        \[\leadsto \left(\left(\color{blue}{\left(c \cdot c\right)} \cdot i\right) \cdot -2\right) \cdot b \]
    5. Applied rewrites69.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 rewrites69.5%

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

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

    Alternative 5: 81.8% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+159}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(c, b, a\right) \cdot c\right) \cdot \left(-i\right)\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot y, x, \left(t \cdot z\right) \cdot 2\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (* i (* (+ (* c b) a) c))))
       (if (or (<= t_1 -4e+84) (not (<= t_1 5e+159)))
         (* (* (* (fma c b a) c) (- i)) 2.0)
         (fma (* 2.0 y) x (* (* t z) 2.0)))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = i * (((c * b) + a) * c);
    	double tmp;
    	if ((t_1 <= -4e+84) || !(t_1 <= 5e+159)) {
    		tmp = ((fma(c, b, a) * c) * -i) * 2.0;
    	} else {
    		tmp = fma((2.0 * y), x, ((t * z) * 2.0));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
    	tmp = 0.0
    	if ((t_1 <= -4e+84) || !(t_1 <= 5e+159))
    		tmp = Float64(Float64(Float64(fma(c, b, a) * c) * Float64(-i)) * 2.0);
    	else
    		tmp = fma(Float64(2.0 * y), x, Float64(Float64(t * z) * 2.0));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(N[(N[(c * b), $MachinePrecision] + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+84], N[Not[LessEqual[t$95$1, 5e+159]], $MachinePrecision]], N[(N[(N[(N[(c * b + a), $MachinePrecision] * c), $MachinePrecision] * (-i)), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(2.0 * y), $MachinePrecision] * x + N[(N[(t * z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
    \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+159}\right):\\
    \;\;\;\;\left(\left(\mathsf{fma}\left(c, b, a\right) \cdot c\right) \cdot \left(-i\right)\right) \cdot 2\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(2 \cdot y, x, \left(t \cdot z\right) \cdot 2\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.00000000000000023e84 or 5.00000000000000003e159 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.00000000000000023e84 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.00000000000000003e159

      1. Initial program 99.9%

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

          \[\leadsto \color{blue}{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. 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)} \]
        3. 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) \]
        4. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 82.0% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+168}\right):\\ \;\;\;\;-2 \cdot \left(\left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot y, x, \left(t \cdot z\right) \cdot 2\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (* i (* (+ (* c b) a) c))))
       (if (or (<= t_1 -4e+84) (not (<= t_1 5e+168)))
         (* -2.0 (* (* (fma c b a) i) c))
         (fma (* 2.0 y) x (* (* t z) 2.0)))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = i * (((c * b) + a) * c);
    	double tmp;
    	if ((t_1 <= -4e+84) || !(t_1 <= 5e+168)) {
    		tmp = -2.0 * ((fma(c, b, a) * i) * c);
    	} else {
    		tmp = fma((2.0 * y), x, ((t * z) * 2.0));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
    	tmp = 0.0
    	if ((t_1 <= -4e+84) || !(t_1 <= 5e+168))
    		tmp = Float64(-2.0 * Float64(Float64(fma(c, b, a) * i) * c));
    	else
    		tmp = fma(Float64(2.0 * y), x, Float64(Float64(t * z) * 2.0));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(N[(N[(c * b), $MachinePrecision] + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+84], N[Not[LessEqual[t$95$1, 5e+168]], $MachinePrecision]], N[(-2.0 * N[(N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * y), $MachinePrecision] * x + N[(N[(t * z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
    \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+168}\right):\\
    \;\;\;\;-2 \cdot \left(\left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot c\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(2 \cdot y, x, \left(t \cdot z\right) \cdot 2\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.00000000000000023e84 or 4.99999999999999967e168 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

      1. Initial program 82.6%

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

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

          \[\leadsto \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.f6482.2

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

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

      if -4.00000000000000023e84 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.99999999999999967e168

      1. Initial program 99.9%

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

          \[\leadsto \color{blue}{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. 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)} \]
        3. 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) \]
        4. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 82.0% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+168}\right):\\ \;\;\;\;-2 \cdot \left(\left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, t \cdot z\right) \cdot 2\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (* i (* (+ (* c b) a) c))))
       (if (or (<= t_1 -4e+84) (not (<= t_1 5e+168)))
         (* -2.0 (* (* (fma c b a) i) c))
         (* (fma y x (* t z)) 2.0))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = i * (((c * b) + a) * c);
    	double tmp;
    	if ((t_1 <= -4e+84) || !(t_1 <= 5e+168)) {
    		tmp = -2.0 * ((fma(c, b, a) * i) * c);
    	} else {
    		tmp = fma(y, x, (t * z)) * 2.0;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
    	tmp = 0.0
    	if ((t_1 <= -4e+84) || !(t_1 <= 5e+168))
    		tmp = Float64(-2.0 * Float64(Float64(fma(c, b, a) * i) * c));
    	else
    		tmp = Float64(fma(y, x, Float64(t * z)) * 2.0);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(N[(N[(c * b), $MachinePrecision] + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+84], N[Not[LessEqual[t$95$1, 5e+168]], $MachinePrecision]], N[(-2.0 * N[(N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], N[(N[(y * x + N[(t * z), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
    \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+168}\right):\\
    \;\;\;\;-2 \cdot \left(\left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot c\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, x, t \cdot z\right) \cdot 2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.00000000000000023e84 or 4.99999999999999967e168 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

      1. Initial program 82.6%

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

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

          \[\leadsto \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.f6482.2

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

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

      if -4.00000000000000023e84 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.99999999999999967e168

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    Alternative 8: 71.9% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+168}\right):\\ \;\;\;\;\left(\left(-2 \cdot b\right) \cdot \left(i \cdot c\right)\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, t \cdot z\right) \cdot 2\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (* i (* (+ (* c b) a) c))))
       (if (or (<= t_1 -4e+84) (not (<= t_1 5e+168)))
         (* (* (* -2.0 b) (* i c)) c)
         (* (fma y x (* t z)) 2.0))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = i * (((c * b) + a) * c);
    	double tmp;
    	if ((t_1 <= -4e+84) || !(t_1 <= 5e+168)) {
    		tmp = ((-2.0 * b) * (i * c)) * c;
    	} else {
    		tmp = fma(y, x, (t * z)) * 2.0;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
    	tmp = 0.0
    	if ((t_1 <= -4e+84) || !(t_1 <= 5e+168))
    		tmp = Float64(Float64(Float64(-2.0 * b) * Float64(i * c)) * c);
    	else
    		tmp = Float64(fma(y, x, Float64(t * z)) * 2.0);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(N[(N[(c * b), $MachinePrecision] + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+84], N[Not[LessEqual[t$95$1, 5e+168]], $MachinePrecision]], N[(N[(N[(-2.0 * b), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], N[(N[(y * x + N[(t * z), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
    \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+168}\right):\\
    \;\;\;\;\left(\left(-2 \cdot b\right) \cdot \left(i \cdot c\right)\right) \cdot c\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, x, t \cdot z\right) \cdot 2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.00000000000000023e84 or 4.99999999999999967e168 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

      1. Initial program 82.6%

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

          \[\leadsto \left(\left(\color{blue}{\left(c \cdot c\right)} \cdot i\right) \cdot -2\right) \cdot b \]
      5. Applied rewrites67.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 rewrites66.5%

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

        if -4.00000000000000023e84 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.99999999999999967e168

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

      Alternative 9: 71.5% accurate, 0.6× speedup?

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

        1. Initial program 84.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-*.f6469.1

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

          \[\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 rewrites67.8%

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

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

            if -4.00000000000000023e84 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.99999999999999967e168

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

            if 4.99999999999999967e168 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

            1. Initial program 80.3%

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

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

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

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

          Alternative 10: 71.2% accurate, 0.6× speedup?

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

            1. Initial program 84.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-*.f6469.1

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

              \[\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 rewrites67.8%

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

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

                if -4.00000000000000023e84 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.99999999999999967e168

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

                if 4.99999999999999967e168 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                1. Initial program 80.3%

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

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

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

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

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

                Alternative 11: 71.7% accurate, 0.6× speedup?

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

                  1. Initial program 84.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-*.f6469.1

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

                    \[\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 rewrites67.8%

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

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

                      if -4.00000000000000023e84 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.99999999999999967e168

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

                      if 4.99999999999999967e168 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                      1. Initial program 80.3%

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

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

                        \[\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 rewrites61.8%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;i \cdot \left(\left(c \cdot b + a\right) \cdot c\right) \leq -4 \cdot 10^{+84}:\\ \;\;\;\;\left(\left(-2 \cdot i\right) \cdot c\right) \cdot \left(c \cdot b\right)\\ \mathbf{elif}\;i \cdot \left(\left(c \cdot b + a\right) \cdot c\right) \leq 5 \cdot 10^{+168}:\\ \;\;\;\;\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 12: 62.5% accurate, 0.6× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+293}\right):\\ \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, t \cdot z\right) \cdot 2\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* i (* (+ (* c b) a) c))))
                         (if (or (<= t_1 -4e+84) (not (<= t_1 2e+293)))
                           (* (* (* i c) a) -2.0)
                           (* (fma y x (* t z)) 2.0))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = i * (((c * b) + a) * c);
                      	double tmp;
                      	if ((t_1 <= -4e+84) || !(t_1 <= 2e+293)) {
                      		tmp = ((i * c) * a) * -2.0;
                      	} else {
                      		tmp = fma(y, x, (t * z)) * 2.0;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(i * Float64(Float64(Float64(c * b) + a) * c))
                      	tmp = 0.0
                      	if ((t_1 <= -4e+84) || !(t_1 <= 2e+293))
                      		tmp = Float64(Float64(Float64(i * c) * a) * -2.0);
                      	else
                      		tmp = Float64(fma(y, x, Float64(t * z)) * 2.0);
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(N[(N[(c * b), $MachinePrecision] + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+84], N[Not[LessEqual[t$95$1, 2e+293]], $MachinePrecision]], N[(N[(N[(i * c), $MachinePrecision] * a), $MachinePrecision] * -2.0), $MachinePrecision], N[(N[(y * x + N[(t * z), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := i \cdot \left(\left(c \cdot b + a\right) \cdot c\right)\\
                      \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+84} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+293}\right):\\
                      \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(y, x, t \cdot z\right) \cdot 2\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.00000000000000023e84 or 1.9999999999999998e293 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                        1. Initial program 81.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-*.f6443.8

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

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

                        if -4.00000000000000023e84 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.9999999999999998e293

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

                      Alternative 13: 44.6% accurate, 0.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y \cdot x\right) \cdot 2\\ \mathbf{if}\;y \cdot x \leq -5 \cdot 10^{+116}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \cdot x \leq 2 \cdot 10^{+59}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \mathbf{elif}\;y \cdot x \leq 4 \cdot 10^{+109}:\\ \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* (* y x) 2.0)))
                         (if (<= (* y x) -5e+116)
                           t_1
                           (if (<= (* y x) 2e+59)
                             (* (* t z) 2.0)
                             (if (<= (* y x) 4e+109) (* (* (* i c) a) -2.0) t_1)))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = (y * x) * 2.0;
                      	double tmp;
                      	if ((y * x) <= -5e+116) {
                      		tmp = t_1;
                      	} else if ((y * x) <= 2e+59) {
                      		tmp = (t * z) * 2.0;
                      	} else if ((y * x) <= 4e+109) {
                      		tmp = ((i * c) * a) * -2.0;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(x, y, z, t, a, b, c, i)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8), intent (in) :: c
                          real(8), intent (in) :: i
                          real(8) :: t_1
                          real(8) :: tmp
                          t_1 = (y * x) * 2.0d0
                          if ((y * x) <= (-5d+116)) then
                              tmp = t_1
                          else if ((y * x) <= 2d+59) then
                              tmp = (t * z) * 2.0d0
                          else if ((y * x) <= 4d+109) then
                              tmp = ((i * c) * a) * (-2.0d0)
                          else
                              tmp = t_1
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = (y * x) * 2.0;
                      	double tmp;
                      	if ((y * x) <= -5e+116) {
                      		tmp = t_1;
                      	} else if ((y * x) <= 2e+59) {
                      		tmp = (t * z) * 2.0;
                      	} else if ((y * x) <= 4e+109) {
                      		tmp = ((i * c) * a) * -2.0;
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b, c, i):
                      	t_1 = (y * x) * 2.0
                      	tmp = 0
                      	if (y * x) <= -5e+116:
                      		tmp = t_1
                      	elif (y * x) <= 2e+59:
                      		tmp = (t * z) * 2.0
                      	elif (y * x) <= 4e+109:
                      		tmp = ((i * c) * a) * -2.0
                      	else:
                      		tmp = t_1
                      	return tmp
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(Float64(y * x) * 2.0)
                      	tmp = 0.0
                      	if (Float64(y * x) <= -5e+116)
                      		tmp = t_1;
                      	elseif (Float64(y * x) <= 2e+59)
                      		tmp = Float64(Float64(t * z) * 2.0);
                      	elseif (Float64(y * x) <= 4e+109)
                      		tmp = Float64(Float64(Float64(i * c) * a) * -2.0);
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                      	t_1 = (y * x) * 2.0;
                      	tmp = 0.0;
                      	if ((y * x) <= -5e+116)
                      		tmp = t_1;
                      	elseif ((y * x) <= 2e+59)
                      		tmp = (t * z) * 2.0;
                      	elseif ((y * x) <= 4e+109)
                      		tmp = ((i * c) * a) * -2.0;
                      	else
                      		tmp = t_1;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(y * x), $MachinePrecision], -5e+116], t$95$1, If[LessEqual[N[(y * x), $MachinePrecision], 2e+59], N[(N[(t * z), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[N[(y * x), $MachinePrecision], 4e+109], N[(N[(N[(i * c), $MachinePrecision] * a), $MachinePrecision] * -2.0), $MachinePrecision], t$95$1]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \left(y \cdot x\right) \cdot 2\\
                      \mathbf{if}\;y \cdot x \leq -5 \cdot 10^{+116}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;y \cdot x \leq 2 \cdot 10^{+59}:\\
                      \;\;\;\;\left(t \cdot z\right) \cdot 2\\
                      
                      \mathbf{elif}\;y \cdot x \leq 4 \cdot 10^{+109}:\\
                      \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if (*.f64 x y) < -5.00000000000000025e116 or 3.99999999999999993e109 < (*.f64 x y)

                        1. Initial program 87.2%

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

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

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

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

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

                        if -5.00000000000000025e116 < (*.f64 x y) < 1.99999999999999994e59

                        1. Initial program 92.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 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-*.f6439.7

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

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

                        if 1.99999999999999994e59 < (*.f64 x y) < 3.99999999999999993e109

                        1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

                      Alternative 14: 44.6% accurate, 1.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \cdot x \leq -5 \cdot 10^{+116} \lor \neg \left(y \cdot x \leq 10^{+60}\right):\\ \;\;\;\;\left(y \cdot x\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot z\right) \cdot 2\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (if (or (<= (* y x) -5e+116) (not (<= (* y x) 1e+60)))
                         (* (* y x) 2.0)
                         (* (* t z) 2.0)))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double tmp;
                      	if (((y * x) <= -5e+116) || !((y * x) <= 1e+60)) {
                      		tmp = (y * x) * 2.0;
                      	} else {
                      		tmp = (t * z) * 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) :: tmp
                          if (((y * x) <= (-5d+116)) .or. (.not. ((y * x) <= 1d+60))) then
                              tmp = (y * x) * 2.0d0
                          else
                              tmp = (t * z) * 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 tmp;
                      	if (((y * x) <= -5e+116) || !((y * x) <= 1e+60)) {
                      		tmp = (y * x) * 2.0;
                      	} else {
                      		tmp = (t * z) * 2.0;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b, c, i):
                      	tmp = 0
                      	if ((y * x) <= -5e+116) or not ((y * x) <= 1e+60):
                      		tmp = (y * x) * 2.0
                      	else:
                      		tmp = (t * z) * 2.0
                      	return tmp
                      
                      function code(x, y, z, t, a, b, c, i)
                      	tmp = 0.0
                      	if ((Float64(y * x) <= -5e+116) || !(Float64(y * x) <= 1e+60))
                      		tmp = Float64(Float64(y * x) * 2.0);
                      	else
                      		tmp = Float64(Float64(t * z) * 2.0);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                      	tmp = 0.0;
                      	if (((y * x) <= -5e+116) || ~(((y * x) <= 1e+60)))
                      		tmp = (y * x) * 2.0;
                      	else
                      		tmp = (t * z) * 2.0;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(y * x), $MachinePrecision], -5e+116], N[Not[LessEqual[N[(y * x), $MachinePrecision], 1e+60]], $MachinePrecision]], N[(N[(y * x), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(t * z), $MachinePrecision] * 2.0), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;y \cdot x \leq -5 \cdot 10^{+116} \lor \neg \left(y \cdot x \leq 10^{+60}\right):\\
                      \;\;\;\;\left(y \cdot x\right) \cdot 2\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(t \cdot z\right) \cdot 2\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (*.f64 x y) < -5.00000000000000025e116 or 9.9999999999999995e59 < (*.f64 x y)

                        1. Initial program 89.0%

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

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

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

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

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

                        if -5.00000000000000025e116 < (*.f64 x y) < 9.9999999999999995e59

                        1. Initial program 92.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 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-*.f6439.4

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

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

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

                      Alternative 15: 29.9% accurate, 3.6× speedup?

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

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

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

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

                      Developer Target 1: 94.3% 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 2024271 
                      (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))))