Data.Colour.Matrix:determinant from colour-2.3.3, A

Percentage Accurate: 73.4% → 85.8%
Time: 13.2s
Alternatives: 19
Speedup: 0.9×

Specification

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

\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \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 19 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: 73.4% accurate, 1.0× speedup?

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

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

Alternative 1: 85.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 92.9%

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

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

    1. Initial program 0.0%

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

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

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

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

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

    Alternative 2: 79.5% accurate, 0.9× speedup?

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

      1. Initial program 66.9%

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

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

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

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

          \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, -\mathsf{fma}\left(j, c, \frac{\mathsf{fma}\left(-b, c, y \cdot x\right)}{a} \cdot z\right)\right) \]

        if -1.75e81 < a < 1.24999999999999999e88

        1. Initial program 80.2%

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot c - i \cdot y, j, \left(t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)\right)} \]
          4. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot t + \left(\left(x \cdot y\right) \cdot z - \color{blue}{\left(b \cdot c\right) \cdot z}\right)\right) \]
          14. distribute-rgt-out--N/A

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

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

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

        if 1.24999999999999999e88 < a

        1. Initial program 65.7%

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

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

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

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

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

        Alternative 3: 72.2% accurate, 1.0× speedup?

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

          1. Initial program 64.5%

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

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

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

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

              \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, -\mathsf{fma}\left(j, c, \frac{\mathsf{fma}\left(-b, c, y \cdot x\right)}{a} \cdot z\right)\right) \]

            if -6.5e96 < a < 1.40000000000000001e39

            1. Initial program 82.4%

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(-c, z, \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), \frac{x}{b}, i \cdot t\right)\right) \cdot b + \color{blue}{a \cdot \left(c \cdot j\right)} \]
            7. Step-by-step derivation
              1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
            10. Step-by-step derivation
              1. fp-cancel-sub-sign-invN/A

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

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

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

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

                \[\leadsto \left(\color{blue}{\left(-1 \cdot \left(i \cdot j\right)\right) \cdot y} + \left(x \cdot z\right) \cdot y\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - i \cdot t\right) \]
              6. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 4: 71.4% accurate, 1.0× speedup?

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

            1. Initial program 64.5%

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

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

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

              \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + \left(-1 \cdot \frac{b \cdot \left(c \cdot z\right)}{a} + \left(c \cdot j + \frac{x \cdot \left(y \cdot z\right)}{a}\right)\right)\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites82.8%

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

              if -6.5e96 < a < 1.40000000000000001e39

              1. Initial program 82.4%

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-c, z, \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), \frac{x}{b}, i \cdot t\right)\right) \cdot b + \color{blue}{a \cdot \left(c \cdot j\right)} \]
              7. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

                \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
              10. Step-by-step derivation
                1. fp-cancel-sub-sign-invN/A

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

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

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

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

                  \[\leadsto \left(\color{blue}{\left(-1 \cdot \left(i \cdot j\right)\right) \cdot y} + \left(x \cdot z\right) \cdot y\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - i \cdot t\right) \]
                6. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 70.9% accurate, 1.2× speedup?

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

              1. Initial program 64.7%

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

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

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

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

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

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

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

                if -6.5e96 < a < 8.50000000000000002e55

                1. Initial program 81.9%

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\left(\frac{x \cdot \left(y \cdot z - a \cdot t\right)}{b} - \left(c \cdot z - i \cdot t\right)\right) \cdot b} + j \cdot \left(c \cdot a - y \cdot i\right) \]
                5. Applied rewrites76.8%

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

                  \[\leadsto \mathsf{fma}\left(-c, z, \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), \frac{x}{b}, i \cdot t\right)\right) \cdot b + \color{blue}{a \cdot \left(c \cdot j\right)} \]
                7. Step-by-step derivation
                  1. associate-*r*N/A

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

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

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

                    \[\leadsto \mathsf{fma}\left(-c, z, \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), \frac{x}{b}, i \cdot t\right)\right) \cdot b + \color{blue}{\left(c \cdot a\right)} \cdot j \]
                8. Applied rewrites67.3%

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

                  \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
                10. Step-by-step derivation
                  1. fp-cancel-sub-sign-invN/A

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

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

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

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

                    \[\leadsto \left(\color{blue}{\left(-1 \cdot \left(i \cdot j\right)\right) \cdot y} + \left(x \cdot z\right) \cdot y\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - i \cdot t\right) \]
                  6. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 6: 68.4% accurate, 1.2× speedup?

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

                1. Initial program 64.3%

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

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

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

                    \[\leadsto \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right) \cdot a} \]
                  3. mul-1-negN/A

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

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

                    \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot t} + c \cdot j\right) \cdot a \]
                  6. lower-fma.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{-x}, t, c \cdot j\right) \cdot a \]
                  8. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(-x, t, \color{blue}{j \cdot c}\right) \cdot a \]
                  9. lower-*.f6479.9

                    \[\leadsto \mathsf{fma}\left(-x, t, \color{blue}{j \cdot c}\right) \cdot a \]
                5. Applied rewrites79.9%

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

                if -1.25e100 < a < 2.60000000000000012e66

                1. Initial program 81.0%

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\left(\frac{x \cdot \left(y \cdot z - a \cdot t\right)}{b} - \left(c \cdot z - i \cdot t\right)\right) \cdot b} + j \cdot \left(c \cdot a - y \cdot i\right) \]
                5. Applied rewrites75.9%

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

                  \[\leadsto \mathsf{fma}\left(-c, z, \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), \frac{x}{b}, i \cdot t\right)\right) \cdot b + \color{blue}{a \cdot \left(c \cdot j\right)} \]
                7. Step-by-step derivation
                  1. associate-*r*N/A

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

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

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

                    \[\leadsto \mathsf{fma}\left(-c, z, \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), \frac{x}{b}, i \cdot t\right)\right) \cdot b + \color{blue}{\left(c \cdot a\right)} \cdot j \]
                8. Applied rewrites66.6%

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

                  \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
                10. Step-by-step derivation
                  1. fp-cancel-sub-sign-invN/A

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

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

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

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

                    \[\leadsto \left(\color{blue}{\left(-1 \cdot \left(i \cdot j\right)\right) \cdot y} + \left(x \cdot z\right) \cdot y\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - i \cdot t\right) \]
                  6. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.60000000000000012e66 < a

                1. Initial program 66.4%

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

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

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

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-z, b, j \cdot a\right), c, \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x\right) \]
                6. Step-by-step derivation
                  1. Applied rewrites70.1%

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-z, b, j \cdot a\right), c, \left(\left(-a\right) \cdot t\right) \cdot x\right) \]
                7. Recombined 3 regimes into one program.
                8. Final simplification74.3%

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

                Alternative 7: 58.4% accurate, 1.4× speedup?

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

                  1. Initial program 74.4%

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

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

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

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

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

                      \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                    3. mul-1-negN/A

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

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

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

                      \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                    7. mul-1-negN/A

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

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

                      \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                    10. mul-1-negN/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                    12. mul-1-negN/A

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

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

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

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

                  if -2.59999999999999994e-33 < x < 3.8000000000000002e44

                  1. Initial program 74.0%

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

                    \[\leadsto \color{blue}{\left(j \cdot \left(a \cdot c - i \cdot y\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)} \]
                  4. Step-by-step derivation
                    1. associate--l+N/A

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

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

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

                      \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j + \left(\left(x \cdot y\right) \cdot z - \color{blue}{\left(b \cdot c\right) \cdot z}\right) \]
                    5. distribute-rgt-out--N/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot c - i \cdot y, j, z \cdot \left(x \cdot y - b \cdot c\right)\right)} \]
                    7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \left(\left(-b\right) \cdot c\right) \cdot z\right) \]

                    if 3.8000000000000002e44 < x

                    1. Initial program 76.7%

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

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

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

                      \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + \left(-1 \cdot \frac{b \cdot \left(c \cdot z\right)}{a} + \left(c \cdot j + \frac{x \cdot \left(y \cdot z\right)}{a}\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. Applied rewrites75.5%

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

                        \[\leadsto \left(x \cdot \left(-1 \cdot t + \frac{y \cdot z}{a}\right)\right) \cdot a \]
                      3. Step-by-step derivation
                        1. Applied rewrites69.1%

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

                      Alternative 8: 50.7% accurate, 1.5× speedup?

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

                        1. Initial program 75.0%

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

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

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

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

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

                            \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                          3. mul-1-negN/A

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

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

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

                            \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                          7. mul-1-negN/A

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

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

                            \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                          10. mul-1-negN/A

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                          12. mul-1-negN/A

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

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

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

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

                        if -7.8000000000000004e-44 < x < 4.5e-52

                        1. Initial program 70.9%

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

                          \[\leadsto \color{blue}{\left(j \cdot \left(a \cdot c - i \cdot y\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)} \]
                        4. Step-by-step derivation
                          1. associate--l+N/A

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

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

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

                            \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j + \left(\left(x \cdot y\right) \cdot z - \color{blue}{\left(b \cdot c\right) \cdot z}\right) \]
                          5. distribute-rgt-out--N/A

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot c - i \cdot y, j, z \cdot \left(x \cdot y - b \cdot c\right)\right)} \]
                          7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

                          if 4.5e-52 < x

                          1. Initial program 79.8%

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

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

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

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

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

                              \[\leadsto \left(x \cdot \left(-1 \cdot t + \frac{y \cdot z}{a}\right)\right) \cdot a \]
                            3. Step-by-step derivation
                              1. Applied rewrites65.6%

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

                            Alternative 9: 51.8% accurate, 1.6× speedup?

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

                              1. Initial program 76.7%

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

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

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

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

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

                                  \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                                3. mul-1-negN/A

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

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

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

                                  \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                                7. mul-1-negN/A

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

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

                                  \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                                10. mul-1-negN/A

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                                12. mul-1-negN/A

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

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

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

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

                              if -7.8000000000000004e-44 < x < 1.05999999999999994e-191

                              1. Initial program 73.2%

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

                                \[\leadsto \color{blue}{\left(j \cdot \left(a \cdot c - i \cdot y\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)} \]
                              4. Step-by-step derivation
                                1. associate--l+N/A

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

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

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

                                  \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j + \left(\left(x \cdot y\right) \cdot z - \color{blue}{\left(b \cdot c\right) \cdot z}\right) \]
                                5. distribute-rgt-out--N/A

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot c - i \cdot y, j, z \cdot \left(x \cdot y - b \cdot c\right)\right)} \]
                                7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto j \cdot \color{blue}{\left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right)} \]
                              7. Step-by-step derivation
                                1. Applied rewrites59.6%

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

                                if 1.05999999999999994e-191 < x < 8.0000000000000002e-8

                                1. Initial program 69.5%

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

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

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

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

                                    \[\leadsto \left(a \cdot j - \color{blue}{z \cdot b}\right) \cdot c \]
                                  4. cancel-sign-sub-invN/A

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

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

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

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

                                    \[\leadsto \color{blue}{\left(-1 \cdot \left(b \cdot z\right) + a \cdot j\right)} \cdot c \]
                                  9. *-commutativeN/A

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

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot z, b, a \cdot j\right)} \cdot c \]
                                  12. mul-1-negN/A

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(z\right)}, b, a \cdot j\right) \cdot c \]
                                  13. lower-neg.f64N/A

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

                                    \[\leadsto \mathsf{fma}\left(-z, b, \color{blue}{j \cdot a}\right) \cdot c \]
                                  15. lower-*.f6458.7

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c} \]
                              8. Recombined 3 regimes into one program.
                              9. Add Preprocessing

                              Alternative 10: 49.2% accurate, 1.6× speedup?

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

                                1. Initial program 81.1%

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

                                  \[\leadsto \color{blue}{\left(j \cdot \left(a \cdot c - i \cdot y\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)} \]
                                4. Step-by-step derivation
                                  1. associate--l+N/A

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

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

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

                                    \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j + \left(\left(x \cdot y\right) \cdot z - \color{blue}{\left(b \cdot c\right) \cdot z}\right) \]
                                  5. distribute-rgt-out--N/A

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot c - i \cdot y, j, z \cdot \left(x \cdot y - b \cdot c\right)\right)} \]
                                  7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                                  \[\leadsto j \cdot \color{blue}{\left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right)} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites61.1%

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

                                  if -2.5e23 < j < 5.4999999999999998e-244

                                  1. Initial program 65.2%

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

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

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

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

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

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

                                      \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                    6. metadata-evalN/A

                                      \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                    7. *-lft-identityN/A

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

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

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

                                      \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                    11. lower-*.f6446.5

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

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

                                  if 5.4999999999999998e-244 < j < 3.4999999999999999e-99

                                  1. Initial program 73.9%

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

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

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

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

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

                                      \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                                    3. mul-1-negN/A

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

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

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

                                      \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                                    7. mul-1-negN/A

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

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

                                      \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                                    10. mul-1-negN/A

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

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                                    12. mul-1-negN/A

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

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

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

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

                                    \[\leadsto \left(y \cdot z\right) \cdot x \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites48.8%

                                      \[\leadsto \left(z \cdot y\right) \cdot x \]
                                  10. Recombined 3 regimes into one program.
                                  11. Add Preprocessing

                                  Alternative 11: 29.1% accurate, 1.7× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+121}:\\ \;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-215}:\\ \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-135}:\\ \;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\ \mathbf{elif}\;z \leq 0.0015:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b c i j)
                                   :precision binary64
                                   (if (<= z -3.5e+121)
                                     (* (* (- c) b) z)
                                     (if (<= z 6.8e-215)
                                       (* (* (- a) x) t)
                                       (if (<= z 3.5e-135)
                                         (* (* (- y) j) i)
                                         (if (<= z 0.0015) (* (* j c) a) (* (* z y) x))))))
                                  double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                  	double tmp;
                                  	if (z <= -3.5e+121) {
                                  		tmp = (-c * b) * z;
                                  	} else if (z <= 6.8e-215) {
                                  		tmp = (-a * x) * t;
                                  	} else if (z <= 3.5e-135) {
                                  		tmp = (-y * j) * i;
                                  	} else if (z <= 0.0015) {
                                  		tmp = (j * c) * a;
                                  	} else {
                                  		tmp = (z * 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, j)
                                  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), intent (in) :: j
                                      real(8) :: tmp
                                      if (z <= (-3.5d+121)) then
                                          tmp = (-c * b) * z
                                      else if (z <= 6.8d-215) then
                                          tmp = (-a * x) * t
                                      else if (z <= 3.5d-135) then
                                          tmp = (-y * j) * i
                                      else if (z <= 0.0015d0) then
                                          tmp = (j * c) * a
                                      else
                                          tmp = (z * 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 j) {
                                  	double tmp;
                                  	if (z <= -3.5e+121) {
                                  		tmp = (-c * b) * z;
                                  	} else if (z <= 6.8e-215) {
                                  		tmp = (-a * x) * t;
                                  	} else if (z <= 3.5e-135) {
                                  		tmp = (-y * j) * i;
                                  	} else if (z <= 0.0015) {
                                  		tmp = (j * c) * a;
                                  	} else {
                                  		tmp = (z * y) * x;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a, b, c, i, j):
                                  	tmp = 0
                                  	if z <= -3.5e+121:
                                  		tmp = (-c * b) * z
                                  	elif z <= 6.8e-215:
                                  		tmp = (-a * x) * t
                                  	elif z <= 3.5e-135:
                                  		tmp = (-y * j) * i
                                  	elif z <= 0.0015:
                                  		tmp = (j * c) * a
                                  	else:
                                  		tmp = (z * y) * x
                                  	return tmp
                                  
                                  function code(x, y, z, t, a, b, c, i, j)
                                  	tmp = 0.0
                                  	if (z <= -3.5e+121)
                                  		tmp = Float64(Float64(Float64(-c) * b) * z);
                                  	elseif (z <= 6.8e-215)
                                  		tmp = Float64(Float64(Float64(-a) * x) * t);
                                  	elseif (z <= 3.5e-135)
                                  		tmp = Float64(Float64(Float64(-y) * j) * i);
                                  	elseif (z <= 0.0015)
                                  		tmp = Float64(Float64(j * c) * a);
                                  	else
                                  		tmp = Float64(Float64(z * y) * x);
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                  	tmp = 0.0;
                                  	if (z <= -3.5e+121)
                                  		tmp = (-c * b) * z;
                                  	elseif (z <= 6.8e-215)
                                  		tmp = (-a * x) * t;
                                  	elseif (z <= 3.5e-135)
                                  		tmp = (-y * j) * i;
                                  	elseif (z <= 0.0015)
                                  		tmp = (j * c) * a;
                                  	else
                                  		tmp = (z * y) * x;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -3.5e+121], N[(N[((-c) * b), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 6.8e-215], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 3.5e-135], N[(N[((-y) * j), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 0.0015], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;z \leq -3.5 \cdot 10^{+121}:\\
                                  \;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\
                                  
                                  \mathbf{elif}\;z \leq 6.8 \cdot 10^{-215}:\\
                                  \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\
                                  
                                  \mathbf{elif}\;z \leq 3.5 \cdot 10^{-135}:\\
                                  \;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\
                                  
                                  \mathbf{elif}\;z \leq 0.0015:\\
                                  \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 5 regimes
                                  2. if z < -3.5e121

                                    1. Initial program 60.6%

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

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

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

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

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

                                      if -3.5e121 < z < 6.80000000000000003e-215

                                      1. Initial program 83.1%

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

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

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

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

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

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

                                          \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                        6. metadata-evalN/A

                                          \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                        7. *-lft-identityN/A

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

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

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

                                          \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                        11. lower-*.f6453.3

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

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

                                        \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites38.7%

                                          \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]

                                        if 6.80000000000000003e-215 < z < 3.4999999999999998e-135

                                        1. Initial program 76.6%

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

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

                                            \[\leadsto \color{blue}{\left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right) \cdot i} \]
                                          2. lower-*.f64N/A

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

                                            \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \color{blue}{\left(-1 \cdot b\right) \cdot t}\right) \cdot i \]
                                          4. fp-cancel-sub-sign-invN/A

                                            \[\leadsto \color{blue}{\left(-1 \cdot \left(j \cdot y\right) + \left(\mathsf{neg}\left(-1 \cdot b\right)\right) \cdot t\right)} \cdot i \]
                                          5. *-commutativeN/A

                                            \[\leadsto \left(-1 \cdot \color{blue}{\left(y \cdot j\right)} + \left(\mathsf{neg}\left(-1 \cdot b\right)\right) \cdot t\right) \cdot i \]
                                          6. associate-*r*N/A

                                            \[\leadsto \left(\color{blue}{\left(-1 \cdot y\right) \cdot j} + \left(\mathsf{neg}\left(-1 \cdot b\right)\right) \cdot t\right) \cdot i \]
                                          7. distribute-lft-neg-inN/A

                                            \[\leadsto \left(\left(-1 \cdot y\right) \cdot j + \color{blue}{\left(\left(\mathsf{neg}\left(-1\right)\right) \cdot b\right)} \cdot t\right) \cdot i \]
                                          8. associate-*r*N/A

                                            \[\leadsto \left(\left(-1 \cdot y\right) \cdot j + \color{blue}{\left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)}\right) \cdot i \]
                                          9. metadata-evalN/A

                                            \[\leadsto \left(\left(-1 \cdot y\right) \cdot j + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \cdot i \]
                                          10. *-lft-identityN/A

                                            \[\leadsto \left(\left(-1 \cdot y\right) \cdot j + \color{blue}{b \cdot t}\right) \cdot i \]
                                          11. lower-fma.f64N/A

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot y, j, b \cdot t\right)} \cdot i \]
                                          12. mul-1-negN/A

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y\right)}, j, b \cdot t\right) \cdot i \]
                                          13. lower-neg.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{-y}, j, b \cdot t\right) \cdot i \]
                                          14. lower-*.f6460.7

                                            \[\leadsto \mathsf{fma}\left(-y, j, \color{blue}{b \cdot t}\right) \cdot i \]
                                        5. Applied rewrites60.7%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                        6. Taylor expanded in y around inf

                                          \[\leadsto \left(-1 \cdot \left(j \cdot y\right)\right) \cdot i \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites54.6%

                                            \[\leadsto \left(\left(-y\right) \cdot j\right) \cdot i \]

                                          if 3.4999999999999998e-135 < z < 0.0015

                                          1. Initial program 83.5%

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

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

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

                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right) \cdot a} \]
                                            3. mul-1-negN/A

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

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

                                              \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot t} + c \cdot j\right) \cdot a \]
                                            6. lower-fma.f64N/A

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

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{-x}, t, c \cdot j\right) \cdot a \]
                                            8. *-commutativeN/A

                                              \[\leadsto \mathsf{fma}\left(-x, t, \color{blue}{j \cdot c}\right) \cdot a \]
                                            9. lower-*.f6451.5

                                              \[\leadsto \mathsf{fma}\left(-x, t, \color{blue}{j \cdot c}\right) \cdot a \]
                                          5. Applied rewrites51.5%

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

                                            \[\leadsto \left(c \cdot j\right) \cdot a \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites35.0%

                                              \[\leadsto \left(j \cdot c\right) \cdot a \]

                                            if 0.0015 < z

                                            1. Initial program 65.6%

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

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

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

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

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

                                                \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                                              3. mul-1-negN/A

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

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

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

                                                \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                                              7. mul-1-negN/A

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

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

                                                \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                                              10. mul-1-negN/A

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

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                                              12. mul-1-negN/A

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

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

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

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

                                              \[\leadsto \left(y \cdot z\right) \cdot x \]
                                            9. Step-by-step derivation
                                              1. Applied rewrites44.8%

                                                \[\leadsto \left(z \cdot y\right) \cdot x \]
                                            10. Recombined 5 regimes into one program.
                                            11. Add Preprocessing

                                            Alternative 12: 51.4% accurate, 2.0× speedup?

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

                                              1. Initial program 75.7%

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

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

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

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

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

                                                  \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                                                3. mul-1-negN/A

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

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

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

                                                  \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                                                7. mul-1-negN/A

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

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

                                                  \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                                                10. mul-1-negN/A

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

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                                                12. mul-1-negN/A

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

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

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

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

                                              if -7.8000000000000004e-44 < x < 2.5e29

                                              1. Initial program 73.6%

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

                                                \[\leadsto \color{blue}{\left(j \cdot \left(a \cdot c - i \cdot y\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)} \]
                                              4. Step-by-step derivation
                                                1. associate--l+N/A

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

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

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

                                                  \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j + \left(\left(x \cdot y\right) \cdot z - \color{blue}{\left(b \cdot c\right) \cdot z}\right) \]
                                                5. distribute-rgt-out--N/A

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

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot c - i \cdot y, j, z \cdot \left(x \cdot y - b \cdot c\right)\right)} \]
                                                7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot \color{blue}{j} \]
                                              8. Recombined 2 regimes into one program.
                                              9. Final simplification62.6%

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

                                              Alternative 13: 51.8% accurate, 2.0× speedup?

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

                                                1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(-b, c, \color{blue}{y \cdot x}\right) \cdot z \]
                                                  12. lower-*.f6467.1

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

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

                                                if -8.40000000000000003e68 < z < 2.6500000000000001e-20

                                                1. Initial program 83.7%

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

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

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

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

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

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

                                                    \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                  6. metadata-evalN/A

                                                    \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                  7. *-lft-identityN/A

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                  11. lower-*.f6451.6

                                                    \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                5. Applied rewrites51.6%

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

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

                                              Alternative 14: 41.7% accurate, 2.0× speedup?

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

                                                1. Initial program 78.2%

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

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

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

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

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

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

                                                    \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                  6. metadata-evalN/A

                                                    \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                  7. *-lft-identityN/A

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                  11. lower-*.f6452.4

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

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

                                                  \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites44.3%

                                                    \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]

                                                  if -2.3000000000000001e101 < x < 4.80000000000000026e44

                                                  1. Initial program 72.1%

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

                                                    \[\leadsto \color{blue}{\left(j \cdot \left(a \cdot c - i \cdot y\right) + x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)} \]
                                                  4. Step-by-step derivation
                                                    1. associate--l+N/A

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

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

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

                                                      \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j + \left(\left(x \cdot y\right) \cdot z - \color{blue}{\left(b \cdot c\right) \cdot z}\right) \]
                                                    5. distribute-rgt-out--N/A

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

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot c - i \cdot y, j, z \cdot \left(x \cdot y - b \cdot c\right)\right)} \]
                                                    7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto j \cdot \color{blue}{\left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right)} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites52.1%

                                                      \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot \color{blue}{j} \]
                                                  8. Recombined 2 regimes into one program.
                                                  9. Final simplification48.8%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+101} \lor \neg \left(x \leq 4.8 \cdot 10^{+44}\right):\\ \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \end{array} \]
                                                  10. Add Preprocessing

                                                  Alternative 15: 28.9% accurate, 2.1× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+121}:\\ \;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-182}:\\ \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\ \mathbf{elif}\;z \leq 0.0015:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a b c i j)
                                                   :precision binary64
                                                   (if (<= z -3.5e+121)
                                                     (* (* (- c) b) z)
                                                     (if (<= z 4e-182)
                                                       (* (* (- a) x) t)
                                                       (if (<= z 0.0015) (* (* j c) a) (* (* z y) x)))))
                                                  double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                  	double tmp;
                                                  	if (z <= -3.5e+121) {
                                                  		tmp = (-c * b) * z;
                                                  	} else if (z <= 4e-182) {
                                                  		tmp = (-a * x) * t;
                                                  	} else if (z <= 0.0015) {
                                                  		tmp = (j * c) * a;
                                                  	} else {
                                                  		tmp = (z * 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, j)
                                                  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), intent (in) :: j
                                                      real(8) :: tmp
                                                      if (z <= (-3.5d+121)) then
                                                          tmp = (-c * b) * z
                                                      else if (z <= 4d-182) then
                                                          tmp = (-a * x) * t
                                                      else if (z <= 0.0015d0) then
                                                          tmp = (j * c) * a
                                                      else
                                                          tmp = (z * 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 j) {
                                                  	double tmp;
                                                  	if (z <= -3.5e+121) {
                                                  		tmp = (-c * b) * z;
                                                  	} else if (z <= 4e-182) {
                                                  		tmp = (-a * x) * t;
                                                  	} else if (z <= 0.0015) {
                                                  		tmp = (j * c) * a;
                                                  	} else {
                                                  		tmp = (z * y) * x;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(x, y, z, t, a, b, c, i, j):
                                                  	tmp = 0
                                                  	if z <= -3.5e+121:
                                                  		tmp = (-c * b) * z
                                                  	elif z <= 4e-182:
                                                  		tmp = (-a * x) * t
                                                  	elif z <= 0.0015:
                                                  		tmp = (j * c) * a
                                                  	else:
                                                  		tmp = (z * y) * x
                                                  	return tmp
                                                  
                                                  function code(x, y, z, t, a, b, c, i, j)
                                                  	tmp = 0.0
                                                  	if (z <= -3.5e+121)
                                                  		tmp = Float64(Float64(Float64(-c) * b) * z);
                                                  	elseif (z <= 4e-182)
                                                  		tmp = Float64(Float64(Float64(-a) * x) * t);
                                                  	elseif (z <= 0.0015)
                                                  		tmp = Float64(Float64(j * c) * a);
                                                  	else
                                                  		tmp = Float64(Float64(z * y) * x);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                  	tmp = 0.0;
                                                  	if (z <= -3.5e+121)
                                                  		tmp = (-c * b) * z;
                                                  	elseif (z <= 4e-182)
                                                  		tmp = (-a * x) * t;
                                                  	elseif (z <= 0.0015)
                                                  		tmp = (j * c) * a;
                                                  	else
                                                  		tmp = (z * y) * x;
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -3.5e+121], N[(N[((-c) * b), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 4e-182], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 0.0015], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;z \leq -3.5 \cdot 10^{+121}:\\
                                                  \;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\
                                                  
                                                  \mathbf{elif}\;z \leq 4 \cdot 10^{-182}:\\
                                                  \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\
                                                  
                                                  \mathbf{elif}\;z \leq 0.0015:\\
                                                  \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 4 regimes
                                                  2. if z < -3.5e121

                                                    1. Initial program 60.6%

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

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

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

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

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

                                                      if -3.5e121 < z < 4.0000000000000002e-182

                                                      1. Initial program 83.9%

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

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

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

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

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

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

                                                          \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                        6. metadata-evalN/A

                                                          \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                        7. *-lft-identityN/A

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                        11. lower-*.f6452.8

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

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

                                                        \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites37.8%

                                                          \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]

                                                        if 4.0000000000000002e-182 < z < 0.0015

                                                        1. Initial program 79.4%

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

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

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

                                                            \[\leadsto \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right) \cdot a} \]
                                                          3. mul-1-negN/A

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

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

                                                            \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot t} + c \cdot j\right) \cdot a \]
                                                          6. lower-fma.f64N/A

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

                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{-x}, t, c \cdot j\right) \cdot a \]
                                                          8. *-commutativeN/A

                                                            \[\leadsto \mathsf{fma}\left(-x, t, \color{blue}{j \cdot c}\right) \cdot a \]
                                                          9. lower-*.f6445.5

                                                            \[\leadsto \mathsf{fma}\left(-x, t, \color{blue}{j \cdot c}\right) \cdot a \]
                                                        5. Applied rewrites45.5%

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

                                                          \[\leadsto \left(c \cdot j\right) \cdot a \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites33.0%

                                                            \[\leadsto \left(j \cdot c\right) \cdot a \]

                                                          if 0.0015 < z

                                                          1. Initial program 65.6%

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                                                            3. mul-1-negN/A

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

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

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

                                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                                                            7. mul-1-negN/A

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

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

                                                              \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                                                            10. mul-1-negN/A

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

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                                                            12. mul-1-negN/A

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

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

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

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

                                                            \[\leadsto \left(y \cdot z\right) \cdot x \]
                                                          9. Step-by-step derivation
                                                            1. Applied rewrites44.8%

                                                              \[\leadsto \left(z \cdot y\right) \cdot x \]
                                                          10. Recombined 4 regimes into one program.
                                                          11. Add Preprocessing

                                                          Alternative 16: 29.7% accurate, 2.1× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;y \leq -1.7 \cdot 10^{+124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-153}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+68}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                          (FPCore (x y z t a b c i j)
                                                           :precision binary64
                                                           (let* ((t_1 (* (* z y) x)))
                                                             (if (<= y -1.7e+124)
                                                               t_1
                                                               (if (<= y 6.4e-153) (* (* j c) a) (if (<= y 9e+68) (* (* i t) b) t_1)))))
                                                          double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                          	double t_1 = (z * y) * x;
                                                          	double tmp;
                                                          	if (y <= -1.7e+124) {
                                                          		tmp = t_1;
                                                          	} else if (y <= 6.4e-153) {
                                                          		tmp = (j * c) * a;
                                                          	} else if (y <= 9e+68) {
                                                          		tmp = (i * t) * b;
                                                          	} 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, j)
                                                          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), intent (in) :: j
                                                              real(8) :: t_1
                                                              real(8) :: tmp
                                                              t_1 = (z * y) * x
                                                              if (y <= (-1.7d+124)) then
                                                                  tmp = t_1
                                                              else if (y <= 6.4d-153) then
                                                                  tmp = (j * c) * a
                                                              else if (y <= 9d+68) then
                                                                  tmp = (i * t) * b
                                                              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 j) {
                                                          	double t_1 = (z * y) * x;
                                                          	double tmp;
                                                          	if (y <= -1.7e+124) {
                                                          		tmp = t_1;
                                                          	} else if (y <= 6.4e-153) {
                                                          		tmp = (j * c) * a;
                                                          	} else if (y <= 9e+68) {
                                                          		tmp = (i * t) * b;
                                                          	} else {
                                                          		tmp = t_1;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y, z, t, a, b, c, i, j):
                                                          	t_1 = (z * y) * x
                                                          	tmp = 0
                                                          	if y <= -1.7e+124:
                                                          		tmp = t_1
                                                          	elif y <= 6.4e-153:
                                                          		tmp = (j * c) * a
                                                          	elif y <= 9e+68:
                                                          		tmp = (i * t) * b
                                                          	else:
                                                          		tmp = t_1
                                                          	return tmp
                                                          
                                                          function code(x, y, z, t, a, b, c, i, j)
                                                          	t_1 = Float64(Float64(z * y) * x)
                                                          	tmp = 0.0
                                                          	if (y <= -1.7e+124)
                                                          		tmp = t_1;
                                                          	elseif (y <= 6.4e-153)
                                                          		tmp = Float64(Float64(j * c) * a);
                                                          	elseif (y <= 9e+68)
                                                          		tmp = Float64(Float64(i * t) * b);
                                                          	else
                                                          		tmp = t_1;
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                          	t_1 = (z * y) * x;
                                                          	tmp = 0.0;
                                                          	if (y <= -1.7e+124)
                                                          		tmp = t_1;
                                                          	elseif (y <= 6.4e-153)
                                                          		tmp = (j * c) * a;
                                                          	elseif (y <= 9e+68)
                                                          		tmp = (i * t) * b;
                                                          	else
                                                          		tmp = t_1;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -1.7e+124], t$95$1, If[LessEqual[y, 6.4e-153], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 9e+68], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          t_1 := \left(z \cdot y\right) \cdot x\\
                                                          \mathbf{if}\;y \leq -1.7 \cdot 10^{+124}:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          \mathbf{elif}\;y \leq 6.4 \cdot 10^{-153}:\\
                                                          \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                                          
                                                          \mathbf{elif}\;y \leq 9 \cdot 10^{+68}:\\
                                                          \;\;\;\;\left(i \cdot t\right) \cdot b\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if y < -1.7e124 or 9.0000000000000007e68 < y

                                                            1. Initial program 61.8%

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

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

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

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

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

                                                                \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                                                              3. mul-1-negN/A

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

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

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

                                                                \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                                                              7. mul-1-negN/A

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

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

                                                                \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                                                              10. mul-1-negN/A

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

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                                                              12. mul-1-negN/A

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

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

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

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

                                                              \[\leadsto \left(y \cdot z\right) \cdot x \]
                                                            9. Step-by-step derivation
                                                              1. Applied rewrites47.1%

                                                                \[\leadsto \left(z \cdot y\right) \cdot x \]

                                                              if -1.7e124 < y < 6.3999999999999998e-153

                                                              1. Initial program 81.0%

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

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

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

                                                                  \[\leadsto \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right) \cdot a} \]
                                                                3. mul-1-negN/A

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

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

                                                                  \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot t} + c \cdot j\right) \cdot a \]
                                                                6. lower-fma.f64N/A

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

                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{-x}, t, c \cdot j\right) \cdot a \]
                                                                8. *-commutativeN/A

                                                                  \[\leadsto \mathsf{fma}\left(-x, t, \color{blue}{j \cdot c}\right) \cdot a \]
                                                                9. lower-*.f6455.1

                                                                  \[\leadsto \mathsf{fma}\left(-x, t, \color{blue}{j \cdot c}\right) \cdot a \]
                                                              5. Applied rewrites55.1%

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

                                                                \[\leadsto \left(c \cdot j\right) \cdot a \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites34.2%

                                                                  \[\leadsto \left(j \cdot c\right) \cdot a \]

                                                                if 6.3999999999999998e-153 < y < 9.0000000000000007e68

                                                                1. Initial program 88.2%

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

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

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

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

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

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

                                                                    \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                                  6. metadata-evalN/A

                                                                    \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                                  7. *-lft-identityN/A

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

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

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

                                                                    \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                                  11. lower-*.f6449.0

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

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

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

                                                                    \[\leadsto \left(i \cdot t\right) \cdot \color{blue}{b} \]
                                                                8. Recombined 3 regimes into one program.
                                                                9. Add Preprocessing

                                                                Alternative 17: 29.3% accurate, 2.4× speedup?

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

                                                                  1. Initial program 68.9%

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

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

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

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

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

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

                                                                      \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                                    6. metadata-evalN/A

                                                                      \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                                    7. *-lft-identityN/A

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

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

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

                                                                      \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                                    11. lower-*.f6455.8

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

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

                                                                    \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites37.7%

                                                                      \[\leadsto \left(-a\right) \cdot \color{blue}{\left(x \cdot t\right)} \]

                                                                    if -175000 < t < 2.7e-20

                                                                    1. Initial program 80.3%

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

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

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

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

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

                                                                        \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                                                                      3. mul-1-negN/A

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

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

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

                                                                        \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                                                                      7. mul-1-negN/A

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

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

                                                                        \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                                                                      10. mul-1-negN/A

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

                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                                                                      12. mul-1-negN/A

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

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

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

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

                                                                      \[\leadsto \left(y \cdot z\right) \cdot x \]
                                                                    9. Step-by-step derivation
                                                                      1. Applied rewrites37.7%

                                                                        \[\leadsto \left(z \cdot y\right) \cdot x \]
                                                                    10. Recombined 2 regimes into one program.
                                                                    11. Final simplification37.7%

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -175000 \lor \neg \left(t \leq 2.7 \cdot 10^{-20}\right):\\ \;\;\;\;\left(-a\right) \cdot \left(x \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \]
                                                                    12. Add Preprocessing

                                                                    Alternative 18: 29.6% accurate, 2.6× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-86} \lor \neg \left(z \leq 4.5 \cdot 10^{-69}\right):\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \end{array} \end{array} \]
                                                                    (FPCore (x y z t a b c i j)
                                                                     :precision binary64
                                                                     (if (or (<= z -1.05e-86) (not (<= z 4.5e-69))) (* (* z y) x) (* (* i t) b)))
                                                                    double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                    	double tmp;
                                                                    	if ((z <= -1.05e-86) || !(z <= 4.5e-69)) {
                                                                    		tmp = (z * y) * x;
                                                                    	} else {
                                                                    		tmp = (i * t) * b;
                                                                    	}
                                                                    	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, j)
                                                                    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), intent (in) :: j
                                                                        real(8) :: tmp
                                                                        if ((z <= (-1.05d-86)) .or. (.not. (z <= 4.5d-69))) then
                                                                            tmp = (z * y) * x
                                                                        else
                                                                            tmp = (i * t) * b
                                                                        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 j) {
                                                                    	double tmp;
                                                                    	if ((z <= -1.05e-86) || !(z <= 4.5e-69)) {
                                                                    		tmp = (z * y) * x;
                                                                    	} else {
                                                                    		tmp = (i * t) * b;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(x, y, z, t, a, b, c, i, j):
                                                                    	tmp = 0
                                                                    	if (z <= -1.05e-86) or not (z <= 4.5e-69):
                                                                    		tmp = (z * y) * x
                                                                    	else:
                                                                    		tmp = (i * t) * b
                                                                    	return tmp
                                                                    
                                                                    function code(x, y, z, t, a, b, c, i, j)
                                                                    	tmp = 0.0
                                                                    	if ((z <= -1.05e-86) || !(z <= 4.5e-69))
                                                                    		tmp = Float64(Float64(z * y) * x);
                                                                    	else
                                                                    		tmp = Float64(Float64(i * t) * b);
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                    	tmp = 0.0;
                                                                    	if ((z <= -1.05e-86) || ~((z <= 4.5e-69)))
                                                                    		tmp = (z * y) * x;
                                                                    	else
                                                                    		tmp = (i * t) * b;
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -1.05e-86], N[Not[LessEqual[z, 4.5e-69]], $MachinePrecision]], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;z \leq -1.05 \cdot 10^{-86} \lor \neg \left(z \leq 4.5 \cdot 10^{-69}\right):\\
                                                                    \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\left(i \cdot t\right) \cdot b\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if z < -1.05e-86 or 4.50000000000000009e-69 < z

                                                                      1. Initial program 68.8%

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

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

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

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

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

                                                                          \[\leadsto \color{blue}{\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right)} \cdot x \]
                                                                        3. mul-1-negN/A

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

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

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

                                                                          \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x} \]
                                                                        7. mul-1-negN/A

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

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

                                                                          \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot a} + y \cdot z\right) \cdot x \]
                                                                        10. mul-1-negN/A

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

                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot t, a, y \cdot z\right)} \cdot x \]
                                                                        12. mul-1-negN/A

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

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

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

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

                                                                        \[\leadsto \left(y \cdot z\right) \cdot x \]
                                                                      9. Step-by-step derivation
                                                                        1. Applied rewrites39.1%

                                                                          \[\leadsto \left(z \cdot y\right) \cdot x \]

                                                                        if -1.05e-86 < z < 4.50000000000000009e-69

                                                                        1. Initial program 84.1%

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

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

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

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

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

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

                                                                            \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                                          6. metadata-evalN/A

                                                                            \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                                          7. *-lft-identityN/A

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

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

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

                                                                            \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                                          11. lower-*.f6452.8

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

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

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

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

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-86} \lor \neg \left(z \leq 4.5 \cdot 10^{-69}\right):\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \end{array} \]
                                                                        10. Add Preprocessing

                                                                        Alternative 19: 22.2% accurate, 5.5× speedup?

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

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

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

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

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

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

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

                                                                            \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot x + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                                          6. metadata-evalN/A

                                                                            \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + \color{blue}{1} \cdot \left(b \cdot i\right)\right) \cdot t \]
                                                                          7. *-lft-identityN/A

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

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

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

                                                                            \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                                          11. lower-*.f6437.3

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

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

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

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

                                                                          Developer Target 1: 59.1% accurate, 0.2× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\ \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\ \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                          (FPCore (x y z t a b c i j)
                                                                           :precision binary64
                                                                           (let* ((t_1 (* j (- (* c a) (* y i))))
                                                                                  (t_2
                                                                                   (+
                                                                                    (-
                                                                                     (* x (- (* y z) (* t a)))
                                                                                     (/
                                                                                      (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
                                                                                      (+ (* c z) (* t i))))
                                                                                    t_1)))
                                                                             (if (< x -1.469694296777705e-64)
                                                                               t_2
                                                                               (if (< x 3.2113527362226803e-147)
                                                                                 (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
                                                                                 t_2))))
                                                                          double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                          	double t_1 = j * ((c * a) - (y * i));
                                                                          	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
                                                                          	double tmp;
                                                                          	if (x < -1.469694296777705e-64) {
                                                                          		tmp = t_2;
                                                                          	} else if (x < 3.2113527362226803e-147) {
                                                                          		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
                                                                          	} else {
                                                                          		tmp = t_2;
                                                                          	}
                                                                          	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, j)
                                                                          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), intent (in) :: j
                                                                              real(8) :: t_1
                                                                              real(8) :: t_2
                                                                              real(8) :: tmp
                                                                              t_1 = j * ((c * a) - (y * i))
                                                                              t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
                                                                              if (x < (-1.469694296777705d-64)) then
                                                                                  tmp = t_2
                                                                              else if (x < 3.2113527362226803d-147) then
                                                                                  tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
                                                                              else
                                                                                  tmp = t_2
                                                                              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 j) {
                                                                          	double t_1 = j * ((c * a) - (y * i));
                                                                          	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
                                                                          	double tmp;
                                                                          	if (x < -1.469694296777705e-64) {
                                                                          		tmp = t_2;
                                                                          	} else if (x < 3.2113527362226803e-147) {
                                                                          		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
                                                                          	} else {
                                                                          		tmp = t_2;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          def code(x, y, z, t, a, b, c, i, j):
                                                                          	t_1 = j * ((c * a) - (y * i))
                                                                          	t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1
                                                                          	tmp = 0
                                                                          	if x < -1.469694296777705e-64:
                                                                          		tmp = t_2
                                                                          	elif x < 3.2113527362226803e-147:
                                                                          		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
                                                                          	else:
                                                                          		tmp = t_2
                                                                          	return tmp
                                                                          
                                                                          function code(x, y, z, t, a, b, c, i, j)
                                                                          	t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i)))
                                                                          	t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1)
                                                                          	tmp = 0.0
                                                                          	if (x < -1.469694296777705e-64)
                                                                          		tmp = t_2;
                                                                          	elseif (x < 3.2113527362226803e-147)
                                                                          		tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1));
                                                                          	else
                                                                          		tmp = t_2;
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                          	t_1 = j * ((c * a) - (y * i));
                                                                          	t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1;
                                                                          	tmp = 0.0;
                                                                          	if (x < -1.469694296777705e-64)
                                                                          		tmp = t_2;
                                                                          	elseif (x < 3.2113527362226803e-147)
                                                                          		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
                                                                          	else
                                                                          		tmp = t_2;
                                                                          	end
                                                                          	tmp_2 = tmp;
                                                                          end
                                                                          
                                                                          code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
                                                                          t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
                                                                          \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
                                                                          \;\;\;\;t\_2\\
                                                                          
                                                                          \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
                                                                          \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;t\_2\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          

                                                                          Reproduce

                                                                          ?
                                                                          herbie shell --seed 2024352 
                                                                          (FPCore (x y z t a b c i j)
                                                                            :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
                                                                            :precision binary64
                                                                          
                                                                            :alt
                                                                            (! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))
                                                                          
                                                                            (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))