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

Percentage Accurate: 73.2% → 82.0%
Time: 12.7s
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.2% 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: 82.0% accurate, 0.5× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot a \]
      2. Taylor expanded in c around inf

        \[\leadsto \left(c \cdot \left(j + -1 \cdot \frac{t \cdot x}{c}\right)\right) \cdot a \]
      3. Step-by-step derivation
        1. Applied rewrites54.0%

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

      Alternative 2: 82.5% accurate, 0.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(-t, \frac{x}{c}, j\right) \cdot c\right) \cdot a\\ \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 (- t) (/ x c) j) c) a))))
      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(-t, (x / c), j) * c) * a;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i, j)
      	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
      	tmp = 0.0
      	if (t_1 <= Inf)
      		tmp = t_1;
      	else
      		tmp = Float64(Float64(fma(Float64(-t), Float64(x / c), j) * c) * a);
      	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[(N[((-t) * N[(x / c), $MachinePrecision] + j), $MachinePrecision] * c), $MachinePrecision] * a), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
      \mathbf{if}\;t\_1 \leq \infty:\\
      \;\;\;\;t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\mathsf{fma}\left(-t, \frac{x}{c}, j\right) \cdot c\right) \cdot a\\
      
      
      \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 93.9%

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

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

        1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot a \]
          2. Taylor expanded in c around inf

            \[\leadsto \left(c \cdot \left(j + -1 \cdot \frac{t \cdot x}{c}\right)\right) \cdot a \]
          3. Step-by-step derivation
            1. Applied rewrites54.0%

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

          Alternative 3: 54.4% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.4e95 < c < -4.40000000000000021e-74 or 6.99999999999999973e-102 < c < 1.79999999999999992e161

            1. Initial program 82.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 i around 0

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

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

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

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

              if -4.40000000000000021e-74 < c < 6.99999999999999973e-102

              1. Initial program 81.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 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. *-commutativeN/A

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(-j, i, \color{blue}{z \cdot x}\right) \cdot y \]
                9. lower-*.f6459.0

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

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

            Alternative 4: 69.7% accurate, 1.2× speedup?

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

              1. Initial program 68.7%

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

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

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

              if -1e3 < c < 1.4e-155

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

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

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

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

            Alternative 5: 66.9% accurate, 1.2× speedup?

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

              1. Initial program 63.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(a \cdot j - b \cdot z\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -5400 < c < 1.05e161

              1. Initial program 80.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 c around 0

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

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

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

            Alternative 6: 61.0% accurate, 1.3× speedup?

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

              1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(c \cdot \left(j + -1 \cdot \frac{t \cdot x}{c}\right)\right) \cdot a \]
              7. Step-by-step derivation
                1. Applied rewrites84.3%

                  \[\leadsto \left(\left(j - \frac{x \cdot t}{c}\right) \cdot c\right) \cdot a \]

                if -2.2e52 < a < 2.44999999999999994e39

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.44999999999999994e39 < a < 1.5000000000000001e175

                  1. Initial program 60.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 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 rewrites70.0%

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

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

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

                    if 1.5000000000000001e175 < a

                    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot a \]
                      2. Taylor expanded in c around inf

                        \[\leadsto \left(c \cdot \left(j + -1 \cdot \frac{t \cdot x}{c}\right)\right) \cdot a \]
                      3. Step-by-step derivation
                        1. Applied rewrites73.7%

                          \[\leadsto \left(\mathsf{fma}\left(-t, \frac{x}{c}, j\right) \cdot c\right) \cdot a \]
                      4. Recombined 4 regimes into one program.
                      5. Final simplification71.6%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{+52}:\\ \;\;\;\;\left(\left(j - \frac{x \cdot t}{c}\right) \cdot c\right) \cdot a\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{+39}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, j, z \cdot x\right), y, \left(i \cdot t\right) \cdot b\right)\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+175}:\\ \;\;\;\;\mathsf{fma}\left(j \cdot a, c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(-t, \frac{x}{c}, j\right) \cdot c\right) \cdot a\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 7: 46.3% accurate, 1.4× speedup?

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

                        1. Initial program 68.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -1.06e96 < z < 1.70000000000000001e-121

                        1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.70000000000000001e-121 < z < 5.8000000000000001e31

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(-i\right) \cdot \color{blue}{\left(j \cdot y\right)} \]

                          if 5.8000000000000001e31 < z < 7.8000000000000005e170

                          1. Initial program 47.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}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(j \cdot c\right) \cdot a \]
                          8. Recombined 4 regimes into one program.
                          9. Final simplification53.0%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.06 \cdot 10^{+96}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-121}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+31}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+170}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 8: 52.2% accurate, 1.5× speedup?

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

                            1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(c \cdot \left(j + -1 \cdot \frac{t \cdot x}{c}\right)\right) \cdot a \]
                            7. Step-by-step derivation
                              1. Applied rewrites72.2%

                                \[\leadsto \left(\left(j - \frac{x \cdot t}{c}\right) \cdot c\right) \cdot a \]

                              if -1.80000000000000005e-5 < a < 7.49999999999999941e26

                              1. Initial program 82.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 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 9: 52.2% accurate, 1.5× speedup?

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

                              1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(c \cdot \left(j + -1 \cdot \frac{t \cdot x}{c}\right)\right) \cdot a \]
                              7. Step-by-step derivation
                                1. Applied rewrites81.1%

                                  \[\leadsto \left(\left(j - \frac{x \cdot t}{c}\right) \cdot c\right) \cdot a \]

                                if -1.80000000000000005e-5 < a < 7.20000000000000048e26

                                1. Initial program 82.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 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                if 7.20000000000000048e26 < a

                                1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot a \]
                                  2. Taylor expanded in c around inf

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

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

                                  Alternative 10: 29.5% accurate, 1.6× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -9.3 \cdot 10^{-70}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;c \leq -6 \cdot 10^{-169}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;c \leq 2.3 \cdot 10^{-265}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+67}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b c i j)
                                   :precision binary64
                                   (if (<= c -9.3e-70)
                                     (* (* j c) a)
                                     (if (<= c -6e-169)
                                       (* (* y x) z)
                                       (if (<= c 2.3e-265)
                                         (* (- i) (* j y))
                                         (if (<= c 8.5e+67) (* (* z y) x) (* (* (- c) z) b))))))
                                  double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                  	double tmp;
                                  	if (c <= -9.3e-70) {
                                  		tmp = (j * c) * a;
                                  	} else if (c <= -6e-169) {
                                  		tmp = (y * x) * z;
                                  	} else if (c <= 2.3e-265) {
                                  		tmp = -i * (j * y);
                                  	} else if (c <= 8.5e+67) {
                                  		tmp = (z * y) * x;
                                  	} else {
                                  		tmp = (-c * z) * b;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(x, y, z, t, a, b, c, i, j)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8), intent (in) :: z
                                      real(8), intent (in) :: t
                                      real(8), intent (in) :: a
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: c
                                      real(8), intent (in) :: i
                                      real(8), intent (in) :: j
                                      real(8) :: tmp
                                      if (c <= (-9.3d-70)) then
                                          tmp = (j * c) * a
                                      else if (c <= (-6d-169)) then
                                          tmp = (y * x) * z
                                      else if (c <= 2.3d-265) then
                                          tmp = -i * (j * y)
                                      else if (c <= 8.5d+67) then
                                          tmp = (z * y) * x
                                      else
                                          tmp = (-c * z) * b
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                  	double tmp;
                                  	if (c <= -9.3e-70) {
                                  		tmp = (j * c) * a;
                                  	} else if (c <= -6e-169) {
                                  		tmp = (y * x) * z;
                                  	} else if (c <= 2.3e-265) {
                                  		tmp = -i * (j * y);
                                  	} else if (c <= 8.5e+67) {
                                  		tmp = (z * y) * x;
                                  	} else {
                                  		tmp = (-c * z) * b;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a, b, c, i, j):
                                  	tmp = 0
                                  	if c <= -9.3e-70:
                                  		tmp = (j * c) * a
                                  	elif c <= -6e-169:
                                  		tmp = (y * x) * z
                                  	elif c <= 2.3e-265:
                                  		tmp = -i * (j * y)
                                  	elif c <= 8.5e+67:
                                  		tmp = (z * y) * x
                                  	else:
                                  		tmp = (-c * z) * b
                                  	return tmp
                                  
                                  function code(x, y, z, t, a, b, c, i, j)
                                  	tmp = 0.0
                                  	if (c <= -9.3e-70)
                                  		tmp = Float64(Float64(j * c) * a);
                                  	elseif (c <= -6e-169)
                                  		tmp = Float64(Float64(y * x) * z);
                                  	elseif (c <= 2.3e-265)
                                  		tmp = Float64(Float64(-i) * Float64(j * y));
                                  	elseif (c <= 8.5e+67)
                                  		tmp = Float64(Float64(z * y) * x);
                                  	else
                                  		tmp = Float64(Float64(Float64(-c) * z) * b);
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                  	tmp = 0.0;
                                  	if (c <= -9.3e-70)
                                  		tmp = (j * c) * a;
                                  	elseif (c <= -6e-169)
                                  		tmp = (y * x) * z;
                                  	elseif (c <= 2.3e-265)
                                  		tmp = -i * (j * y);
                                  	elseif (c <= 8.5e+67)
                                  		tmp = (z * y) * x;
                                  	else
                                  		tmp = (-c * z) * b;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -9.3e-70], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, -6e-169], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 2.3e-265], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8.5e+67], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]]]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;c \leq -9.3 \cdot 10^{-70}:\\
                                  \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                  
                                  \mathbf{elif}\;c \leq -6 \cdot 10^{-169}:\\
                                  \;\;\;\;\left(y \cdot x\right) \cdot z\\
                                  
                                  \mathbf{elif}\;c \leq 2.3 \cdot 10^{-265}:\\
                                  \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
                                  
                                  \mathbf{elif}\;c \leq 8.5 \cdot 10^{+67}:\\
                                  \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 5 regimes
                                  2. if c < -9.3e-70

                                    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -9.3e-70 < c < -5.9999999999999998e-169

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -5.9999999999999998e-169 < c < 2.2999999999999999e-265

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \left(-i\right) \cdot \color{blue}{\left(j \cdot y\right)} \]

                                          if 2.2999999999999999e-265 < c < 8.50000000000000038e67

                                          1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 8.50000000000000038e67 < c

                                            1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \left(\left(-c\right) \cdot z\right) \cdot b \]
                                            8. Recombined 5 regimes into one program.
                                            9. Final simplification44.0%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9.3 \cdot 10^{-70}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;c \leq -6 \cdot 10^{-169}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;c \leq 2.3 \cdot 10^{-265}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+67}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \end{array} \]
                                            10. Add Preprocessing

                                            Alternative 11: 42.4% 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 -1.8 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-266}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-150}:\\ \;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a b c i j)
                                             :precision binary64
                                             (let* ((t_1 (* (fma (- a) x (* i b)) t)))
                                               (if (<= t -1.8e+40)
                                                 t_1
                                                 (if (<= t 9e-266)
                                                   (* (* j c) a)
                                                   (if (<= t 1.02e-150) (* (* (- b) z) c) t_1)))))
                                            double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                            	double t_1 = fma(-a, x, (i * b)) * t;
                                            	double tmp;
                                            	if (t <= -1.8e+40) {
                                            		tmp = t_1;
                                            	} else if (t <= 9e-266) {
                                            		tmp = (j * c) * a;
                                            	} else if (t <= 1.02e-150) {
                                            		tmp = (-b * z) * c;
                                            	} 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 <= -1.8e+40)
                                            		tmp = t_1;
                                            	elseif (t <= 9e-266)
                                            		tmp = Float64(Float64(j * c) * a);
                                            	elseif (t <= 1.02e-150)
                                            		tmp = Float64(Float64(Float64(-b) * z) * c);
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.8e+40], t$95$1, If[LessEqual[t, 9e-266], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, 1.02e-150], N[(N[((-b) * z), $MachinePrecision] * c), $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 -1.8 \cdot 10^{+40}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;t \leq 9 \cdot 10^{-266}:\\
                                            \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                            
                                            \mathbf{elif}\;t \leq 1.02 \cdot 10^{-150}:\\
                                            \;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if t < -1.79999999999999998e40 or 1.0199999999999999e-150 < t

                                              1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -1.79999999999999998e40 < t < 9.0000000000000006e-266

                                              1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 9.0000000000000006e-266 < t < 1.0199999999999999e-150

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \left(\left(-b\right) \cdot z\right) \cdot \color{blue}{c} \]
                                                10. Recombined 3 regimes into one program.
                                                11. Final simplification48.4%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-266}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-150}:\\ \;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \end{array} \]
                                                12. Add Preprocessing

                                                Alternative 12: 53.0% accurate, 2.0× speedup?

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

                                                  1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if -1.12e23 < c < 7.7999999999999999e-6

                                                  1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 13: 52.3% accurate, 2.0× speedup?

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

                                                  1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if -1.80000000000000005e-5 < a < 7.49999999999999941e26

                                                  1. Initial program 82.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 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 14: 49.9% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if -8.0000000000000003e161 < t < 3.0999999999999998e-72

                                                  1. Initial program 75.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. *-commutativeN/A

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(-j, i, \color{blue}{z \cdot x}\right) \cdot y \]
                                                    9. lower-*.f6447.8

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

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

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

                                                Alternative 15: 28.3% accurate, 2.0× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y \cdot x\right) \cdot z\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{+156}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{-75}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{+251}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a b c i j)
                                                 :precision binary64
                                                 (let* ((t_1 (* (* y x) z)))
                                                   (if (<= x -5.2e+156)
                                                     t_1
                                                     (if (<= x 1.55e-75)
                                                       (* (* j c) a)
                                                       (if (<= x 4.1e+251) t_1 (* (* (- t) x) a))))))
                                                double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                	double t_1 = (y * x) * z;
                                                	double tmp;
                                                	if (x <= -5.2e+156) {
                                                		tmp = t_1;
                                                	} else if (x <= 1.55e-75) {
                                                		tmp = (j * c) * a;
                                                	} else if (x <= 4.1e+251) {
                                                		tmp = t_1;
                                                	} else {
                                                		tmp = (-t * x) * a;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                module fmin_fmax_functions
                                                    implicit none
                                                    private
                                                    public fmax
                                                    public fmin
                                                
                                                    interface fmax
                                                        module procedure fmax88
                                                        module procedure fmax44
                                                        module procedure fmax84
                                                        module procedure fmax48
                                                    end interface
                                                    interface fmin
                                                        module procedure fmin88
                                                        module procedure fmin44
                                                        module procedure fmin84
                                                        module procedure fmin48
                                                    end interface
                                                contains
                                                    real(8) function fmax88(x, y) result (res)
                                                        real(8), intent (in) :: x
                                                        real(8), intent (in) :: y
                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                    end function
                                                    real(4) function fmax44(x, y) result (res)
                                                        real(4), intent (in) :: x
                                                        real(4), intent (in) :: y
                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                    end function
                                                    real(8) function fmax84(x, y) result(res)
                                                        real(8), intent (in) :: x
                                                        real(4), intent (in) :: y
                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                    end function
                                                    real(8) function fmax48(x, y) result(res)
                                                        real(4), intent (in) :: x
                                                        real(8), intent (in) :: y
                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                    end function
                                                    real(8) function fmin88(x, y) result (res)
                                                        real(8), intent (in) :: x
                                                        real(8), intent (in) :: y
                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                    end function
                                                    real(4) function fmin44(x, y) result (res)
                                                        real(4), intent (in) :: x
                                                        real(4), intent (in) :: y
                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                    end function
                                                    real(8) function fmin84(x, y) result(res)
                                                        real(8), intent (in) :: x
                                                        real(4), intent (in) :: y
                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                    end function
                                                    real(8) function fmin48(x, y) result(res)
                                                        real(4), intent (in) :: x
                                                        real(8), intent (in) :: y
                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                    end function
                                                end module
                                                
                                                real(8) function code(x, y, z, t, a, b, c, i, j)
                                                use fmin_fmax_functions
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    real(8), intent (in) :: z
                                                    real(8), intent (in) :: t
                                                    real(8), intent (in) :: a
                                                    real(8), intent (in) :: b
                                                    real(8), intent (in) :: c
                                                    real(8), intent (in) :: i
                                                    real(8), intent (in) :: j
                                                    real(8) :: t_1
                                                    real(8) :: tmp
                                                    t_1 = (y * x) * z
                                                    if (x <= (-5.2d+156)) then
                                                        tmp = t_1
                                                    else if (x <= 1.55d-75) then
                                                        tmp = (j * c) * a
                                                    else if (x <= 4.1d+251) then
                                                        tmp = t_1
                                                    else
                                                        tmp = (-t * x) * a
                                                    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 = (y * x) * z;
                                                	double tmp;
                                                	if (x <= -5.2e+156) {
                                                		tmp = t_1;
                                                	} else if (x <= 1.55e-75) {
                                                		tmp = (j * c) * a;
                                                	} else if (x <= 4.1e+251) {
                                                		tmp = t_1;
                                                	} else {
                                                		tmp = (-t * x) * a;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t, a, b, c, i, j):
                                                	t_1 = (y * x) * z
                                                	tmp = 0
                                                	if x <= -5.2e+156:
                                                		tmp = t_1
                                                	elif x <= 1.55e-75:
                                                		tmp = (j * c) * a
                                                	elif x <= 4.1e+251:
                                                		tmp = t_1
                                                	else:
                                                		tmp = (-t * x) * a
                                                	return tmp
                                                
                                                function code(x, y, z, t, a, b, c, i, j)
                                                	t_1 = Float64(Float64(y * x) * z)
                                                	tmp = 0.0
                                                	if (x <= -5.2e+156)
                                                		tmp = t_1;
                                                	elseif (x <= 1.55e-75)
                                                		tmp = Float64(Float64(j * c) * a);
                                                	elseif (x <= 4.1e+251)
                                                		tmp = t_1;
                                                	else
                                                		tmp = Float64(Float64(Float64(-t) * x) * a);
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                	t_1 = (y * x) * z;
                                                	tmp = 0.0;
                                                	if (x <= -5.2e+156)
                                                		tmp = t_1;
                                                	elseif (x <= 1.55e-75)
                                                		tmp = (j * c) * a;
                                                	elseif (x <= 4.1e+251)
                                                		tmp = t_1;
                                                	else
                                                		tmp = (-t * x) * a;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[x, -5.2e+156], t$95$1, If[LessEqual[x, 1.55e-75], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 4.1e+251], t$95$1, N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision]]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_1 := \left(y \cdot x\right) \cdot z\\
                                                \mathbf{if}\;x \leq -5.2 \cdot 10^{+156}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                \mathbf{elif}\;x \leq 1.55 \cdot 10^{-75}:\\
                                                \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                                
                                                \mathbf{elif}\;x \leq 4.1 \cdot 10^{+251}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if x < -5.20000000000000037e156 or 1.55000000000000003e-75 < x < 4.1000000000000001e251

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -5.20000000000000037e156 < x < 1.55000000000000003e-75

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if 4.1000000000000001e251 < x

                                                      1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot a \]
                                                      8. Recombined 3 regimes into one program.
                                                      9. Final simplification39.7%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{+156}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{-75}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{+251}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\ \end{array} \]
                                                      10. Add Preprocessing

                                                      Alternative 16: 29.9% accurate, 2.1× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t \cdot b\right) \cdot i\\ \mathbf{if}\;b \leq -1 \cdot 10^{+103}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-55}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+132}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                      (FPCore (x y z t a b c i j)
                                                       :precision binary64
                                                       (let* ((t_1 (* (* t b) i)))
                                                         (if (<= b -1e+103)
                                                           t_1
                                                           (if (<= b 5.5e-55)
                                                             (* (* j c) a)
                                                             (if (<= b 1.2e+132) (* (* z y) x) t_1)))))
                                                      double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                      	double t_1 = (t * b) * i;
                                                      	double tmp;
                                                      	if (b <= -1e+103) {
                                                      		tmp = t_1;
                                                      	} else if (b <= 5.5e-55) {
                                                      		tmp = (j * c) * a;
                                                      	} else if (b <= 1.2e+132) {
                                                      		tmp = (z * y) * x;
                                                      	} else {
                                                      		tmp = t_1;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      module fmin_fmax_functions
                                                          implicit none
                                                          private
                                                          public fmax
                                                          public fmin
                                                      
                                                          interface fmax
                                                              module procedure fmax88
                                                              module procedure fmax44
                                                              module procedure fmax84
                                                              module procedure fmax48
                                                          end interface
                                                          interface fmin
                                                              module procedure fmin88
                                                              module procedure fmin44
                                                              module procedure fmin84
                                                              module procedure fmin48
                                                          end interface
                                                      contains
                                                          real(8) function fmax88(x, y) result (res)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                          end function
                                                          real(4) function fmax44(x, y) result (res)
                                                              real(4), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmax84(x, y) result(res)
                                                              real(8), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmax48(x, y) result(res)
                                                              real(4), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin88(x, y) result (res)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                          end function
                                                          real(4) function fmin44(x, y) result (res)
                                                              real(4), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin84(x, y) result(res)
                                                              real(8), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin48(x, y) result(res)
                                                              real(4), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                          end function
                                                      end module
                                                      
                                                      real(8) function code(x, y, z, t, a, b, c, i, j)
                                                      use fmin_fmax_functions
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          real(8), intent (in) :: z
                                                          real(8), intent (in) :: t
                                                          real(8), intent (in) :: a
                                                          real(8), intent (in) :: b
                                                          real(8), intent (in) :: c
                                                          real(8), intent (in) :: i
                                                          real(8), intent (in) :: j
                                                          real(8) :: t_1
                                                          real(8) :: tmp
                                                          t_1 = (t * b) * i
                                                          if (b <= (-1d+103)) then
                                                              tmp = t_1
                                                          else if (b <= 5.5d-55) then
                                                              tmp = (j * c) * a
                                                          else if (b <= 1.2d+132) then
                                                              tmp = (z * y) * x
                                                          else
                                                              tmp = t_1
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                      	double t_1 = (t * b) * i;
                                                      	double tmp;
                                                      	if (b <= -1e+103) {
                                                      		tmp = t_1;
                                                      	} else if (b <= 5.5e-55) {
                                                      		tmp = (j * c) * a;
                                                      	} else if (b <= 1.2e+132) {
                                                      		tmp = (z * y) * x;
                                                      	} else {
                                                      		tmp = t_1;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x, y, z, t, a, b, c, i, j):
                                                      	t_1 = (t * b) * i
                                                      	tmp = 0
                                                      	if b <= -1e+103:
                                                      		tmp = t_1
                                                      	elif b <= 5.5e-55:
                                                      		tmp = (j * c) * a
                                                      	elif b <= 1.2e+132:
                                                      		tmp = (z * y) * x
                                                      	else:
                                                      		tmp = t_1
                                                      	return tmp
                                                      
                                                      function code(x, y, z, t, a, b, c, i, j)
                                                      	t_1 = Float64(Float64(t * b) * i)
                                                      	tmp = 0.0
                                                      	if (b <= -1e+103)
                                                      		tmp = t_1;
                                                      	elseif (b <= 5.5e-55)
                                                      		tmp = Float64(Float64(j * c) * a);
                                                      	elseif (b <= 1.2e+132)
                                                      		tmp = Float64(Float64(z * y) * x);
                                                      	else
                                                      		tmp = t_1;
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                      	t_1 = (t * b) * i;
                                                      	tmp = 0.0;
                                                      	if (b <= -1e+103)
                                                      		tmp = t_1;
                                                      	elseif (b <= 5.5e-55)
                                                      		tmp = (j * c) * a;
                                                      	elseif (b <= 1.2e+132)
                                                      		tmp = (z * y) * x;
                                                      	else
                                                      		tmp = t_1;
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(t * b), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[b, -1e+103], t$95$1, If[LessEqual[b, 5.5e-55], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 1.2e+132], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_1 := \left(t \cdot b\right) \cdot i\\
                                                      \mathbf{if}\;b \leq -1 \cdot 10^{+103}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      \mathbf{elif}\;b \leq 5.5 \cdot 10^{-55}:\\
                                                      \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                                      
                                                      \mathbf{elif}\;b \leq 1.2 \cdot 10^{+132}:\\
                                                      \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 3 regimes
                                                      2. if b < -1e103 or 1.2000000000000001e132 < b

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if -1e103 < b < 5.4999999999999999e-55

                                                          1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 5.4999999999999999e-55 < b < 1.2000000000000001e132

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
                                                            10. Recombined 3 regimes into one program.
                                                            11. Final simplification39.5%

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+103}:\\ \;\;\;\;\left(t \cdot b\right) \cdot i\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-55}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+132}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot b\right) \cdot i\\ \end{array} \]
                                                            12. Add Preprocessing

                                                            Alternative 17: 29.5% accurate, 2.4× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -9.3 \cdot 10^{-70}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;c \leq 2.35 \cdot 10^{+48}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \end{array} \end{array} \]
                                                            (FPCore (x y z t a b c i j)
                                                             :precision binary64
                                                             (if (<= c -9.3e-70)
                                                               (* (* j c) a)
                                                               (if (<= c 2.35e+48) (* (* y x) z) (* (* (- c) z) b))))
                                                            double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                            	double tmp;
                                                            	if (c <= -9.3e-70) {
                                                            		tmp = (j * c) * a;
                                                            	} else if (c <= 2.35e+48) {
                                                            		tmp = (y * x) * z;
                                                            	} else {
                                                            		tmp = (-c * z) * b;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            module fmin_fmax_functions
                                                                implicit none
                                                                private
                                                                public fmax
                                                                public fmin
                                                            
                                                                interface fmax
                                                                    module procedure fmax88
                                                                    module procedure fmax44
                                                                    module procedure fmax84
                                                                    module procedure fmax48
                                                                end interface
                                                                interface fmin
                                                                    module procedure fmin88
                                                                    module procedure fmin44
                                                                    module procedure fmin84
                                                                    module procedure fmin48
                                                                end interface
                                                            contains
                                                                real(8) function fmax88(x, y) result (res)
                                                                    real(8), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                end function
                                                                real(4) function fmax44(x, y) result (res)
                                                                    real(4), intent (in) :: x
                                                                    real(4), intent (in) :: y
                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmax84(x, y) result(res)
                                                                    real(8), intent (in) :: x
                                                                    real(4), intent (in) :: y
                                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmax48(x, y) result(res)
                                                                    real(4), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmin88(x, y) result (res)
                                                                    real(8), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                end function
                                                                real(4) function fmin44(x, y) result (res)
                                                                    real(4), intent (in) :: x
                                                                    real(4), intent (in) :: y
                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmin84(x, y) result(res)
                                                                    real(8), intent (in) :: x
                                                                    real(4), intent (in) :: y
                                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmin48(x, y) result(res)
                                                                    real(4), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                end function
                                                            end module
                                                            
                                                            real(8) function code(x, y, z, t, a, b, c, i, j)
                                                            use fmin_fmax_functions
                                                                real(8), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                real(8), intent (in) :: z
                                                                real(8), intent (in) :: t
                                                                real(8), intent (in) :: a
                                                                real(8), intent (in) :: b
                                                                real(8), intent (in) :: c
                                                                real(8), intent (in) :: i
                                                                real(8), intent (in) :: j
                                                                real(8) :: tmp
                                                                if (c <= (-9.3d-70)) then
                                                                    tmp = (j * c) * a
                                                                else if (c <= 2.35d+48) then
                                                                    tmp = (y * x) * z
                                                                else
                                                                    tmp = (-c * z) * b
                                                                end if
                                                                code = tmp
                                                            end function
                                                            
                                                            public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                            	double tmp;
                                                            	if (c <= -9.3e-70) {
                                                            		tmp = (j * c) * a;
                                                            	} else if (c <= 2.35e+48) {
                                                            		tmp = (y * x) * z;
                                                            	} else {
                                                            		tmp = (-c * z) * b;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            def code(x, y, z, t, a, b, c, i, j):
                                                            	tmp = 0
                                                            	if c <= -9.3e-70:
                                                            		tmp = (j * c) * a
                                                            	elif c <= 2.35e+48:
                                                            		tmp = (y * x) * z
                                                            	else:
                                                            		tmp = (-c * z) * b
                                                            	return tmp
                                                            
                                                            function code(x, y, z, t, a, b, c, i, j)
                                                            	tmp = 0.0
                                                            	if (c <= -9.3e-70)
                                                            		tmp = Float64(Float64(j * c) * a);
                                                            	elseif (c <= 2.35e+48)
                                                            		tmp = Float64(Float64(y * x) * z);
                                                            	else
                                                            		tmp = Float64(Float64(Float64(-c) * z) * b);
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                            	tmp = 0.0;
                                                            	if (c <= -9.3e-70)
                                                            		tmp = (j * c) * a;
                                                            	elseif (c <= 2.35e+48)
                                                            		tmp = (y * x) * z;
                                                            	else
                                                            		tmp = (-c * z) * b;
                                                            	end
                                                            	tmp_2 = tmp;
                                                            end
                                                            
                                                            code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -9.3e-70], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 2.35e+48], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            \mathbf{if}\;c \leq -9.3 \cdot 10^{-70}:\\
                                                            \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                                            
                                                            \mathbf{elif}\;c \leq 2.35 \cdot 10^{+48}:\\
                                                            \;\;\;\;\left(y \cdot x\right) \cdot z\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 3 regimes
                                                            2. if c < -9.3e-70

                                                              1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                if -9.3e-70 < c < 2.35000000000000006e48

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if 2.35000000000000006e48 < c

                                                                  1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \left(\left(-c\right) \cdot z\right) \cdot b \]
                                                                  8. Recombined 3 regimes into one program.
                                                                  9. Final simplification40.2%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9.3 \cdot 10^{-70}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;c \leq 2.35 \cdot 10^{+48}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \end{array} \]
                                                                  10. Add Preprocessing

                                                                  Alternative 18: 30.4% accurate, 2.6× speedup?

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

                                                                    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if -1e103 < b < 3.2000000000000001e72

                                                                      1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \left(j \cdot c\right) \cdot a \]
                                                                      8. Recombined 2 regimes into one program.
                                                                      9. Final simplification36.8%

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+103} \lor \neg \left(b \leq 3.2 \cdot 10^{+72}\right):\\ \;\;\;\;\left(t \cdot b\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \end{array} \]
                                                                      10. Add Preprocessing

                                                                      Alternative 19: 28.2% accurate, 2.6× speedup?

                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{+156}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{-75}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \end{array} \]
                                                                      (FPCore (x y z t a b c i j)
                                                                       :precision binary64
                                                                       (if (<= x -5.2e+156)
                                                                         (* (* y x) z)
                                                                         (if (<= x 1.55e-75) (* (* j c) a) (* (* z y) x))))
                                                                      double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                      	double tmp;
                                                                      	if (x <= -5.2e+156) {
                                                                      		tmp = (y * x) * z;
                                                                      	} else if (x <= 1.55e-75) {
                                                                      		tmp = (j * c) * a;
                                                                      	} else {
                                                                      		tmp = (z * y) * x;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      module fmin_fmax_functions
                                                                          implicit none
                                                                          private
                                                                          public fmax
                                                                          public fmin
                                                                      
                                                                          interface fmax
                                                                              module procedure fmax88
                                                                              module procedure fmax44
                                                                              module procedure fmax84
                                                                              module procedure fmax48
                                                                          end interface
                                                                          interface fmin
                                                                              module procedure fmin88
                                                                              module procedure fmin44
                                                                              module procedure fmin84
                                                                              module procedure fmin48
                                                                          end interface
                                                                      contains
                                                                          real(8) function fmax88(x, y) result (res)
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(4) function fmax44(x, y) result (res)
                                                                              real(4), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmax84(x, y) result(res)
                                                                              real(8), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmax48(x, y) result(res)
                                                                              real(4), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin88(x, y) result (res)
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(4) function fmin44(x, y) result (res)
                                                                              real(4), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin84(x, y) result(res)
                                                                              real(8), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin48(x, y) result(res)
                                                                              real(4), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                          end function
                                                                      end module
                                                                      
                                                                      real(8) function code(x, y, z, t, a, b, c, i, j)
                                                                      use fmin_fmax_functions
                                                                          real(8), intent (in) :: x
                                                                          real(8), intent (in) :: y
                                                                          real(8), intent (in) :: z
                                                                          real(8), intent (in) :: t
                                                                          real(8), intent (in) :: a
                                                                          real(8), intent (in) :: b
                                                                          real(8), intent (in) :: c
                                                                          real(8), intent (in) :: i
                                                                          real(8), intent (in) :: j
                                                                          real(8) :: tmp
                                                                          if (x <= (-5.2d+156)) then
                                                                              tmp = (y * x) * z
                                                                          else if (x <= 1.55d-75) then
                                                                              tmp = (j * c) * a
                                                                          else
                                                                              tmp = (z * y) * x
                                                                          end if
                                                                          code = tmp
                                                                      end function
                                                                      
                                                                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                      	double tmp;
                                                                      	if (x <= -5.2e+156) {
                                                                      		tmp = (y * x) * z;
                                                                      	} else if (x <= 1.55e-75) {
                                                                      		tmp = (j * c) * a;
                                                                      	} else {
                                                                      		tmp = (z * y) * x;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      def code(x, y, z, t, a, b, c, i, j):
                                                                      	tmp = 0
                                                                      	if x <= -5.2e+156:
                                                                      		tmp = (y * x) * z
                                                                      	elif x <= 1.55e-75:
                                                                      		tmp = (j * c) * a
                                                                      	else:
                                                                      		tmp = (z * y) * x
                                                                      	return tmp
                                                                      
                                                                      function code(x, y, z, t, a, b, c, i, j)
                                                                      	tmp = 0.0
                                                                      	if (x <= -5.2e+156)
                                                                      		tmp = Float64(Float64(y * x) * z);
                                                                      	elseif (x <= 1.55e-75)
                                                                      		tmp = Float64(Float64(j * c) * a);
                                                                      	else
                                                                      		tmp = Float64(Float64(z * y) * x);
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                      	tmp = 0.0;
                                                                      	if (x <= -5.2e+156)
                                                                      		tmp = (y * x) * z;
                                                                      	elseif (x <= 1.55e-75)
                                                                      		tmp = (j * c) * a;
                                                                      	else
                                                                      		tmp = (z * y) * x;
                                                                      	end
                                                                      	tmp_2 = tmp;
                                                                      end
                                                                      
                                                                      code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -5.2e+156], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 1.55e-75], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      \mathbf{if}\;x \leq -5.2 \cdot 10^{+156}:\\
                                                                      \;\;\;\;\left(y \cdot x\right) \cdot z\\
                                                                      
                                                                      \mathbf{elif}\;x \leq 1.55 \cdot 10^{-75}:\\
                                                                      \;\;\;\;\left(j \cdot c\right) \cdot a\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 3 regimes
                                                                      2. if x < -5.20000000000000037e156

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if -5.20000000000000037e156 < x < 1.55000000000000003e-75

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            if 1.55000000000000003e-75 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
                                                                            10. Recombined 3 regimes into one program.
                                                                            11. Final simplification38.0%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{+156}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{-75}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \]
                                                                            12. Add Preprocessing

                                                                            Alternative 20: 22.4% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              Developer Target 1: 59.1% accurate, 0.2× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\ \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\ \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                              (FPCore (x y z t a b c i j)
                                                                               :precision binary64
                                                                               (let* ((t_1 (* j (- (* c a) (* y i))))
                                                                                      (t_2
                                                                                       (+
                                                                                        (-
                                                                                         (* x (- (* y z) (* t a)))
                                                                                         (/
                                                                                          (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
                                                                                          (+ (* c z) (* t i))))
                                                                                        t_1)))
                                                                                 (if (< x -1.469694296777705e-64)
                                                                                   t_2
                                                                                   (if (< x 3.2113527362226803e-147)
                                                                                     (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
                                                                                     t_2))))
                                                                              double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                              	double t_1 = j * ((c * a) - (y * i));
                                                                              	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
                                                                              	double tmp;
                                                                              	if (x < -1.469694296777705e-64) {
                                                                              		tmp = t_2;
                                                                              	} else if (x < 3.2113527362226803e-147) {
                                                                              		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
                                                                              	} else {
                                                                              		tmp = t_2;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              module fmin_fmax_functions
                                                                                  implicit none
                                                                                  private
                                                                                  public fmax
                                                                                  public fmin
                                                                              
                                                                                  interface fmax
                                                                                      module procedure fmax88
                                                                                      module procedure fmax44
                                                                                      module procedure fmax84
                                                                                      module procedure fmax48
                                                                                  end interface
                                                                                  interface fmin
                                                                                      module procedure fmin88
                                                                                      module procedure fmin44
                                                                                      module procedure fmin84
                                                                                      module procedure fmin48
                                                                                  end interface
                                                                              contains
                                                                                  real(8) function fmax88(x, y) result (res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(4) function fmax44(x, y) result (res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmax84(x, y) result(res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmax48(x, y) result(res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin88(x, y) result (res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(4) function fmin44(x, y) result (res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin84(x, y) result(res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin48(x, y) result(res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                  end function
                                                                              end module
                                                                              
                                                                              real(8) function code(x, y, z, t, a, b, c, i, j)
                                                                              use fmin_fmax_functions
                                                                                  real(8), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  real(8), intent (in) :: z
                                                                                  real(8), intent (in) :: t
                                                                                  real(8), intent (in) :: a
                                                                                  real(8), intent (in) :: b
                                                                                  real(8), intent (in) :: c
                                                                                  real(8), intent (in) :: i
                                                                                  real(8), intent (in) :: j
                                                                                  real(8) :: t_1
                                                                                  real(8) :: t_2
                                                                                  real(8) :: tmp
                                                                                  t_1 = j * ((c * a) - (y * i))
                                                                                  t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
                                                                                  if (x < (-1.469694296777705d-64)) then
                                                                                      tmp = t_2
                                                                                  else if (x < 3.2113527362226803d-147) then
                                                                                      tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
                                                                                  else
                                                                                      tmp = t_2
                                                                                  end if
                                                                                  code = tmp
                                                                              end function
                                                                              
                                                                              public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                              	double t_1 = j * ((c * a) - (y * i));
                                                                              	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
                                                                              	double tmp;
                                                                              	if (x < -1.469694296777705e-64) {
                                                                              		tmp = t_2;
                                                                              	} else if (x < 3.2113527362226803e-147) {
                                                                              		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
                                                                              	} else {
                                                                              		tmp = t_2;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              def code(x, y, z, t, a, b, c, i, j):
                                                                              	t_1 = j * ((c * a) - (y * i))
                                                                              	t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1
                                                                              	tmp = 0
                                                                              	if x < -1.469694296777705e-64:
                                                                              		tmp = t_2
                                                                              	elif x < 3.2113527362226803e-147:
                                                                              		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
                                                                              	else:
                                                                              		tmp = t_2
                                                                              	return tmp
                                                                              
                                                                              function code(x, y, z, t, a, b, c, i, j)
                                                                              	t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i)))
                                                                              	t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1)
                                                                              	tmp = 0.0
                                                                              	if (x < -1.469694296777705e-64)
                                                                              		tmp = t_2;
                                                                              	elseif (x < 3.2113527362226803e-147)
                                                                              		tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1));
                                                                              	else
                                                                              		tmp = t_2;
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                              	t_1 = j * ((c * a) - (y * i));
                                                                              	t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1;
                                                                              	tmp = 0.0;
                                                                              	if (x < -1.469694296777705e-64)
                                                                              		tmp = t_2;
                                                                              	elseif (x < 3.2113527362226803e-147)
                                                                              		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
                                                                              	else
                                                                              		tmp = t_2;
                                                                              	end
                                                                              	tmp_2 = tmp;
                                                                              end
                                                                              
                                                                              code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
                                                                              t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
                                                                              \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
                                                                              \;\;\;\;t\_2\\
                                                                              
                                                                              \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
                                                                              \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;t\_2\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              

                                                                              Reproduce

                                                                              ?
                                                                              herbie shell --seed 2025008 
                                                                              (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)))))