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

Percentage Accurate: 73.8% → 84.7%
Time: 12.9s
Alternatives: 20
Speedup: 0.5×

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 20 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.8% 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: 84.7% 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}:\\ \;\;\;\;\mathsf{fma}\left(z, y, \left(\frac{i \cdot b}{x} - a\right) \cdot t\right) \cdot x\\ \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 (* (fma z y (* (- (/ (* i b) x) a) t)) x))))
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 = fma(z, y, ((((i * b) / x) - a) * t)) * x;
	}
	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(fma(z, y, Float64(Float64(Float64(Float64(i * b) / x) - a) * t)) * x);
	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[(N[(z * y + N[(N[(N[(N[(i * b), $MachinePrecision] / x), $MachinePrecision] - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * x), $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}:\\
\;\;\;\;\mathsf{fma}\left(z, y, \left(\frac{i \cdot b}{x} - a\right) \cdot t\right) \cdot x\\


\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 89.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

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

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

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

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

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

    Alternative 2: 61.1% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot x\right) \cdot y + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{if}\;j \leq -4.4 \cdot 10^{+107}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -2.3 \cdot 10^{+58}:\\ \;\;\;\;\left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c\\ \mathbf{elif}\;j \leq -8.5 \cdot 10^{-67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 2.85 \cdot 10^{+82}:\\ \;\;\;\;\mathsf{fma}\left(z, y, \left(\frac{i \cdot b}{x} - a\right) \cdot t\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot a\right), j, \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
     (let* ((t_1 (+ (* (* z x) y) (* j (- (* c a) (* y i))))))
       (if (<= j -4.4e+107)
         t_1
         (if (<= j -2.3e+58)
           (* (* (- (/ (* y x) c) b) z) c)
           (if (<= j -8.5e-67)
             t_1
             (if (<= j 2.85e+82)
               (* (fma z y (* (- (/ (* i b) x) a) t)) x)
               (fma (fma (- y) i (* c a)) j (* (* (- a) t) x))))))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
    	double t_1 = ((z * x) * y) + (j * ((c * a) - (y * i)));
    	double tmp;
    	if (j <= -4.4e+107) {
    		tmp = t_1;
    	} else if (j <= -2.3e+58) {
    		tmp = ((((y * x) / c) - b) * z) * c;
    	} else if (j <= -8.5e-67) {
    		tmp = t_1;
    	} else if (j <= 2.85e+82) {
    		tmp = fma(z, y, ((((i * b) / x) - a) * t)) * x;
    	} else {
    		tmp = fma(fma(-y, i, (c * a)), j, ((-a * t) * x));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i, j)
    	t_1 = Float64(Float64(Float64(z * x) * y) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
    	tmp = 0.0
    	if (j <= -4.4e+107)
    		tmp = t_1;
    	elseif (j <= -2.3e+58)
    		tmp = Float64(Float64(Float64(Float64(Float64(y * x) / c) - b) * z) * c);
    	elseif (j <= -8.5e-67)
    		tmp = t_1;
    	elseif (j <= 2.85e+82)
    		tmp = Float64(fma(z, y, Float64(Float64(Float64(Float64(i * b) / x) - a) * t)) * x);
    	else
    		tmp = fma(fma(Float64(-y), i, Float64(c * a)), j, Float64(Float64(Float64(-a) * t) * x));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.4e+107], t$95$1, If[LessEqual[j, -2.3e+58], N[(N[(N[(N[(N[(y * x), $MachinePrecision] / c), $MachinePrecision] - b), $MachinePrecision] * z), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[j, -8.5e-67], t$95$1, If[LessEqual[j, 2.85e+82], N[(N[(z * y + N[(N[(N[(N[(i * b), $MachinePrecision] / x), $MachinePrecision] - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(z \cdot x\right) \cdot y + j \cdot \left(c \cdot a - y \cdot i\right)\\
    \mathbf{if}\;j \leq -4.4 \cdot 10^{+107}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;j \leq -2.3 \cdot 10^{+58}:\\
    \;\;\;\;\left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c\\
    
    \mathbf{elif}\;j \leq -8.5 \cdot 10^{-67}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;j \leq 2.85 \cdot 10^{+82}:\\
    \;\;\;\;\mathsf{fma}\left(z, y, \left(\frac{i \cdot b}{x} - a\right) \cdot t\right) \cdot x\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot a\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if j < -4.4e107 or -2.30000000000000002e58 < j < -8.49999999999999993e-67

      1. Initial program 71.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 y around inf

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

          \[\leadsto \color{blue}{\left(z \cdot x\right) \cdot y} + j \cdot \left(c \cdot a - y \cdot i\right) \]

        if -4.4e107 < j < -2.30000000000000002e58

        1. Initial program 60.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(\left(-1 \cdot \frac{i \cdot \left(j \cdot y\right)}{c} + \left(a \cdot j + \frac{x \cdot \left(y \cdot z - a \cdot t\right)}{c}\right)\right) - \left(-1 \cdot \frac{b \cdot \left(i \cdot t\right)}{c} + b \cdot z\right)\right)} \]
        4. Applied rewrites79.8%

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

          \[\leadsto \left(z \cdot \left(\frac{x \cdot y}{c} - b\right)\right) \cdot c \]
        6. Step-by-step derivation
          1. Applied rewrites99.8%

            \[\leadsto \left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c \]

          if -8.49999999999999993e-67 < j < 2.85000000000000008e82

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

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

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

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

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

            if 2.85000000000000008e82 < j

            1. Initial program 63.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(t \cdot x\right)\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
            4. Step-by-step derivation
              1. Applied rewrites81.5%

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

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

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

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

                  \[\leadsto \color{blue}{\left(c \cdot a - y \cdot i\right) \cdot j} + \left(-t\right) \cdot \left(a \cdot x\right) \]
                5. lower-fma.f6483.8

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

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

            Alternative 3: 72.8% accurate, 1.1× speedup?

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

              1. Initial program 71.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 y around 0

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

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

                if -4e15 < b < 7.00000000000000007e-20

                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 b around 0

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

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

                  if 1.60000000000000012e192 < b

                  1. Initial program 65.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 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)} \]
                  4. Applied rewrites92.8%

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

                Alternative 4: 68.0% accurate, 1.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\ \mathbf{if}\;i \leq -1.42 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 6.2 \cdot 10^{-144}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, b, a \cdot j\right), c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\ \mathbf{elif}\;i \leq 3.4 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i j)
                 :precision binary64
                 (let* ((t_1 (* (fma (- y) j (* b t)) i)))
                   (if (<= i -1.42e+104)
                     t_1
                     (if (<= i 6.2e-144)
                       (fma (fma (- z) b (* a j)) c (* (fma (- a) t (* z y)) x))
                       (if (<= i 3.4e+136)
                         (fma (fma (- t) a (* z y)) x (* (fma (- i) y (* c a)) j))
                         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(-y, j, (b * t)) * i;
                	double tmp;
                	if (i <= -1.42e+104) {
                		tmp = t_1;
                	} else if (i <= 6.2e-144) {
                		tmp = fma(fma(-z, b, (a * j)), c, (fma(-a, t, (z * y)) * x));
                	} else if (i <= 3.4e+136) {
                		tmp = fma(fma(-t, a, (z * y)), x, (fma(-i, y, (c * a)) * j));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b, c, i, j)
                	t_1 = Float64(fma(Float64(-y), j, Float64(b * t)) * i)
                	tmp = 0.0
                	if (i <= -1.42e+104)
                		tmp = t_1;
                	elseif (i <= 6.2e-144)
                		tmp = fma(fma(Float64(-z), b, Float64(a * j)), c, Float64(fma(Float64(-a), t, Float64(z * y)) * x));
                	elseif (i <= 3.4e+136)
                		tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, Float64(fma(Float64(-i), y, Float64(c * a)) * j));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -1.42e+104], t$95$1, If[LessEqual[i, 6.2e-144], N[(N[((-z) * b + N[(a * j), $MachinePrecision]), $MachinePrecision] * c + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.4e+136], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
                \mathbf{if}\;i \leq -1.42 \cdot 10^{+104}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;i \leq 6.2 \cdot 10^{-144}:\\
                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, b, a \cdot j\right), c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\
                
                \mathbf{elif}\;i \leq 3.4 \cdot 10^{+136}:\\
                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if i < -1.42e104 or 3.39999999999999997e136 < i

                  1. Initial program 55.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 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. Applied rewrites74.3%

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

                    if -1.42e104 < i < 6.2000000000000001e-144

                    1. Initial program 76.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 y around inf

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

                        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{\mathsf{fma}\left(\frac{j \cdot c}{y}, a, \left(-j\right) \cdot i\right) \cdot y} \]
                      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. Step-by-step derivation
                        1. Applied rewrites80.1%

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

                        if 6.2000000000000001e-144 < i < 3.39999999999999997e136

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

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

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

                        Alternative 5: 68.0% accurate, 1.1× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right)\\ t_2 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\ \mathbf{if}\;i \leq -8.9 \cdot 10^{+102}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;i \leq 6.2 \cdot 10^{-144}:\\ \;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\right)\\ \mathbf{elif}\;i \leq 3.4 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b c i j)
                         :precision binary64
                         (let* ((t_1 (fma (- t) a (* z y))) (t_2 (* (fma (- y) j (* b t)) i)))
                           (if (<= i -8.9e+102)
                             t_2
                             (if (<= i 6.2e-144)
                               (fma t_1 x (* (fma (- z) b (* j a)) c))
                               (if (<= i 3.4e+136) (fma t_1 x (* (fma (- i) y (* c a)) j)) 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 = fma(-t, a, (z * y));
                        	double t_2 = fma(-y, j, (b * t)) * i;
                        	double tmp;
                        	if (i <= -8.9e+102) {
                        		tmp = t_2;
                        	} else if (i <= 6.2e-144) {
                        		tmp = fma(t_1, x, (fma(-z, b, (j * a)) * c));
                        	} else if (i <= 3.4e+136) {
                        		tmp = fma(t_1, x, (fma(-i, y, (c * a)) * j));
                        	} else {
                        		tmp = t_2;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b, c, i, j)
                        	t_1 = fma(Float64(-t), a, Float64(z * y))
                        	t_2 = Float64(fma(Float64(-y), j, Float64(b * t)) * i)
                        	tmp = 0.0
                        	if (i <= -8.9e+102)
                        		tmp = t_2;
                        	elseif (i <= 6.2e-144)
                        		tmp = fma(t_1, x, Float64(fma(Float64(-z), b, Float64(j * a)) * c));
                        	elseif (i <= 3.4e+136)
                        		tmp = fma(t_1, x, Float64(fma(Float64(-i), y, Float64(c * a)) * j));
                        	else
                        		tmp = t_2;
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -8.9e+102], t$95$2, If[LessEqual[i, 6.2e-144], N[(t$95$1 * x + N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.4e+136], N[(t$95$1 * x + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right)\\
                        t_2 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
                        \mathbf{if}\;i \leq -8.9 \cdot 10^{+102}:\\
                        \;\;\;\;t\_2\\
                        
                        \mathbf{elif}\;i \leq 6.2 \cdot 10^{-144}:\\
                        \;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\right)\\
                        
                        \mathbf{elif}\;i \leq 3.4 \cdot 10^{+136}:\\
                        \;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_2\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if i < -8.8999999999999999e102 or 3.39999999999999997e136 < i

                          1. Initial program 55.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 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. Applied rewrites74.3%

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

                            if -8.8999999999999999e102 < i < 6.2000000000000001e-144

                            1. Initial program 76.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 rewrites77.7%

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

                            if 6.2000000000000001e-144 < i < 3.39999999999999997e136

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

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

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

                            Alternative 6: 65.0% accurate, 1.2× speedup?

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

                              1. Initial program 70.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 c around inf

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

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

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

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

                                if -1.0600000000000001e35 < b < 1.1499999999999999e121

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

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

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

                                  if 1.1499999999999999e121 < b

                                  1. Initial program 68.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 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. Applied rewrites74.6%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                  5. Recombined 3 regimes into one program.
                                  6. Add Preprocessing

                                  Alternative 7: 50.6% accurate, 1.2× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+246}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+14}:\\ \;\;\;\;\mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-172}:\\ \;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-140}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+73}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b c i j)
                                   :precision binary64
                                   (let* ((t_1 (* (fma (- c) b (* y x)) z)))
                                     (if (<= z -7.2e+246)
                                       t_1
                                       (if (<= z -4.2e+14)
                                         (* (fma (- j) i (* z x)) y)
                                         (if (<= z 1.9e-172)
                                           (* (fma (- t) x (* j c)) a)
                                           (if (<= z 2.6e-140)
                                             (* (fma (- a) x (* i b)) t)
                                             (if (<= z 5.3e+73) (* (fma (- i) y (* c a)) j) 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(-c, b, (y * x)) * z;
                                  	double tmp;
                                  	if (z <= -7.2e+246) {
                                  		tmp = t_1;
                                  	} else if (z <= -4.2e+14) {
                                  		tmp = fma(-j, i, (z * x)) * y;
                                  	} else if (z <= 1.9e-172) {
                                  		tmp = fma(-t, x, (j * c)) * a;
                                  	} else if (z <= 2.6e-140) {
                                  		tmp = fma(-a, x, (i * b)) * t;
                                  	} else if (z <= 5.3e+73) {
                                  		tmp = fma(-i, y, (c * a)) * j;
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a, b, c, i, j)
                                  	t_1 = Float64(fma(Float64(-c), b, Float64(y * x)) * z)
                                  	tmp = 0.0
                                  	if (z <= -7.2e+246)
                                  		tmp = t_1;
                                  	elseif (z <= -4.2e+14)
                                  		tmp = Float64(fma(Float64(-j), i, Float64(z * x)) * y);
                                  	elseif (z <= 1.9e-172)
                                  		tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a);
                                  	elseif (z <= 2.6e-140)
                                  		tmp = Float64(fma(Float64(-a), x, Float64(i * b)) * t);
                                  	elseif (z <= 5.3e+73)
                                  		tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j);
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.2e+246], t$95$1, If[LessEqual[z, -4.2e+14], N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.9e-172], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 2.6e-140], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 5.3e+73], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
                                  \mathbf{if}\;z \leq -7.2 \cdot 10^{+246}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;z \leq -4.2 \cdot 10^{+14}:\\
                                  \;\;\;\;\mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
                                  
                                  \mathbf{elif}\;z \leq 1.9 \cdot 10^{-172}:\\
                                  \;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
                                  
                                  \mathbf{elif}\;z \leq 2.6 \cdot 10^{-140}:\\
                                  \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
                                  
                                  \mathbf{elif}\;z \leq 5.3 \cdot 10^{+73}:\\
                                  \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 5 regimes
                                  2. if z < -7.2e246 or 5.29999999999999996e73 < z

                                    1. Initial program 63.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 z around inf

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

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

                                      if -7.2e246 < z < -4.2e14

                                      1. Initial program 58.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 y around inf

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

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

                                        if -4.2e14 < z < 1.89999999999999993e-172

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

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

                                          if 1.89999999999999993e-172 < z < 2.5999999999999998e-140

                                          1. Initial program 81.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. Applied rewrites78.3%

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

                                            if 2.5999999999999998e-140 < z < 5.29999999999999996e73

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

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

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j} \]
                                            5. Recombined 5 regimes into one program.
                                            6. Add Preprocessing

                                            Alternative 8: 59.7% accurate, 1.4× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+140} \lor \neg \left(z \leq 3.7 \cdot 10^{+74}\right):\\ \;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot a\right), j, \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 (or (<= z -1.5e+140) (not (<= z 3.7e+74)))
                                               (* (fma (- c) b (* y x)) z)
                                               (fma (fma (- y) i (* c a)) j (* (* (- 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 ((z <= -1.5e+140) || !(z <= 3.7e+74)) {
                                            		tmp = fma(-c, b, (y * x)) * z;
                                            	} else {
                                            		tmp = fma(fma(-y, i, (c * a)), j, ((-a * t) * x));
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x, y, z, t, a, b, c, i, j)
                                            	tmp = 0.0
                                            	if ((z <= -1.5e+140) || !(z <= 3.7e+74))
                                            		tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z);
                                            	else
                                            		tmp = fma(fma(Float64(-y), i, Float64(c * a)), j, Float64(Float64(Float64(-a) * t) * x));
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -1.5e+140], N[Not[LessEqual[z, 3.7e+74]], $MachinePrecision]], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;z \leq -1.5 \cdot 10^{+140} \lor \neg \left(z \leq 3.7 \cdot 10^{+74}\right):\\
                                            \;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot a\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if z < -1.49999999999999998e140 or 3.7000000000000001e74 < z

                                              1. Initial program 60.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 z around inf

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

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

                                                if -1.49999999999999998e140 < z < 3.7000000000000001e74

                                                1. Initial program 78.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(t \cdot x\right)\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
                                                4. Step-by-step derivation
                                                  1. Applied rewrites56.5%

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

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

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

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

                                                      \[\leadsto \color{blue}{\left(c \cdot a - y \cdot i\right) \cdot j} + \left(-t\right) \cdot \left(a \cdot x\right) \]
                                                    5. lower-fma.f6457.1

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

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

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

                                                Alternative 9: 57.1% accurate, 1.4× speedup?

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

                                                  1. Initial program 71.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 c around inf

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

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

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

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

                                                    if -1.99999999999999995e38 < b < 3.79999999999999969e104

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

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

                                                        \[\leadsto \color{blue}{\left(z \cdot x\right) \cdot y} + j \cdot \left(c \cdot a - y \cdot i\right) \]

                                                      if 3.79999999999999969e104 < b

                                                      1. Initial program 68.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 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. Applied rewrites68.9%

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                                      5. Recombined 3 regimes into one program.
                                                      6. Add Preprocessing

                                                      Alternative 10: 28.7% accurate, 1.5× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ t_2 := \left(b \cdot t\right) \cdot i\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{+23}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -1.8 \cdot 10^{-106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-190}:\\ \;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-130}:\\ \;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\ \mathbf{elif}\;b \leq 5 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                      (FPCore (x y z t a b c i j)
                                                       :precision binary64
                                                       (let* ((t_1 (* (* z y) x)) (t_2 (* (* b t) i)))
                                                         (if (<= b -3.5e+23)
                                                           t_2
                                                           (if (<= b -1.8e-106)
                                                             t_1
                                                             (if (<= b -2.25e-190)
                                                               (* (* (- t) x) a)
                                                               (if (<= b 4.2e-130) (* (* (- y) j) i) (if (<= b 5e+115) 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 = (z * y) * x;
                                                      	double t_2 = (b * t) * i;
                                                      	double tmp;
                                                      	if (b <= -3.5e+23) {
                                                      		tmp = t_2;
                                                      	} else if (b <= -1.8e-106) {
                                                      		tmp = t_1;
                                                      	} else if (b <= -2.25e-190) {
                                                      		tmp = (-t * x) * a;
                                                      	} else if (b <= 4.2e-130) {
                                                      		tmp = (-y * j) * i;
                                                      	} else if (b <= 5e+115) {
                                                      		tmp = 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 = (z * y) * x
                                                          t_2 = (b * t) * i
                                                          if (b <= (-3.5d+23)) then
                                                              tmp = t_2
                                                          else if (b <= (-1.8d-106)) then
                                                              tmp = t_1
                                                          else if (b <= (-2.25d-190)) then
                                                              tmp = (-t * x) * a
                                                          else if (b <= 4.2d-130) then
                                                              tmp = (-y * j) * i
                                                          else if (b <= 5d+115) then
                                                              tmp = 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 = (z * y) * x;
                                                      	double t_2 = (b * t) * i;
                                                      	double tmp;
                                                      	if (b <= -3.5e+23) {
                                                      		tmp = t_2;
                                                      	} else if (b <= -1.8e-106) {
                                                      		tmp = t_1;
                                                      	} else if (b <= -2.25e-190) {
                                                      		tmp = (-t * x) * a;
                                                      	} else if (b <= 4.2e-130) {
                                                      		tmp = (-y * j) * i;
                                                      	} else if (b <= 5e+115) {
                                                      		tmp = t_1;
                                                      	} else {
                                                      		tmp = t_2;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x, y, z, t, a, b, c, i, j):
                                                      	t_1 = (z * y) * x
                                                      	t_2 = (b * t) * i
                                                      	tmp = 0
                                                      	if b <= -3.5e+23:
                                                      		tmp = t_2
                                                      	elif b <= -1.8e-106:
                                                      		tmp = t_1
                                                      	elif b <= -2.25e-190:
                                                      		tmp = (-t * x) * a
                                                      	elif b <= 4.2e-130:
                                                      		tmp = (-y * j) * i
                                                      	elif b <= 5e+115:
                                                      		tmp = t_1
                                                      	else:
                                                      		tmp = t_2
                                                      	return tmp
                                                      
                                                      function code(x, y, z, t, a, b, c, i, j)
                                                      	t_1 = Float64(Float64(z * y) * x)
                                                      	t_2 = Float64(Float64(b * t) * i)
                                                      	tmp = 0.0
                                                      	if (b <= -3.5e+23)
                                                      		tmp = t_2;
                                                      	elseif (b <= -1.8e-106)
                                                      		tmp = t_1;
                                                      	elseif (b <= -2.25e-190)
                                                      		tmp = Float64(Float64(Float64(-t) * x) * a);
                                                      	elseif (b <= 4.2e-130)
                                                      		tmp = Float64(Float64(Float64(-y) * j) * i);
                                                      	elseif (b <= 5e+115)
                                                      		tmp = 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 = (z * y) * x;
                                                      	t_2 = (b * t) * i;
                                                      	tmp = 0.0;
                                                      	if (b <= -3.5e+23)
                                                      		tmp = t_2;
                                                      	elseif (b <= -1.8e-106)
                                                      		tmp = t_1;
                                                      	elseif (b <= -2.25e-190)
                                                      		tmp = (-t * x) * a;
                                                      	elseif (b <= 4.2e-130)
                                                      		tmp = (-y * j) * i;
                                                      	elseif (b <= 5e+115)
                                                      		tmp = 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[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[b, -3.5e+23], t$95$2, If[LessEqual[b, -1.8e-106], t$95$1, If[LessEqual[b, -2.25e-190], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 4.2e-130], N[(N[((-y) * j), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[b, 5e+115], t$95$1, t$95$2]]]]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_1 := \left(z \cdot y\right) \cdot x\\
                                                      t_2 := \left(b \cdot t\right) \cdot i\\
                                                      \mathbf{if}\;b \leq -3.5 \cdot 10^{+23}:\\
                                                      \;\;\;\;t\_2\\
                                                      
                                                      \mathbf{elif}\;b \leq -1.8 \cdot 10^{-106}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      \mathbf{elif}\;b \leq -2.25 \cdot 10^{-190}:\\
                                                      \;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
                                                      
                                                      \mathbf{elif}\;b \leq 4.2 \cdot 10^{-130}:\\
                                                      \;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\
                                                      
                                                      \mathbf{elif}\;b \leq 5 \cdot 10^{+115}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_2\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 4 regimes
                                                      2. if b < -3.5000000000000002e23 or 5.00000000000000008e115 < b

                                                        1. Initial program 70.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 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. Applied rewrites47.2%

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

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

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

                                                                \[\leadsto \color{blue}{\left(b \cdot t\right) \cdot i} \]

                                                              if -3.5000000000000002e23 < b < -1.80000000000000006e-106 or 4.20000000000000004e-130 < b < 5.00000000000000008e115

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

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

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

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

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

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

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

                                                                  if -1.80000000000000006e-106 < b < -2.2500000000000001e-190

                                                                  1. Initial program 67.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. Applied rewrites51.0%

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

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

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

                                                                      if -2.2500000000000001e-190 < b < 4.20000000000000004e-130

                                                                      1. Initial program 72.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 j around inf

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

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

                                                                          \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(j \cdot y\right)\right)} \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites37.3%

                                                                            \[\leadsto \left(\left(-y\right) \cdot j\right) \cdot \color{blue}{i} \]
                                                                        4. Recombined 4 regimes into one program.
                                                                        5. Add Preprocessing

                                                                        Alternative 11: 51.6% accurate, 1.6× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\ \mathbf{if}\;x \leq -3.1 \cdot 10^{+71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-175}:\\ \;\;\;\;\mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+28}:\\ \;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\ \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 (* z y)) x)))
                                                                           (if (<= x -3.1e+71)
                                                                             t_1
                                                                             (if (<= x -5e-175)
                                                                               (* (fma (- z) b (* j a)) c)
                                                                               (if (<= x 1.6e+28) (* (fma (- y) j (* b t)) i) 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, (z * y)) * x;
                                                                        	double tmp;
                                                                        	if (x <= -3.1e+71) {
                                                                        		tmp = t_1;
                                                                        	} else if (x <= -5e-175) {
                                                                        		tmp = fma(-z, b, (j * a)) * c;
                                                                        	} else if (x <= 1.6e+28) {
                                                                        		tmp = fma(-y, j, (b * t)) * i;
                                                                        	} 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(z * y)) * x)
                                                                        	tmp = 0.0
                                                                        	if (x <= -3.1e+71)
                                                                        		tmp = t_1;
                                                                        	elseif (x <= -5e-175)
                                                                        		tmp = Float64(fma(Float64(-z), b, Float64(j * a)) * c);
                                                                        	elseif (x <= 1.6e+28)
                                                                        		tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i);
                                                                        	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[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -3.1e+71], t$95$1, If[LessEqual[x, -5e-175], N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 1.6e+28], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
                                                                        \mathbf{if}\;x \leq -3.1 \cdot 10^{+71}:\\
                                                                        \;\;\;\;t\_1\\
                                                                        
                                                                        \mathbf{elif}\;x \leq -5 \cdot 10^{-175}:\\
                                                                        \;\;\;\;\mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\\
                                                                        
                                                                        \mathbf{elif}\;x \leq 1.6 \cdot 10^{+28}:\\
                                                                        \;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;t\_1\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 3 regimes
                                                                        2. if x < -3.10000000000000018e71 or 1.6e28 < x

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

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

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

                                                                            if -3.10000000000000018e71 < x < -5e-175

                                                                            1. Initial program 74.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 c around inf

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

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

                                                                              if -5e-175 < x < 1.6e28

                                                                              1. Initial program 70.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 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. Applied rewrites61.8%

                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                                                              5. Recombined 3 regimes into one program.
                                                                              6. Add Preprocessing

                                                                              Alternative 12: 50.5% accurate, 1.6× speedup?

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

                                                                                1. Initial program 63.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 z around inf

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

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

                                                                                  if -7.2e246 < z < -1.15e26

                                                                                  1. Initial program 55.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 y around inf

                                                                                    \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites67.0%

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

                                                                                    if -1.15e26 < z < 5.29999999999999996e73

                                                                                    1. Initial program 80.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 j around inf

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

                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j} \]
                                                                                    5. Recombined 3 regimes into one program.
                                                                                    6. Add Preprocessing

                                                                                    Alternative 13: 42.3% accurate, 1.6× speedup?

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

                                                                                      1. Initial program 69.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 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. Applied rewrites52.7%

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

                                                                                        if -4.0000000000000001e-13 < t < -1.01999999999999997e-177

                                                                                        1. Initial program 78.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 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. Applied rewrites41.3%

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

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

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

                                                                                            if -1.01999999999999997e-177 < t < 1.2599999999999999e-130

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

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

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

                                                                                                \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(j \cdot y\right)\right)} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites38.0%

                                                                                                  \[\leadsto \left(\left(-y\right) \cdot j\right) \cdot \color{blue}{i} \]
                                                                                              4. Recombined 3 regimes into one program.
                                                                                              5. Add Preprocessing

                                                                                              Alternative 14: 29.1% accurate, 1.7× speedup?

                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ t_2 := \left(b \cdot t\right) \cdot i\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{+23}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -4.7 \cdot 10^{-222}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-130}:\\ \;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\ \mathbf{elif}\;b \leq 5 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                                              (FPCore (x y z t a b c i j)
                                                                                               :precision binary64
                                                                                               (let* ((t_1 (* (* z y) x)) (t_2 (* (* b t) i)))
                                                                                                 (if (<= b -3.5e+23)
                                                                                                   t_2
                                                                                                   (if (<= b -4.7e-222)
                                                                                                     t_1
                                                                                                     (if (<= b 4.2e-130) (* (* (- y) j) i) (if (<= b 5e+115) 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 = (z * y) * x;
                                                                                              	double t_2 = (b * t) * i;
                                                                                              	double tmp;
                                                                                              	if (b <= -3.5e+23) {
                                                                                              		tmp = t_2;
                                                                                              	} else if (b <= -4.7e-222) {
                                                                                              		tmp = t_1;
                                                                                              	} else if (b <= 4.2e-130) {
                                                                                              		tmp = (-y * j) * i;
                                                                                              	} else if (b <= 5e+115) {
                                                                                              		tmp = 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 = (z * y) * x
                                                                                                  t_2 = (b * t) * i
                                                                                                  if (b <= (-3.5d+23)) then
                                                                                                      tmp = t_2
                                                                                                  else if (b <= (-4.7d-222)) then
                                                                                                      tmp = t_1
                                                                                                  else if (b <= 4.2d-130) then
                                                                                                      tmp = (-y * j) * i
                                                                                                  else if (b <= 5d+115) then
                                                                                                      tmp = 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 = (z * y) * x;
                                                                                              	double t_2 = (b * t) * i;
                                                                                              	double tmp;
                                                                                              	if (b <= -3.5e+23) {
                                                                                              		tmp = t_2;
                                                                                              	} else if (b <= -4.7e-222) {
                                                                                              		tmp = t_1;
                                                                                              	} else if (b <= 4.2e-130) {
                                                                                              		tmp = (-y * j) * i;
                                                                                              	} else if (b <= 5e+115) {
                                                                                              		tmp = t_1;
                                                                                              	} else {
                                                                                              		tmp = t_2;
                                                                                              	}
                                                                                              	return tmp;
                                                                                              }
                                                                                              
                                                                                              def code(x, y, z, t, a, b, c, i, j):
                                                                                              	t_1 = (z * y) * x
                                                                                              	t_2 = (b * t) * i
                                                                                              	tmp = 0
                                                                                              	if b <= -3.5e+23:
                                                                                              		tmp = t_2
                                                                                              	elif b <= -4.7e-222:
                                                                                              		tmp = t_1
                                                                                              	elif b <= 4.2e-130:
                                                                                              		tmp = (-y * j) * i
                                                                                              	elif b <= 5e+115:
                                                                                              		tmp = t_1
                                                                                              	else:
                                                                                              		tmp = t_2
                                                                                              	return tmp
                                                                                              
                                                                                              function code(x, y, z, t, a, b, c, i, j)
                                                                                              	t_1 = Float64(Float64(z * y) * x)
                                                                                              	t_2 = Float64(Float64(b * t) * i)
                                                                                              	tmp = 0.0
                                                                                              	if (b <= -3.5e+23)
                                                                                              		tmp = t_2;
                                                                                              	elseif (b <= -4.7e-222)
                                                                                              		tmp = t_1;
                                                                                              	elseif (b <= 4.2e-130)
                                                                                              		tmp = Float64(Float64(Float64(-y) * j) * i);
                                                                                              	elseif (b <= 5e+115)
                                                                                              		tmp = 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 = (z * y) * x;
                                                                                              	t_2 = (b * t) * i;
                                                                                              	tmp = 0.0;
                                                                                              	if (b <= -3.5e+23)
                                                                                              		tmp = t_2;
                                                                                              	elseif (b <= -4.7e-222)
                                                                                              		tmp = t_1;
                                                                                              	elseif (b <= 4.2e-130)
                                                                                              		tmp = (-y * j) * i;
                                                                                              	elseif (b <= 5e+115)
                                                                                              		tmp = 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[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[b, -3.5e+23], t$95$2, If[LessEqual[b, -4.7e-222], t$95$1, If[LessEqual[b, 4.2e-130], N[(N[((-y) * j), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[b, 5e+115], t$95$1, t$95$2]]]]]]
                                                                                              
                                                                                              \begin{array}{l}
                                                                                              
                                                                                              \\
                                                                                              \begin{array}{l}
                                                                                              t_1 := \left(z \cdot y\right) \cdot x\\
                                                                                              t_2 := \left(b \cdot t\right) \cdot i\\
                                                                                              \mathbf{if}\;b \leq -3.5 \cdot 10^{+23}:\\
                                                                                              \;\;\;\;t\_2\\
                                                                                              
                                                                                              \mathbf{elif}\;b \leq -4.7 \cdot 10^{-222}:\\
                                                                                              \;\;\;\;t\_1\\
                                                                                              
                                                                                              \mathbf{elif}\;b \leq 4.2 \cdot 10^{-130}:\\
                                                                                              \;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\
                                                                                              
                                                                                              \mathbf{elif}\;b \leq 5 \cdot 10^{+115}:\\
                                                                                              \;\;\;\;t\_1\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;t\_2\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 3 regimes
                                                                                              2. if b < -3.5000000000000002e23 or 5.00000000000000008e115 < b

                                                                                                1. Initial program 70.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 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. Applied rewrites47.2%

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

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

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

                                                                                                        \[\leadsto \color{blue}{\left(b \cdot t\right) \cdot i} \]

                                                                                                      if -3.5000000000000002e23 < b < -4.6999999999999997e-222 or 4.20000000000000004e-130 < b < 5.00000000000000008e115

                                                                                                      1. Initial program 75.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 y around inf

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

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

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

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

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

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

                                                                                                          if -4.6999999999999997e-222 < b < 4.20000000000000004e-130

                                                                                                          1. Initial program 71.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 j around inf

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

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

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

                                                                                                                \[\leadsto \left(\left(-y\right) \cdot j\right) \cdot \color{blue}{i} \]
                                                                                                            4. Recombined 3 regimes into one program.
                                                                                                            5. Add Preprocessing

                                                                                                            Alternative 15: 51.2% accurate, 2.0× speedup?

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

                                                                                                              1. Initial program 73.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 x around inf

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

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

                                                                                                                if -1.54999999999999988e46 < x < 1.6e28

                                                                                                                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 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. Applied rewrites55.9%

                                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                                                                                                5. Recombined 2 regimes into one program.
                                                                                                                6. Final simplification60.5%

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

                                                                                                                Alternative 16: 52.1% accurate, 2.0× speedup?

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

                                                                                                                  1. Initial program 67.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 j around inf

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

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

                                                                                                                    if -1.45000000000000002e-67 < j < 8.4000000000000001e83

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

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

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

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

                                                                                                                    Alternative 17: 51.9% accurate, 2.0× speedup?

                                                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+84} \lor \neg \left(z \leq 5.3 \cdot 10^{+73}\right):\\ \;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\ \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 (<= z -5.8e+84) (not (<= z 5.3e+73)))
                                                                                                                       (* (fma (- c) b (* y x)) z)
                                                                                                                       (* (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 ((z <= -5.8e+84) || !(z <= 5.3e+73)) {
                                                                                                                    		tmp = fma(-c, b, (y * x)) * z;
                                                                                                                    	} 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 ((z <= -5.8e+84) || !(z <= 5.3e+73))
                                                                                                                    		tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z);
                                                                                                                    	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[z, -5.8e+84], N[Not[LessEqual[z, 5.3e+73]], $MachinePrecision]], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    
                                                                                                                    \\
                                                                                                                    \begin{array}{l}
                                                                                                                    \mathbf{if}\;z \leq -5.8 \cdot 10^{+84} \lor \neg \left(z \leq 5.3 \cdot 10^{+73}\right):\\
                                                                                                                    \;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
                                                                                                                    
                                                                                                                    \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 z < -5.79999999999999977e84 or 5.29999999999999996e73 < z

                                                                                                                      1. Initial program 62.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 z around inf

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

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

                                                                                                                        if -5.79999999999999977e84 < z < 5.29999999999999996e73

                                                                                                                        1. Initial program 78.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 j around inf

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

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

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

                                                                                                                        Alternative 18: 51.3% accurate, 2.0× speedup?

                                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+60} \lor \neg \left(z \leq 3.4 \cdot 10^{-40}\right):\\ \;\;\;\;\mathsf{fma}\left(-c, b, 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 -7e+60) (not (<= z 3.4e-40)))
                                                                                                                           (* (fma (- c) b (* 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 <= -7e+60) || !(z <= 3.4e-40)) {
                                                                                                                        		tmp = fma(-c, b, (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 <= -7e+60) || !(z <= 3.4e-40))
                                                                                                                        		tmp = Float64(fma(Float64(-c), b, 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, -7e+60], N[Not[LessEqual[z, 3.4e-40]], $MachinePrecision]], N[(N[((-c) * b + 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 -7 \cdot 10^{+60} \lor \neg \left(z \leq 3.4 \cdot 10^{-40}\right):\\
                                                                                                                        \;\;\;\;\mathsf{fma}\left(-c, b, 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 < -7.0000000000000004e60 or 3.39999999999999984e-40 < z

                                                                                                                          1. Initial program 65.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 z around inf

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

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

                                                                                                                            if -7.0000000000000004e60 < z < 3.39999999999999984e-40

                                                                                                                            1. Initial program 79.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. Applied rewrites45.5%

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

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

                                                                                                                            Alternative 19: 29.3% accurate, 2.6× speedup?

                                                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+23} \lor \neg \left(b \leq 5 \cdot 10^{+115}\right):\\ \;\;\;\;\left(b \cdot t\right) \cdot i\\ \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 (<= b -3.5e+23) (not (<= b 5e+115))) (* (* b t) i) (* (* 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 ((b <= -3.5e+23) || !(b <= 5e+115)) {
                                                                                                                            		tmp = (b * t) * i;
                                                                                                                            	} 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 ((b <= (-3.5d+23)) .or. (.not. (b <= 5d+115))) then
                                                                                                                                    tmp = (b * t) * i
                                                                                                                                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 ((b <= -3.5e+23) || !(b <= 5e+115)) {
                                                                                                                            		tmp = (b * t) * i;
                                                                                                                            	} else {
                                                                                                                            		tmp = (z * y) * x;
                                                                                                                            	}
                                                                                                                            	return tmp;
                                                                                                                            }
                                                                                                                            
                                                                                                                            def code(x, y, z, t, a, b, c, i, j):
                                                                                                                            	tmp = 0
                                                                                                                            	if (b <= -3.5e+23) or not (b <= 5e+115):
                                                                                                                            		tmp = (b * t) * i
                                                                                                                            	else:
                                                                                                                            		tmp = (z * y) * x
                                                                                                                            	return tmp
                                                                                                                            
                                                                                                                            function code(x, y, z, t, a, b, c, i, j)
                                                                                                                            	tmp = 0.0
                                                                                                                            	if ((b <= -3.5e+23) || !(b <= 5e+115))
                                                                                                                            		tmp = Float64(Float64(b * t) * i);
                                                                                                                            	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 ((b <= -3.5e+23) || ~((b <= 5e+115)))
                                                                                                                            		tmp = (b * t) * i;
                                                                                                                            	else
                                                                                                                            		tmp = (z * y) * x;
                                                                                                                            	end
                                                                                                                            	tmp_2 = tmp;
                                                                                                                            end
                                                                                                                            
                                                                                                                            code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -3.5e+23], N[Not[LessEqual[b, 5e+115]], $MachinePrecision]], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]
                                                                                                                            
                                                                                                                            \begin{array}{l}
                                                                                                                            
                                                                                                                            \\
                                                                                                                            \begin{array}{l}
                                                                                                                            \mathbf{if}\;b \leq -3.5 \cdot 10^{+23} \lor \neg \left(b \leq 5 \cdot 10^{+115}\right):\\
                                                                                                                            \;\;\;\;\left(b \cdot t\right) \cdot i\\
                                                                                                                            
                                                                                                                            \mathbf{else}:\\
                                                                                                                            \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                                                                                                            
                                                                                                                            
                                                                                                                            \end{array}
                                                                                                                            \end{array}
                                                                                                                            
                                                                                                                            Derivation
                                                                                                                            1. Split input into 2 regimes
                                                                                                                            2. if b < -3.5000000000000002e23 or 5.00000000000000008e115 < b

                                                                                                                              1. Initial program 70.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 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. Applied rewrites47.2%

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

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

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

                                                                                                                                      \[\leadsto \color{blue}{\left(b \cdot t\right) \cdot i} \]

                                                                                                                                    if -3.5000000000000002e23 < b < 5.00000000000000008e115

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

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

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

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

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

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

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

                                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+23} \lor \neg \left(b \leq 5 \cdot 10^{+115}\right):\\ \;\;\;\;\left(b \cdot t\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \]
                                                                                                                                      8. Add Preprocessing

                                                                                                                                      Alternative 20: 21.8% accurate, 5.5× speedup?

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

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

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

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

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

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