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

Percentage Accurate: 90.2% → 93.5%
Time: 9.3s
Alternatives: 17
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
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 17 alternatives:

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

Initial Program: 90.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
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: 93.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -6 \cdot 10^{-104}:\\
\;\;\;\;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}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot \mathsf{fma}\left(c, b, a\right), -c, \mathsf{fma}\left(t, z, y \cdot x\right)\right) \cdot 2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -6.0000000000000005e-104

    1. Initial program 94.7%

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

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

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

        \[\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-*.f6499.3

        \[\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-*.f6499.3

        \[\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.f6499.4

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

      \[\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 -6.0000000000000005e-104 < i

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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


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

    1. Initial program 77.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-*.f6492.3

        \[\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.f6492.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-*.f6492.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 rewrites92.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 i around inf

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(\left(t \cdot z + x \cdot y\right) - a \cdot \left(c \cdot i\right)\right)} \]
      4. Step-by-step derivation
        1. Applied rewrites95.9%

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

          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, c \cdot a, x \cdot y\right) \]
        3. Step-by-step derivation
          1. Applied rewrites83.7%

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

          if -2.0000000000000001e57 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000016e91

          1. Initial program 99.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-*.f6498.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.f6498.5

              \[\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.5

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

            \[\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 c around 0

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
          6. Step-by-step derivation
            1. Applied rewrites91.9%

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

            if 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

            1. Initial program 86.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. Applied rewrites86.6%

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

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

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

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

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

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

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

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

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

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

                  if 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.99999999999999927e209

                  1. Initial program 99.7%

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot \left(i + \frac{b \cdot \left(c \cdot i\right)}{a}\right)}, -c, \mathsf{fma}\left(t, z, y \cdot x\right)\right) \cdot 2 \]
                  6. Step-by-step derivation
                    1. Applied rewrites78.4%

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

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

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

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

                        if 9.99999999999999927e209 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                        1. Initial program 83.0%

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

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

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

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

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

                          Alternative 4: 72.6% accurate, 0.4× speedup?

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

                            1. Initial program 80.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. Applied rewrites71.8%

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

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

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

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

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

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

                                  if 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.99999999999999927e209

                                  1. Initial program 99.7%

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot \left(i + \frac{b \cdot \left(c \cdot i\right)}{a}\right)}, -c, \mathsf{fma}\left(t, z, y \cdot x\right)\right) \cdot 2 \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites78.4%

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

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

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

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

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

                                      Alternative 5: 73.2% accurate, 0.4× speedup?

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

                                        1. Initial program 80.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. Applied rewrites71.8%

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

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

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

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

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

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

                                              if 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.99999999999999927e209

                                              1. Initial program 99.7%

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot \left(i + \frac{b \cdot \left(c \cdot i\right)}{a}\right)}, -c, \mathsf{fma}\left(t, z, y \cdot x\right)\right) \cdot 2 \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites78.4%

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

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

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

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

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

                                                  Alternative 6: 40.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^{+49}:\\ \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-132}:\\ \;\;\;\;2 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+91}:\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot c\right) \cdot \left(a \cdot i\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 (<= t_1 -5e+49)
                                                       (* (* (* i c) a) -2.0)
                                                       (if (<= t_1 -5e-132)
                                                         (* 2.0 (* t z))
                                                         (if (<= t_1 2e+91) (* 2.0 (* y x)) (* (* -2.0 c) (* a i)))))))
                                                  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+49) {
                                                  		tmp = ((i * c) * a) * -2.0;
                                                  	} else if (t_1 <= -5e-132) {
                                                  		tmp = 2.0 * (t * z);
                                                  	} else if (t_1 <= 2e+91) {
                                                  		tmp = 2.0 * (y * x);
                                                  	} else {
                                                  		tmp = (-2.0 * c) * (a * i);
                                                  	}
                                                  	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) :: t_1
                                                      real(8) :: tmp
                                                      t_1 = ((a + (b * c)) * c) * i
                                                      if (t_1 <= (-5d+49)) then
                                                          tmp = ((i * c) * a) * (-2.0d0)
                                                      else if (t_1 <= (-5d-132)) then
                                                          tmp = 2.0d0 * (t * z)
                                                      else if (t_1 <= 2d+91) then
                                                          tmp = 2.0d0 * (y * x)
                                                      else
                                                          tmp = ((-2.0d0) * c) * (a * i)
                                                      end if
                                                      code = tmp
                                                  end function
                                                  
                                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                  	double t_1 = ((a + (b * c)) * c) * i;
                                                  	double tmp;
                                                  	if (t_1 <= -5e+49) {
                                                  		tmp = ((i * c) * a) * -2.0;
                                                  	} else if (t_1 <= -5e-132) {
                                                  		tmp = 2.0 * (t * z);
                                                  	} else if (t_1 <= 2e+91) {
                                                  		tmp = 2.0 * (y * x);
                                                  	} else {
                                                  		tmp = (-2.0 * c) * (a * i);
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(x, y, z, t, a, b, c, i):
                                                  	t_1 = ((a + (b * c)) * c) * i
                                                  	tmp = 0
                                                  	if t_1 <= -5e+49:
                                                  		tmp = ((i * c) * a) * -2.0
                                                  	elif t_1 <= -5e-132:
                                                  		tmp = 2.0 * (t * z)
                                                  	elif t_1 <= 2e+91:
                                                  		tmp = 2.0 * (y * x)
                                                  	else:
                                                  		tmp = (-2.0 * c) * (a * i)
                                                  	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+49)
                                                  		tmp = Float64(Float64(Float64(i * c) * a) * -2.0);
                                                  	elseif (t_1 <= -5e-132)
                                                  		tmp = Float64(2.0 * Float64(t * z));
                                                  	elseif (t_1 <= 2e+91)
                                                  		tmp = Float64(2.0 * Float64(y * x));
                                                  	else
                                                  		tmp = Float64(Float64(-2.0 * c) * Float64(a * i));
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                  	t_1 = ((a + (b * c)) * c) * i;
                                                  	tmp = 0.0;
                                                  	if (t_1 <= -5e+49)
                                                  		tmp = ((i * c) * a) * -2.0;
                                                  	elseif (t_1 <= -5e-132)
                                                  		tmp = 2.0 * (t * z);
                                                  	elseif (t_1 <= 2e+91)
                                                  		tmp = 2.0 * (y * x);
                                                  	else
                                                  		tmp = (-2.0 * c) * (a * i);
                                                  	end
                                                  	tmp_2 = 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+49], N[(N[(N[(i * c), $MachinePrecision] * a), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[t$95$1, -5e-132], N[(2.0 * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+91], N[(2.0 * N[(y * x), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * c), $MachinePrecision] * N[(a * i), $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^{+49}:\\
                                                  \;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\
                                                  
                                                  \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-132}:\\
                                                  \;\;\;\;2 \cdot \left(t \cdot z\right)\\
                                                  
                                                  \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+91}:\\
                                                  \;\;\;\;2 \cdot \left(y \cdot x\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\left(-2 \cdot c\right) \cdot \left(a \cdot i\right)\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 4 regimes
                                                  2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000004e49

                                                    1. Initial program 85.9%

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

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

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

                                                      if -5.0000000000000004e49 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.9999999999999999e-132

                                                      1. Initial program 99.9%

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

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

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

                                                        if -4.9999999999999999e-132 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000016e91

                                                        1. Initial program 99.5%

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

                                                          \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y\right)} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites57.5%

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

                                                          if 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                                                          1. Initial program 86.7%

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

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot \left(i + \frac{b \cdot \left(c \cdot i\right)}{a}\right)}, -c, \mathsf{fma}\left(t, z, y \cdot x\right)\right) \cdot 2 \]
                                                          6. Step-by-step derivation
                                                            1. Applied rewrites77.2%

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

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

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

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

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

                                                              Alternative 7: 42.4% accurate, 0.5× speedup?

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

                                                                1. Initial program 86.3%

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

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

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

                                                                  if -5.0000000000000004e49 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.9999999999999999e-132

                                                                  1. Initial program 99.9%

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

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

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

                                                                    if -4.9999999999999999e-132 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000016e91

                                                                    1. Initial program 99.5%

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

                                                                      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y\right)} \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites57.5%

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

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

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

                                                                      1. Initial program 77.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-*.f6492.3

                                                                          \[\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.f6492.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-*.f6492.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 rewrites92.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 i around inf

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

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

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

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

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

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

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

                                                                          1. Initial program 83.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-*.f6489.2

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

                                                                              \[\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-*.f6489.2

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

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

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

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

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

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

                                                                            1. Initial program 77.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-*.f6492.3

                                                                                \[\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.f6492.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-*.f6492.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 rewrites92.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 i around inf

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

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

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

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

                                                                                \[\leadsto 2 \cdot \color{blue}{\left(\left(t \cdot z + x \cdot y\right) - a \cdot \left(c \cdot i\right)\right)} \]
                                                                              4. Step-by-step derivation
                                                                                1. Applied rewrites95.9%

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

                                                                                if 9.99999999999999961e225 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                                                                                1. Initial program 82.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 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. Applied rewrites89.0%

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

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

                                                                                Alternative 10: 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^{+88} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+91}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(b, c, a\right) \cdot c\right) \cdot -2\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(x, y, z \cdot t\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+88) (not (<= t_1 2e+91)))
                                                                                     (* (* (* (fma b c a) c) -2.0) i)
                                                                                     (* 2.0 (fma x y (* z t))))))
                                                                                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+88) || !(t_1 <= 2e+91)) {
                                                                                		tmp = ((fma(b, c, a) * c) * -2.0) * i;
                                                                                	} else {
                                                                                		tmp = 2.0 * fma(x, y, (z * t));
                                                                                	}
                                                                                	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+88) || !(t_1 <= 2e+91))
                                                                                		tmp = Float64(Float64(Float64(fma(b, c, a) * c) * -2.0) * i);
                                                                                	else
                                                                                		tmp = Float64(2.0 * fma(x, y, Float64(z * t)));
                                                                                	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+88], N[Not[LessEqual[t$95$1, 2e+91]], $MachinePrecision]], N[(N[(N[(N[(b * c + a), $MachinePrecision] * c), $MachinePrecision] * -2.0), $MachinePrecision] * i), $MachinePrecision], N[(2.0 * N[(x * y + N[(z * t), $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^{+88} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+91}\right):\\
                                                                                \;\;\;\;\left(\left(\mathsf{fma}\left(b, c, a\right) \cdot c\right) \cdot -2\right) \cdot i\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;2 \cdot \mathsf{fma}\left(x, y, z \cdot t\right)\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 2 regimes
                                                                                2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -4.99999999999999997e88 or 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                                                                                  1. Initial program 85.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-*.f6492.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.f6492.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-*.f6492.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 rewrites92.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 i around inf

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

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

                                                                                    if -4.99999999999999997e88 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000016e91

                                                                                    1. Initial program 99.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-*.f6498.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.f6498.5

                                                                                        \[\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.5

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

                                                                                      \[\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 c around 0

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

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

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

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

                                                                                      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-*.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 i around inf

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

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

                                                                                        if -4.99999999999999997e88 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000016e91

                                                                                        1. Initial program 99.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-*.f6498.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.f6498.5

                                                                                            \[\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.5

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

                                                                                          \[\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 c around 0

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

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

                                                                                          if 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                                                                                          1. Initial program 86.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. Applied rewrites86.6%

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

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

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

                                                                                            1. Initial program 83.9%

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

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

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

                                                                                              if -1e113 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000016e91

                                                                                              1. Initial program 99.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-*.f6498.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.f6498.5

                                                                                                  \[\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.5

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

                                                                                                \[\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 c around 0

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

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

                                                                                                if 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                                                                                                1. Initial program 86.7%

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

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

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

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

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

                                                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot \left(i + \frac{b \cdot \left(c \cdot i\right)}{a}\right)}, -c, \mathsf{fma}\left(t, z, y \cdot x\right)\right) \cdot 2 \]
                                                                                                6. Step-by-step derivation
                                                                                                  1. Applied rewrites77.2%

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

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

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

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

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

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

                                                                                                      1. Initial program 83.9%

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

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

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

                                                                                                        if -1e113 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000016e91

                                                                                                        1. Initial program 99.6%

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

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

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

                                                                                                          if 2.00000000000000016e91 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                                                                                                          1. Initial program 86.7%

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

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

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

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

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

                                                                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot \left(i + \frac{b \cdot \left(c \cdot i\right)}{a}\right)}, -c, \mathsf{fma}\left(t, z, y \cdot x\right)\right) \cdot 2 \]
                                                                                                          6. Step-by-step derivation
                                                                                                            1. Applied rewrites77.2%

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

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

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

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

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

                                                                                                              Alternative 14: 95.1% accurate, 1.0× speedup?

                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -6 \cdot 10^{-104}:\\ \;\;\;\;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(\mathsf{fma}\left(c, b, a\right), i \cdot \left(-c\right), \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 (<= i -6e-104)
                                                                                                                 (* 2.0 (fma y x (- (* t z) (* i (* (fma c b a) 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 (i <= -6e-104) {
                                                                                                              		tmp = 2.0 * fma(y, x, ((t * z) - (i * (fma(c, b, a) * 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 (i <= -6e-104)
                                                                                                              		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(fma(c, b, a), Float64(i * Float64(-c)), fma(t, z, Float64(y * x))));
                                                                                                              	end
                                                                                                              	return tmp
                                                                                                              end
                                                                                                              
                                                                                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -6e-104], 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[(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}\;i \leq -6 \cdot 10^{-104}:\\
                                                                                                              \;\;\;\;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(\mathsf{fma}\left(c, b, a\right), i \cdot \left(-c\right), \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 2 regimes
                                                                                                              2. if i < -6.0000000000000005e-104

                                                                                                                1. Initial program 94.7%

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

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

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

                                                                                                                    \[\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-*.f6499.3

                                                                                                                    \[\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-*.f6499.3

                                                                                                                    \[\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.f6499.4

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

                                                                                                                  \[\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 -6.0000000000000005e-104 < i

                                                                                                                1. Initial program 90.8%

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

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

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

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

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

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

                                                                                                              Alternative 15: 91.9% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

                                                                                                                  \[\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-*.f6494.1

                                                                                                                  \[\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-*.f6494.1

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

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

                                                                                                                \[\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)} \]
                                                                                                              5. Add Preprocessing

                                                                                                              Alternative 16: 43.9% accurate, 1.2× speedup?

                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+54} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{-59}\right):\\ \;\;\;\;2 \cdot \left(t \cdot 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+54) (not (<= (* z t) 2e-59)))
                                                                                                                 (* 2.0 (* t 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+54) || !((z * t) <= 2e-59)) {
                                                                                                              		tmp = 2.0 * (t * 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+54)) .or. (.not. ((z * t) <= 2d-59))) then
                                                                                                                      tmp = 2.0d0 * (t * 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+54) || !((z * t) <= 2e-59)) {
                                                                                                              		tmp = 2.0 * (t * 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+54) or not ((z * t) <= 2e-59):
                                                                                                              		tmp = 2.0 * (t * 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+54) || !(Float64(z * t) <= 2e-59))
                                                                                                              		tmp = Float64(2.0 * Float64(t * 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+54) || ~(((z * t) <= 2e-59)))
                                                                                                              		tmp = 2.0 * (t * 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+54], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e-59]], $MachinePrecision]], N[(2.0 * N[(t * 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^{+54} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{-59}\right):\\
                                                                                                              \;\;\;\;2 \cdot \left(t \cdot 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.0000000000000002e54 or 2.0000000000000001e-59 < (*.f64 z t)

                                                                                                                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 inf

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

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

                                                                                                                  if -2.0000000000000002e54 < (*.f64 z t) < 2.0000000000000001e-59

                                                                                                                  1. Initial program 94.8%

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

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

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

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

                                                                                                                  Alternative 17: 29.0% accurate, 3.6× speedup?

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

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

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

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

                                                                                                                    Developer Target 1: 94.0% 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 2025019 
                                                                                                                    (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))))