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

Percentage Accurate: 72.5% → 83.0%
Time: 13.7s
Alternatives: 23
Speedup: 0.9×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
  (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 23 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: 72.5% 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: 83.0% accurate, 0.4× 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 2 \cdot 10^{+305}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1
         (+
          (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
          (* j (- (* c a) (* y i))))))
   (if (<= t_1 2e+305)
     t_1
     (*
      (fma
       c
       b
       (-
        (fma
         y
         x
         (/ (fma (fma (- i) y (* c a)) j (* (fma (- a) x (* i b)) t)) z))))
      (- z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
	double tmp;
	if (t_1 <= 2e+305) {
		tmp = t_1;
	} else {
		tmp = fma(c, b, -fma(y, x, (fma(fma(-i, y, (c * a)), j, (fma(-a, x, (i * b)) * t)) / z))) * -z;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
	tmp = 0.0
	if (t_1 <= 2e+305)
		tmp = t_1;
	else
		tmp = Float64(fma(c, b, Float64(-fma(y, x, Float64(fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(fma(Float64(-a), x, Float64(i * b)) * t)) / z)))) * Float64(-z));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+305], t$95$1, N[(N[(c * b + (-N[(y * x + N[(N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] * (-z)), $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 2 \cdot 10^{+305}:\\
\;\;\;\;t\_1\\

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


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

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

    if 1.9999999999999999e305 < (+.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 44.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 z around -inf

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

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

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

Alternative 2: 81.4% accurate, 0.5× speedup?

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

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

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


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

    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 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. distribute-lft-neg-inN/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq \infty:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-33}:\\
\;\;\;\;\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) + \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -102000

    1. Initial program 52.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 t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -102000 < z < 6.39999999999999954e-33

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

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

      \[\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) + \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]

    if 6.39999999999999954e-33 < z

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 56.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-175}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+88}:\\ \;\;\;\;\left(z \cdot t\right) \cdot \frac{\mathsf{fma}\left(-x, a, i \cdot b\right)}{z}\\ \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 -5.5e+108)
     t_1
     (if (<= z 2.55e-175)
       (+ (* (* i t) b) (* j (- (* c a) (* y i))))
       (if (<= z 1.6e+88) (* (* z t) (/ (fma (- x) a (* i b)) z)) 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 <= -5.5e+108) {
		tmp = t_1;
	} else if (z <= 2.55e-175) {
		tmp = ((i * t) * b) + (j * ((c * a) - (y * i)));
	} else if (z <= 1.6e+88) {
		tmp = (z * t) * (fma(-x, a, (i * b)) / z);
	} 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 <= -5.5e+108)
		tmp = t_1;
	elseif (z <= 2.55e-175)
		tmp = Float64(Float64(Float64(i * t) * b) + Float64(j * Float64(Float64(c * a) - Float64(y * i))));
	elseif (z <= 1.6e+88)
		tmp = Float64(Float64(z * t) * Float64(fma(Float64(-x), a, Float64(i * b)) / z));
	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, -5.5e+108], t$95$1, If[LessEqual[z, 2.55e-175], N[(N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+88], N[(N[(z * t), $MachinePrecision] * N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $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 -5.5 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-175}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+88}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \frac{\mathsf{fma}\left(-x, a, i \cdot b\right)}{z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.4999999999999998e108 or 1.5999999999999999e88 < z

    1. Initial program 57.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 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-*.f6476.8

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

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

    if -5.4999999999999998e108 < z < 2.55000000000000027e-175

    1. Initial program 83.3%

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

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

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

        \[\leadsto \color{blue}{\left(i \cdot t\right) \cdot b} + j \cdot \left(c \cdot a - y \cdot i\right) \]
      3. lower-*.f6463.1

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

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

    if 2.55000000000000027e-175 < z < 1.5999999999999999e88

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+108}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-175}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+88}:\\ \;\;\;\;\left(z \cdot t\right) \cdot \frac{\mathsf{fma}\left(-x, a, i \cdot b\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \end{array} \]
    9. Add Preprocessing

    Alternative 5: 71.7% accurate, 1.2× speedup?

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

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

        \[\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) + \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
      5. Taylor expanded in z around 0

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

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

        if -2.09999999999999983e119 < a < 1.50000000000000012e46

        1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 67.4% accurate, 1.2× speedup?

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

        1. Initial program 54.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 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-*.f6478.1

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

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

        if -1.1e133 < z < 1.5999999999999999e88

        1. Initial program 80.2%

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

          \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + \left(c \cdot \left(a \cdot j - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)\right) - -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)} \]
        4. Applied rewrites77.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) + \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
        5. Taylor expanded in z around 0

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

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

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

        Alternative 7: 68.7% accurate, 1.2× 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.1 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, \mathsf{fma}\left(-j, y, t \cdot b\right) \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, t\_1\right)\\ \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.1e+133)
             t_1
             (if (<= z 1.56e+88)
               (fma (fma (- x) t (* j c)) a (* (fma (- j) y (* t b)) i))
               (fma (fma (- i) y (* c a)) j t_1)))))
        double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        	double t_1 = fma(-b, c, (y * x)) * z;
        	double tmp;
        	if (z <= -1.1e+133) {
        		tmp = t_1;
        	} else if (z <= 1.56e+88) {
        		tmp = fma(fma(-x, t, (j * c)), a, (fma(-j, y, (t * b)) * i));
        	} else {
        		tmp = fma(fma(-i, y, (c * a)), j, 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.1e+133)
        		tmp = t_1;
        	elseif (z <= 1.56e+88)
        		tmp = fma(fma(Float64(-x), t, Float64(j * c)), a, Float64(fma(Float64(-j), y, Float64(t * b)) * i));
        	else
        		tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, 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.1e+133], t$95$1, If[LessEqual[z, 1.56e+88], N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-j) * y + N[(t * b), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + t$95$1), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
        \mathbf{if}\;z \leq -1.1 \cdot 10^{+133}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 1.56 \cdot 10^{+88}:\\
        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, \mathsf{fma}\left(-j, y, t \cdot b\right) \cdot i\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, t\_1\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -1.1e133

          1. Initial program 30.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 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-*.f6479.6

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

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

          if -1.1e133 < z < 1.56000000000000008e88

          1. Initial program 80.2%

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

            \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + \left(c \cdot \left(a \cdot j - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)\right) - -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)} \]
          4. Applied rewrites77.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) + \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
          5. Taylor expanded in z around 0

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

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

            if 1.56000000000000008e88 < z

            1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 30.1% accurate, 1.3× speedup?

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

            1. Initial program 66.6%

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

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

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

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

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

              if -2.95000000000000014e141 < x < -1.4e27 or 9.5999999999999999e76 < x

              1. Initial program 70.7%

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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.4%

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

                if -1.4e27 < x < -3.6999999999999999e-124 or 1.54999999999999994e-254 < x < 4.5e-120

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

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

                  if -3.6999999999999999e-124 < x < 1.54999999999999994e-254

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

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

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

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

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

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

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

                      if 4.5e-120 < x < 9.5999999999999999e76

                      1. Initial program 73.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 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-*.f6456.3

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.95 \cdot 10^{+141}:\\ \;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+27}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{-124}:\\ \;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{-254}:\\ \;\;\;\;\left(i \cdot y\right) \cdot \left(-j\right)\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-120}:\\ \;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+76}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 9: 56.6% 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 -5.5 \cdot 10^{+108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-175}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \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 -5.5e+108)
                           t_1
                           (if (<= z 2.55e-175)
                             (+ (* (* i t) b) (* j (- (* c a) (* y i))))
                             (if (<= z 1.56e+88) (* (fma (- a) x (* i b)) t) 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 <= -5.5e+108) {
                      		tmp = t_1;
                      	} else if (z <= 2.55e-175) {
                      		tmp = ((i * t) * b) + (j * ((c * a) - (y * i)));
                      	} else if (z <= 1.56e+88) {
                      		tmp = fma(-a, x, (i * b)) * t;
                      	} 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 <= -5.5e+108)
                      		tmp = t_1;
                      	elseif (z <= 2.55e-175)
                      		tmp = Float64(Float64(Float64(i * t) * b) + Float64(j * Float64(Float64(c * a) - Float64(y * i))));
                      	elseif (z <= 1.56e+88)
                      		tmp = Float64(fma(Float64(-a), x, Float64(i * b)) * t);
                      	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, -5.5e+108], t$95$1, If[LessEqual[z, 2.55e-175], N[(N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.56e+88], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $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 -5.5 \cdot 10^{+108}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;z \leq 2.55 \cdot 10^{-175}:\\
                      \;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\
                      
                      \mathbf{elif}\;z \leq 1.56 \cdot 10^{+88}:\\
                      \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -5.4999999999999998e108 or 1.56000000000000008e88 < z

                        1. Initial program 57.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 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-*.f6476.8

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

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

                        if -5.4999999999999998e108 < z < 2.55000000000000027e-175

                        1. Initial program 83.3%

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

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

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

                            \[\leadsto \color{blue}{\left(i \cdot t\right) \cdot b} + j \cdot \left(c \cdot a - y \cdot i\right) \]
                          3. lower-*.f6463.1

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

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

                        if 2.55000000000000027e-175 < z < 1.56000000000000008e88

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 10: 51.6% accurate, 1.4× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -2.25 \cdot 10^{+44}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-240}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-176}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+88}:\\ \;\;\;\;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 (- a) x (* i b)) t)) (t_2 (* (fma (- b) c (* y x)) z)))
                         (if (<= z -2.25e+44)
                           t_2
                           (if (<= z -4.2e-240)
                             t_1
                             (if (<= z 5.8e-176)
                               (* (fma (- i) y (* c a)) j)
                               (if (<= z 1.56e+88) 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(-a, x, (i * b)) * t;
                      	double t_2 = fma(-b, c, (y * x)) * z;
                      	double tmp;
                      	if (z <= -2.25e+44) {
                      		tmp = t_2;
                      	} else if (z <= -4.2e-240) {
                      		tmp = t_1;
                      	} else if (z <= 5.8e-176) {
                      		tmp = fma(-i, y, (c * a)) * j;
                      	} else if (z <= 1.56e+88) {
                      		tmp = t_1;
                      	} else {
                      		tmp = t_2;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i, j)
                      	t_1 = Float64(fma(Float64(-a), x, Float64(i * b)) * t)
                      	t_2 = Float64(fma(Float64(-b), c, Float64(y * x)) * z)
                      	tmp = 0.0
                      	if (z <= -2.25e+44)
                      		tmp = t_2;
                      	elseif (z <= -4.2e-240)
                      		tmp = t_1;
                      	elseif (z <= 5.8e-176)
                      		tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j);
                      	elseif (z <= 1.56e+88)
                      		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[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.25e+44], t$95$2, If[LessEqual[z, -4.2e-240], t$95$1, If[LessEqual[z, 5.8e-176], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 1.56e+88], t$95$1, t$95$2]]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
                      t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
                      \mathbf{if}\;z \leq -2.25 \cdot 10^{+44}:\\
                      \;\;\;\;t\_2\\
                      
                      \mathbf{elif}\;z \leq -4.2 \cdot 10^{-240}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;z \leq 5.8 \cdot 10^{-176}:\\
                      \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
                      
                      \mathbf{elif}\;z \leq 1.56 \cdot 10^{+88}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_2\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -2.25e44 or 1.56000000000000008e88 < z

                        1. Initial program 59.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 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-*.f6474.1

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

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

                        if -2.25e44 < z < -4.19999999999999987e-240 or 5.80000000000000012e-176 < z < 1.56000000000000008e88

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -4.19999999999999987e-240 < z < 5.80000000000000012e-176

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

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

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

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-240}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-176}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \end{array} \]
                          6. Add Preprocessing

                          Alternative 11: 30.2% accurate, 1.5× speedup?

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

                            1. Initial program 66.6%

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

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

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

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

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

                              if -2.95000000000000014e141 < x < -1.4e27 or 9.5999999999999999e76 < x

                              1. Initial program 70.7%

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

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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.4%

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

                                if -1.4e27 < x < -3.6999999999999999e-124

                                1. Initial program 86.7%

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

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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 rewrites42.2%

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

                                  if -3.6999999999999999e-124 < x < 2.0499999999999998e-115

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

                                    \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + \left(c \cdot \left(a \cdot j - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)\right) - -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)} \]
                                  4. Applied rewrites65.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) + \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                  5. Taylor expanded in j around -inf

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

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

                                      \[\leadsto \left(i \cdot y\right) \cdot \left(-j\right) \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites33.8%

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

                                      if 2.0499999999999998e-115 < x < 9.5999999999999999e76

                                      1. Initial program 73.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 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-*.f6456.3

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.95 \cdot 10^{+141}:\\ \;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+27}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{-124}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-115}:\\ \;\;\;\;\left(i \cdot y\right) \cdot \left(-j\right)\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+76}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 12: 51.7% accurate, 1.6× speedup?

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

                                        1. Initial program 59.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 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. distribute-lft-neg-inN/A

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

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

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

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

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

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

                                        if -28000 < y < -1.80000000000000008e-92

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \left(\left(-z\right) \cdot b\right) \cdot c + \color{blue}{\left(j \cdot c\right)} \cdot a \]
                                          4. lower-*.f6454.5

                                            \[\leadsto \left(\left(-z\right) \cdot b\right) \cdot c + \color{blue}{\left(j \cdot c\right)} \cdot a \]
                                        8. Applied rewrites54.5%

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

                                        if -1.80000000000000008e-92 < y < 1.4999999999999999e77

                                        1. Initial program 80.3%

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

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

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

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

                                      Alternative 13: 52.1% accurate, 1.6× speedup?

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

                                        1. Initial program 59.0%

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

                                          \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
                                        4. Step-by-step derivation
                                          1. *-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. distribute-lft-neg-inN/A

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

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

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

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

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

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

                                        if -2.10000000000000017e56 < y < -1.80000000000000008e-92

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

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

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

                                        if -1.80000000000000008e-92 < y < 1.4999999999999999e77

                                        1. Initial program 80.3%

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+56}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-92}:\\ \;\;\;\;\mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+77}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \end{array} \]
                                      5. Add Preprocessing

                                      Alternative 14: 52.1% accurate, 1.6× speedup?

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

                                        1. Initial program 59.6%

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

                                          \[\leadsto \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. distribute-lft-neg-inN/A

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

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

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

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

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

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

                                        if -6.0000000000000005e58 < y < -1.55000000000000006e-35

                                        1. Initial program 69.5%

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

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

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

                                        if -1.55000000000000006e-35 < y < 1.4999999999999999e77

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+58}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-35}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+77}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \end{array} \]
                                      5. Add Preprocessing

                                      Alternative 15: 38.6% accurate, 1.6× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y\right) \cdot z\\ \mathbf{if}\;x \leq -2.95 \cdot 10^{+141}:\\ \;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{+29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-119}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+76}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b c i j)
                                       :precision binary64
                                       (let* ((t_1 (* (* x y) z)))
                                         (if (<= x -2.95e+141)
                                           (* (* (- x) a) t)
                                           (if (<= x -6.5e+29)
                                             t_1
                                             (if (<= x 1.1e-119)
                                               (* (fma (- i) y (* c a)) j)
                                               (if (<= x 9.6e+76) (* (* t i) b) t_1))))))
                                      double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                      	double t_1 = (x * y) * z;
                                      	double tmp;
                                      	if (x <= -2.95e+141) {
                                      		tmp = (-x * a) * t;
                                      	} else if (x <= -6.5e+29) {
                                      		tmp = t_1;
                                      	} else if (x <= 1.1e-119) {
                                      		tmp = fma(-i, y, (c * a)) * j;
                                      	} else if (x <= 9.6e+76) {
                                      		tmp = (t * i) * b;
                                      	} else {
                                      		tmp = t_1;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x, y, z, t, a, b, c, i, j)
                                      	t_1 = Float64(Float64(x * y) * z)
                                      	tmp = 0.0
                                      	if (x <= -2.95e+141)
                                      		tmp = Float64(Float64(Float64(-x) * a) * t);
                                      	elseif (x <= -6.5e+29)
                                      		tmp = t_1;
                                      	elseif (x <= 1.1e-119)
                                      		tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j);
                                      	elseif (x <= 9.6e+76)
                                      		tmp = Float64(Float64(t * i) * b);
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[x, -2.95e+141], N[(N[((-x) * a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, -6.5e+29], t$95$1, If[LessEqual[x, 1.1e-119], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 9.6e+76], N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := \left(x \cdot y\right) \cdot z\\
                                      \mathbf{if}\;x \leq -2.95 \cdot 10^{+141}:\\
                                      \;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\
                                      
                                      \mathbf{elif}\;x \leq -6.5 \cdot 10^{+29}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;x \leq 1.1 \cdot 10^{-119}:\\
                                      \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
                                      
                                      \mathbf{elif}\;x \leq 9.6 \cdot 10^{+76}:\\
                                      \;\;\;\;\left(t \cdot i\right) \cdot b\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 4 regimes
                                      2. if x < -2.95000000000000014e141

                                        1. Initial program 66.6%

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

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

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

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

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

                                          if -2.95000000000000014e141 < x < -6.49999999999999971e29 or 9.5999999999999999e76 < x

                                          1. Initial program 71.8%

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

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

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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 rewrites53.7%

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

                                            if -6.49999999999999971e29 < x < 1.1e-119

                                            1. Initial program 73.2%

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

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

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

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

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

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

                                                if 1.1e-119 < x < 9.5999999999999999e76

                                                1. Initial program 73.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 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-*.f6456.3

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

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

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

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.95 \cdot 10^{+141}:\\ \;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{+29}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-119}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+76}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 16: 30.3% accurate, 1.7× speedup?

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

                                                  1. Initial program 71.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-*.f6447.7

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

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

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

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

                                                    if -7.20000000000000045e-4 < x < -3.6999999999999999e-124

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

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

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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.7%

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

                                                      if -3.6999999999999999e-124 < x < 2.0499999999999998e-115

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

                                                        \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + \left(c \cdot \left(a \cdot j - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)\right) - -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)} \]
                                                      4. Applied rewrites65.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) + \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                                      5. Taylor expanded in j around -inf

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

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

                                                          \[\leadsto \left(i \cdot y\right) \cdot \left(-j\right) \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites33.8%

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

                                                          if 2.0499999999999998e-115 < x < 9.5999999999999999e76

                                                          1. Initial program 73.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 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-*.f6456.3

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

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

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

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

                                                            if 9.5999999999999999e76 < x

                                                            1. Initial program 70.7%

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

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

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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 rewrites53.9%

                                                                \[\leadsto \left(x \cdot y\right) \cdot z \]
                                                            10. Recombined 5 regimes into one program.
                                                            11. Final simplification44.0%

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.00072:\\ \;\;\;\;\left(\left(-x\right) \cdot t\right) \cdot a\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{-124}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-115}:\\ \;\;\;\;\left(i \cdot y\right) \cdot \left(-j\right)\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+76}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \end{array} \]
                                                            12. Add Preprocessing

                                                            Alternative 17: 29.9% accurate, 1.7× speedup?

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

                                                              1. Initial program 66.6%

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

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

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

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

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

                                                                if -2.5499999999999999e141 < x < -1.11999999999999994e-54 or 9.5999999999999999e76 < x

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

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

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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.2%

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

                                                                  if -1.11999999999999994e-54 < x < -1.55000000000000004e-224

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

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

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

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

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

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

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

                                                                      if -1.55000000000000004e-224 < x < 9.5999999999999999e76

                                                                      1. Initial program 67.5%

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

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

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

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

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.55 \cdot 10^{+141}:\\ \;\;\;\;\left(\left(-x\right) \cdot t\right) \cdot a\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{-54}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{-224}:\\ \;\;\;\;\left(c \cdot j\right) \cdot a\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+76}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \end{array} \]
                                                                      10. Add Preprocessing

                                                                      Alternative 18: 50.5% accurate, 2.0× speedup?

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

                                                                        1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        if -1.8999999999999999e-70 < t < 3.6e-102

                                                                        1. Initial program 80.3%

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

                                                                          \[\leadsto \color{blue}{\left(-1 \cdot \left(i \cdot \left(j \cdot y\right)\right) + \left(c \cdot \left(a \cdot j - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)\right) - -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)} \]
                                                                        4. Applied rewrites75.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) + \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                                                        5. Taylor expanded in c around inf

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

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

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

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

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

                                                                          Alternative 19: 29.9% accurate, 2.1× speedup?

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

                                                                            1. Initial program 71.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-*.f6447.7

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

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

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

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

                                                                              if -7.20000000000000045e-4 < x < 4.70000000000000016e-120

                                                                              1. Initial program 72.9%

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

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

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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 rewrites30.4%

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

                                                                                if 4.70000000000000016e-120 < x < 9.5999999999999999e76

                                                                                1. Initial program 73.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 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-*.f6456.3

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

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

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

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

                                                                                  if 9.5999999999999999e76 < x

                                                                                  1. Initial program 70.7%

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

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

                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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 rewrites53.9%

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

                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.00072:\\ \;\;\;\;\left(\left(-x\right) \cdot t\right) \cdot a\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{-120}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+76}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot z\\ \end{array} \]
                                                                                  12. Add Preprocessing

                                                                                  Alternative 20: 29.4% accurate, 2.1× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t \cdot i\right) \cdot b\\ \mathbf{if}\;i \leq -2.6 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq -9.8 \cdot 10^{-277}:\\ \;\;\;\;\left(c \cdot j\right) \cdot a\\ \mathbf{elif}\;i \leq 1.95 \cdot 10^{-57}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                  (FPCore (x y z t a b c i j)
                                                                                   :precision binary64
                                                                                   (let* ((t_1 (* (* t i) b)))
                                                                                     (if (<= i -2.6e+59)
                                                                                       t_1
                                                                                       (if (<= i -9.8e-277)
                                                                                         (* (* c j) a)
                                                                                         (if (<= i 1.95e-57) (* (* z x) y) 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 * i) * b;
                                                                                  	double tmp;
                                                                                  	if (i <= -2.6e+59) {
                                                                                  		tmp = t_1;
                                                                                  	} else if (i <= -9.8e-277) {
                                                                                  		tmp = (c * j) * a;
                                                                                  	} else if (i <= 1.95e-57) {
                                                                                  		tmp = (z * x) * y;
                                                                                  	} 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 * i) * b
                                                                                      if (i <= (-2.6d+59)) then
                                                                                          tmp = t_1
                                                                                      else if (i <= (-9.8d-277)) then
                                                                                          tmp = (c * j) * a
                                                                                      else if (i <= 1.95d-57) then
                                                                                          tmp = (z * x) * y
                                                                                      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 * i) * b;
                                                                                  	double tmp;
                                                                                  	if (i <= -2.6e+59) {
                                                                                  		tmp = t_1;
                                                                                  	} else if (i <= -9.8e-277) {
                                                                                  		tmp = (c * j) * a;
                                                                                  	} else if (i <= 1.95e-57) {
                                                                                  		tmp = (z * x) * y;
                                                                                  	} else {
                                                                                  		tmp = t_1;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a, b, c, i, j):
                                                                                  	t_1 = (t * i) * b
                                                                                  	tmp = 0
                                                                                  	if i <= -2.6e+59:
                                                                                  		tmp = t_1
                                                                                  	elif i <= -9.8e-277:
                                                                                  		tmp = (c * j) * a
                                                                                  	elif i <= 1.95e-57:
                                                                                  		tmp = (z * x) * y
                                                                                  	else:
                                                                                  		tmp = t_1
                                                                                  	return tmp
                                                                                  
                                                                                  function code(x, y, z, t, a, b, c, i, j)
                                                                                  	t_1 = Float64(Float64(t * i) * b)
                                                                                  	tmp = 0.0
                                                                                  	if (i <= -2.6e+59)
                                                                                  		tmp = t_1;
                                                                                  	elseif (i <= -9.8e-277)
                                                                                  		tmp = Float64(Float64(c * j) * a);
                                                                                  	elseif (i <= 1.95e-57)
                                                                                  		tmp = Float64(Float64(z * x) * y);
                                                                                  	else
                                                                                  		tmp = t_1;
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                                  	t_1 = (t * i) * b;
                                                                                  	tmp = 0.0;
                                                                                  	if (i <= -2.6e+59)
                                                                                  		tmp = t_1;
                                                                                  	elseif (i <= -9.8e-277)
                                                                                  		tmp = (c * j) * a;
                                                                                  	elseif (i <= 1.95e-57)
                                                                                  		tmp = (z * x) * y;
                                                                                  	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 * i), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[i, -2.6e+59], t$95$1, If[LessEqual[i, -9.8e-277], N[(N[(c * j), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[i, 1.95e-57], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  t_1 := \left(t \cdot i\right) \cdot b\\
                                                                                  \mathbf{if}\;i \leq -2.6 \cdot 10^{+59}:\\
                                                                                  \;\;\;\;t\_1\\
                                                                                  
                                                                                  \mathbf{elif}\;i \leq -9.8 \cdot 10^{-277}:\\
                                                                                  \;\;\;\;\left(c \cdot j\right) \cdot a\\
                                                                                  
                                                                                  \mathbf{elif}\;i \leq 1.95 \cdot 10^{-57}:\\
                                                                                  \;\;\;\;\left(z \cdot x\right) \cdot y\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;t\_1\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 3 regimes
                                                                                  2. if i < -2.59999999999999999e59 or 1.95000000000000003e-57 < i

                                                                                    1. Initial program 62.0%

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

                                                                                      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. *-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 rewrites38.3%

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

                                                                                      if -2.59999999999999999e59 < i < -9.8e-277

                                                                                      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) + \left(c \cdot \left(a \cdot j - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)\right) - -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)} \]
                                                                                      4. Applied rewrites69.9%

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

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

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

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

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

                                                                                          if -9.8e-277 < i < 1.95000000000000003e-57

                                                                                          1. Initial program 85.7%

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

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

                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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 rewrites35.2%

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

                                                                                                \[\leadsto \left(z \cdot x\right) \cdot y \]
                                                                                            3. Recombined 3 regimes into one program.
                                                                                            4. Final simplification36.7%

                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2.6 \cdot 10^{+59}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{elif}\;i \leq -9.8 \cdot 10^{-277}:\\ \;\;\;\;\left(c \cdot j\right) \cdot a\\ \mathbf{elif}\;i \leq 1.95 \cdot 10^{-57}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \end{array} \]
                                                                                            5. Add Preprocessing

                                                                                            Alternative 21: 30.1% accurate, 2.6× speedup?

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

                                                                                              1. Initial program 62.0%

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

                                                                                                \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
                                                                                              4. Step-by-step derivation
                                                                                                1. *-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 rewrites38.3%

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

                                                                                                if -1.1999999999999999e61 < i < 1.95000000000000003e-57

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

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

                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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 rewrites29.9%

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

                                                                                                      \[\leadsto \left(z \cdot x\right) \cdot y \]
                                                                                                  3. Recombined 2 regimes into one program.
                                                                                                  4. Final simplification34.2%

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

                                                                                                  Alternative 22: 29.7% accurate, 2.6× speedup?

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

                                                                                                    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                      if -8.99999999999999997e62 < i < 1.95000000000000003e-57

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

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

                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, -\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right)\right) \cdot \left(-z\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. mul-1-negN/A

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-c, b, x \cdot y\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 rewrites30.2%

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

                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -9 \cdot 10^{+62} \lor \neg \left(i \leq 1.95 \cdot 10^{-57}\right):\\ \;\;\;\;\left(t \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot x\\ \end{array} \]
                                                                                                      12. Add Preprocessing

                                                                                                      Alternative 23: 22.5% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                          \[\leadsto \mathsf{fma}\left(-a, x, \color{blue}{i \cdot b}\right) \cdot t \]
                                                                                                      5. Applied rewrites40.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 rewrites23.1%

                                                                                                          \[\leadsto \left(t \cdot i\right) \cdot \color{blue}{b} \]
                                                                                                        2. Final simplification23.1%

                                                                                                          \[\leadsto \left(t \cdot i\right) \cdot b \]
                                                                                                        3. Add Preprocessing

                                                                                                        Developer Target 1: 58.6% 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 2024359 
                                                                                                        (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)))))