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

Percentage Accurate: 90.0% → 96.2%
Time: 10.3s
Alternatives: 15
Speedup: 0.7×

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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    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.0% 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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 96.2% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 (*.f64 x y) (*.f64 z t))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.5% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+168} \lor \neg \left(t\_1 \leq 10^{+261}\right):\\
\;\;\;\;\left(-2 \cdot \mathsf{fma}\left(b, c, a\right)\right) \cdot \left(i \cdot c\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y, z \cdot t - \left(i \cdot c\right) \cdot a\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.99999999999999967e168 or 9.9999999999999993e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(i \cdot c\right)} \cdot a\right) \]
        4. lower-*.f6491.1

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

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

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

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

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

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

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

    Alternative 4: 82.6% accurate, 0.6× speedup?

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

      1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 96.5%

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

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

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

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

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

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

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

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

      Alternative 5: 81.7% accurate, 0.6× speedup?

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

        1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 97.2%

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

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

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

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

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

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

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

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

      Alternative 6: 73.0% accurate, 0.6× speedup?

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

        1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

        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
        3. Taylor expanded in c around 0

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

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

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

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

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

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

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

      Alternative 7: 73.6% accurate, 0.6× speedup?

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

        1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          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
          3. Taylor expanded in c around 0

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

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

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

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

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

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

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

        Alternative 8: 73.6% accurate, 0.6× speedup?

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

          1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              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
              3. Taylor expanded in c around 0

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

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

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

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

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

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

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

              1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-2 \cdot \left(\left(i \cdot c\right) \cdot b\right)\right) \cdot c \]
              8. Recombined 3 regimes into one program.
              9. Add Preprocessing

              Alternative 9: 94.0% accurate, 0.7× speedup?

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

                1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 77.2% accurate, 0.8× speedup?

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

                  1. Initial program 86.5%

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

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

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

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

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

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

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

                  if -5.00000000000000027e31 < (*.f64 z t) < 9.9999999999999996e30

                  1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 11: 87.3% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -2.25e-120 < b < 7e-92

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 12: 86.9% accurate, 0.9× speedup?

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

                  1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -2.25e-120 < b < 7e-92

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

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

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

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

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

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

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

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

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

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

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

                  if 7e-92 < b

                  1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 13: 60.1% accurate, 1.0× speedup?

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

                  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-*.f6446.2

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

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

                  if -1.00000000000000005e236 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                  1. Initial program 89.7%

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

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

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

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

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

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

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

                Alternative 14: 45.2% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+63} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+159}\right):\\ \;\;\;\;t \cdot \left(z + z\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (if (or (<= (* z t) -2e+63) (not (<= (* z t) 2e+159)))
                   (* t (+ z z))
                   (* 2.0 (* y x))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double tmp;
                	if (((z * t) <= -2e+63) || !((z * t) <= 2e+159)) {
                		tmp = t * (z + z);
                	} else {
                		tmp = 2.0 * (y * x);
                	}
                	return tmp;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z, t, a, b, c, i)
                use fmin_fmax_functions
                    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 (((z * t) <= (-2d+63)) .or. (.not. ((z * t) <= 2d+159))) then
                        tmp = t * (z + z)
                    else
                        tmp = 2.0d0 * (y * x)
                    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 (((z * t) <= -2e+63) || !((z * t) <= 2e+159)) {
                		tmp = t * (z + z);
                	} else {
                		tmp = 2.0 * (y * x);
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	tmp = 0
                	if ((z * t) <= -2e+63) or not ((z * t) <= 2e+159):
                		tmp = t * (z + z)
                	else:
                		tmp = 2.0 * (y * x)
                	return tmp
                
                function code(x, y, z, t, a, b, c, i)
                	tmp = 0.0
                	if ((Float64(z * t) <= -2e+63) || !(Float64(z * t) <= 2e+159))
                		tmp = Float64(t * Float64(z + z));
                	else
                		tmp = Float64(2.0 * Float64(y * x));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c, i)
                	tmp = 0.0;
                	if (((z * t) <= -2e+63) || ~(((z * t) <= 2e+159)))
                		tmp = t * (z + z);
                	else
                		tmp = 2.0 * (y * x);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+63], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e+159]], $MachinePrecision]], N[(t * N[(z + z), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+63} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+159}\right):\\
                \;\;\;\;t \cdot \left(z + z\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;2 \cdot \left(y \cdot x\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 z t) < -2.00000000000000012e63 or 1.9999999999999999e159 < (*.f64 z t)

                  1. Initial program 85.2%

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

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

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

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

                    \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
                  6. Step-by-step derivation
                    1. Applied rewrites73.0%

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

                    if -2.00000000000000012e63 < (*.f64 z t) < 1.9999999999999999e159

                    1. Initial program 89.3%

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

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

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

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

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

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

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

                  Alternative 15: 29.6% accurate, 4.4× speedup?

                  \[\begin{array}{l} \\ t \cdot \left(z + z\right) \end{array} \]
                  (FPCore (x y z t a b c i) :precision binary64 (* t (+ z z)))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	return t * (z + z);
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b, c, i)
                  use fmin_fmax_functions
                      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 = t * (z + z)
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	return t * (z + z);
                  }
                  
                  def code(x, y, z, t, a, b, c, i):
                  	return t * (z + z)
                  
                  function code(x, y, z, t, a, b, c, i)
                  	return Float64(t * Float64(z + z))
                  end
                  
                  function tmp = code(x, y, z, t, a, b, c, i)
                  	tmp = t * (z + z);
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(t * N[(z + z), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  t \cdot \left(z + z\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 87.8%

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

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

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

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

                    \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
                  6. Step-by-step derivation
                    1. Applied rewrites31.4%

                      \[\leadsto t \cdot \color{blue}{\left(z + z\right)} \]
                    2. 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)));
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b, c, i)
                    use fmin_fmax_functions
                        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 2024352 
                    (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))))