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

Percentage Accurate: 73.6% → 80.2%
Time: 12.3s
Alternatives: 25
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 25 alternatives:

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

Initial Program: 73.6% 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: 80.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -2.9 \cdot 10^{+83} \lor \neg \left(j \leq 3.8 \cdot 10^{+60}\right):\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= j -2.9e+83) (not (<= j 3.8e+60)))
   (fma
    (fma (- i) y (* c a))
    j
    (fma (fma (- x) a (* i b)) t (* (fma (- b) c (* y x)) z)))
   (fma
    (fma (- c) z (* i t))
    b
    (fma (fma (- t) x (* j c)) a (* (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 ((j <= -2.9e+83) || !(j <= 3.8e+60)) {
		tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-x, a, (i * b)), t, (fma(-b, c, (y * x)) * z)));
	} else {
		tmp = fma(fma(-c, z, (i * t)), b, fma(fma(-t, x, (j * c)), a, (fma(-i, j, (z * x)) * y)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((j <= -2.9e+83) || !(j <= 3.8e+60))
		tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(fma(Float64(-b), c, Float64(y * x)) * z)));
	else
		tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, fma(fma(Float64(-t), x, Float64(j * c)), a, 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[j, -2.9e+83], N[Not[LessEqual[j, 3.8e+60]], $MachinePrecision]], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.9 \cdot 10^{+83} \lor \neg \left(j \leq 3.8 \cdot 10^{+60}\right):\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -2.89999999999999999e83 or 3.80000000000000009e60 < j

    1. Initial program 79.0%

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

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

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

    if -2.89999999999999999e83 < j < 3.80000000000000009e60

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

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

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

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

Alternative 2: 78.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, y, c \cdot a\right)\\
\mathbf{if}\;j \leq -3.9 \cdot 10^{+197}:\\
\;\;\;\;t\_1 \cdot j\\

\mathbf{elif}\;j \leq 6 \cdot 10^{+230}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -3.9e197

    1. Initial program 72.0%

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

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

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

      if -3.9e197 < j < 6.00000000000000017e230

      1. Initial program 74.2%

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

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

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

      if 6.00000000000000017e230 < j

      1. Initial program 70.0%

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

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

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

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

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

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

      Alternative 3: 59.9% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{if}\;x \leq -3.9 \cdot 10^{+85}:\\ \;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-195}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \left(j \cdot c\right) \cdot a\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-75}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b + t\_1\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+161}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y + t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(y, \frac{z}{t}, -a\right) \cdot t\right) \cdot x\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i j)
       :precision binary64
       (let* ((t_1 (* j (- (* c a) (* y i)))))
         (if (<= x -3.9e+85)
           (* (fma (- t) a (* z y)) x)
           (if (<= x -5.5e-195)
             (fma (fma (- c) z (* i t)) b (* (* j c) a))
             (if (<= x 3.8e-75)
               (+ (* (* i t) b) t_1)
               (if (<= x 6e+161)
                 (+ (* (* z x) y) t_1)
                 (* (* (fma y (/ z t) (- a)) t) x)))))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
      	double t_1 = j * ((c * a) - (y * i));
      	double tmp;
      	if (x <= -3.9e+85) {
      		tmp = fma(-t, a, (z * y)) * x;
      	} else if (x <= -5.5e-195) {
      		tmp = fma(fma(-c, z, (i * t)), b, ((j * c) * a));
      	} else if (x <= 3.8e-75) {
      		tmp = ((i * t) * b) + t_1;
      	} else if (x <= 6e+161) {
      		tmp = ((z * x) * y) + t_1;
      	} else {
      		tmp = (fma(y, (z / t), -a) * t) * x;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i, j)
      	t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i)))
      	tmp = 0.0
      	if (x <= -3.9e+85)
      		tmp = Float64(fma(Float64(-t), a, Float64(z * y)) * x);
      	elseif (x <= -5.5e-195)
      		tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, Float64(Float64(j * c) * a));
      	elseif (x <= 3.8e-75)
      		tmp = Float64(Float64(Float64(i * t) * b) + t_1);
      	elseif (x <= 6e+161)
      		tmp = Float64(Float64(Float64(z * x) * y) + t_1);
      	else
      		tmp = Float64(Float64(fma(y, Float64(z / t), Float64(-a)) * t) * x);
      	end
      	return 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]}, If[LessEqual[x, -3.9e+85], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -5.5e-195], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e-75], N[(N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 6e+161], N[(N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(N[(y * N[(z / t), $MachinePrecision] + (-a)), $MachinePrecision] * t), $MachinePrecision] * x), $MachinePrecision]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
      \mathbf{if}\;x \leq -3.9 \cdot 10^{+85}:\\
      \;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
      
      \mathbf{elif}\;x \leq -5.5 \cdot 10^{-195}:\\
      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \left(j \cdot c\right) \cdot a\right)\\
      
      \mathbf{elif}\;x \leq 3.8 \cdot 10^{-75}:\\
      \;\;\;\;\left(i \cdot t\right) \cdot b + t\_1\\
      
      \mathbf{elif}\;x \leq 6 \cdot 10^{+161}:\\
      \;\;\;\;\left(z \cdot x\right) \cdot y + t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\mathsf{fma}\left(y, \frac{z}{t}, -a\right) \cdot t\right) \cdot x\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if x < -3.90000000000000033e85

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

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

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

          if -3.90000000000000033e85 < x < -5.5000000000000003e-195

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

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

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

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

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

            if -5.5000000000000003e-195 < x < 3.79999999999999994e-75

            1. Initial program 72.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 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. Applied rewrites66.6%

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

              if 3.79999999999999994e-75 < x < 6.00000000000000023e161

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

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

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

                if 6.00000000000000023e161 < x

                1. Initial program 77.1%

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

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{+85}:\\ \;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-195}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \left(j \cdot c\right) \cdot a\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-75}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+161}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(y, \frac{z}{t}, -a\right) \cdot t\right) \cdot x\\ \end{array} \]
                  6. Add Preprocessing

                  Alternative 4: 67.6% accurate, 1.1× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\ t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right)\\ \mathbf{if}\;a \leq -4.3 \cdot 10^{+162}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-72}:\\ \;\;\;\;\mathsf{fma}\left(\left(-j\right) \cdot y, i, \mathsf{fma}\left(t\_2, z, \left(i \cdot t\right) \cdot b\right)\right)\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+77}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, t\_2 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i j)
                   :precision binary64
                   (let* ((t_1 (* (fma (- t) x (* j c)) a)) (t_2 (fma (- b) c (* y x))))
                     (if (<= a -4.3e+162)
                       t_1
                       (if (<= a 1.9e-72)
                         (fma (* (- j) y) i (fma t_2 z (* (* i t) b)))
                         (if (<= a 3.9e+77) (fma (fma (- i) y (* c a)) j (* t_2 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(-t, x, (j * c)) * a;
                  	double t_2 = fma(-b, c, (y * x));
                  	double tmp;
                  	if (a <= -4.3e+162) {
                  		tmp = t_1;
                  	} else if (a <= 1.9e-72) {
                  		tmp = fma((-j * y), i, fma(t_2, z, ((i * t) * b)));
                  	} else if (a <= 3.9e+77) {
                  		tmp = fma(fma(-i, y, (c * a)), j, (t_2 * z));
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i, j)
                  	t_1 = Float64(fma(Float64(-t), x, Float64(j * c)) * a)
                  	t_2 = fma(Float64(-b), c, Float64(y * x))
                  	tmp = 0.0
                  	if (a <= -4.3e+162)
                  		tmp = t_1;
                  	elseif (a <= 1.9e-72)
                  		tmp = fma(Float64(Float64(-j) * y), i, fma(t_2, z, Float64(Float64(i * t) * b)));
                  	elseif (a <= 3.9e+77)
                  		tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(t_2 * 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[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.3e+162], t$95$1, If[LessEqual[a, 1.9e-72], N[(N[((-j) * y), $MachinePrecision] * i + N[(t$95$2 * z + N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.9e+77], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(t$95$2 * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
                  t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right)\\
                  \mathbf{if}\;a \leq -4.3 \cdot 10^{+162}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;a \leq 1.9 \cdot 10^{-72}:\\
                  \;\;\;\;\mathsf{fma}\left(\left(-j\right) \cdot y, i, \mathsf{fma}\left(t\_2, z, \left(i \cdot t\right) \cdot b\right)\right)\\
                  
                  \mathbf{elif}\;a \leq 3.9 \cdot 10^{+77}:\\
                  \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, t\_2 \cdot z\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if a < -4.3000000000000002e162 or 3.8999999999999998e77 < a

                    1. Initial program 55.1%

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

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

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

                      if -4.3000000000000002e162 < a < 1.90000000000000001e-72

                      1. Initial program 81.2%

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

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

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

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

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

                        if 1.90000000000000001e-72 < a < 3.8999999999999998e77

                        1. Initial program 93.2%

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

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

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

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

                      Alternative 5: 60.0% accurate, 1.1× speedup?

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

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

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

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

                          if -3.90000000000000033e85 < x < -5.5000000000000003e-195

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

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

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

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

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

                            if -5.5000000000000003e-195 < x < 3.79999999999999994e-75

                            1. Initial program 72.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 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. Applied rewrites66.6%

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

                              if 3.79999999999999994e-75 < x < 2.14999999999999994e160

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

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

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

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

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

                                if 2.14999999999999994e160 < x

                                1. Initial program 77.1%

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

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

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

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

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{+85}:\\ \;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-195}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \left(j \cdot c\right) \cdot a\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-75}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;x \leq 2.15 \cdot 10^{+160}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \left(z \cdot y\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(y, \frac{z}{t}, -a\right) \cdot t\right) \cdot x\\ \end{array} \]
                                  6. Add Preprocessing

                                  Alternative 6: 71.7% accurate, 1.2× speedup?

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

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

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

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

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

                                      if -6.6000000000000005e-42 < t < 0.37

                                      1. Initial program 81.4%

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{-42} \lor \neg \left(t \leq 0.37\right):\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, y \cdot x\right), z, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\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 7: 65.0% accurate, 1.2× speedup?

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

                                      1. Initial program 65.7%

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

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

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

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

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

                                        if -9.60000000000000092e-19 < t < 0.37

                                        1. Initial program 81.9%

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

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

                                            \[\leadsto \color{blue}{\left(z \cdot x\right) \cdot y} + j \cdot \left(c \cdot a - y \cdot i\right) \]
                                        5. Recombined 2 regimes into one program.
                                        6. Final simplification69.4%

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

                                        Alternative 8: 48.5% accurate, 1.2× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\ t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+48}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-171}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-274}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-27}:\\ \;\;\;\;\mathsf{fma}\left(t, b, \left(-y\right) \cdot j\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b c i j)
                                         :precision binary64
                                         (let* ((t_1 (* (- a) (* t x))) (t_2 (* (fma (- b) c (* y x)) z)))
                                           (if (<= z -1.7e+48)
                                             t_2
                                             (if (<= z -3.45e-28)
                                               t_1
                                               (if (<= z -4.6e-171)
                                                 (* (fma (- i) j (* z x)) y)
                                                 (if (<= z -9.5e-274)
                                                   t_1
                                                   (if (<= z 5.6e-27) (* (fma t b (* (- y) j)) i) 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 = -a * (t * x);
                                        	double t_2 = fma(-b, c, (y * x)) * z;
                                        	double tmp;
                                        	if (z <= -1.7e+48) {
                                        		tmp = t_2;
                                        	} else if (z <= -3.45e-28) {
                                        		tmp = t_1;
                                        	} else if (z <= -4.6e-171) {
                                        		tmp = fma(-i, j, (z * x)) * y;
                                        	} else if (z <= -9.5e-274) {
                                        		tmp = t_1;
                                        	} else if (z <= 5.6e-27) {
                                        		tmp = fma(t, b, (-y * j)) * i;
                                        	} else {
                                        		tmp = t_2;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(x, y, z, t, a, b, c, i, j)
                                        	t_1 = Float64(Float64(-a) * Float64(t * x))
                                        	t_2 = Float64(fma(Float64(-b), c, Float64(y * x)) * z)
                                        	tmp = 0.0
                                        	if (z <= -1.7e+48)
                                        		tmp = t_2;
                                        	elseif (z <= -3.45e-28)
                                        		tmp = t_1;
                                        	elseif (z <= -4.6e-171)
                                        		tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y);
                                        	elseif (z <= -9.5e-274)
                                        		tmp = t_1;
                                        	elseif (z <= 5.6e-27)
                                        		tmp = Float64(fma(t, b, Float64(Float64(-y) * j)) * i);
                                        	else
                                        		tmp = t_2;
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.7e+48], t$95$2, If[LessEqual[z, -3.45e-28], t$95$1, If[LessEqual[z, -4.6e-171], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -9.5e-274], t$95$1, If[LessEqual[z, 5.6e-27], N[(N[(t * b + N[((-y) * j), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$2]]]]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\
                                        t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
                                        \mathbf{if}\;z \leq -1.7 \cdot 10^{+48}:\\
                                        \;\;\;\;t\_2\\
                                        
                                        \mathbf{elif}\;z \leq -3.45 \cdot 10^{-28}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;z \leq -4.6 \cdot 10^{-171}:\\
                                        \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
                                        
                                        \mathbf{elif}\;z \leq -9.5 \cdot 10^{-274}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;z \leq 5.6 \cdot 10^{-27}:\\
                                        \;\;\;\;\mathsf{fma}\left(t, b, \left(-y\right) \cdot j\right) \cdot i\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_2\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 4 regimes
                                        2. if z < -1.7000000000000002e48 or 5.5999999999999999e-27 < 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 z around inf

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

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

                                          if -1.7000000000000002e48 < z < -3.45000000000000001e-28 or -4.59999999999999956e-171 < z < -9.5000000000000009e-274

                                          1. Initial program 64.3%

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

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

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

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

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

                                              if -3.45000000000000001e-28 < z < -4.59999999999999956e-171

                                              1. Initial program 86.1%

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

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

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

                                                if -9.5000000000000009e-274 < z < 5.5999999999999999e-27

                                                1. Initial program 81.3%

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

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

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                                  2. Step-by-step derivation
                                                    1. Applied rewrites48.8%

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

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+48}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-28}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-171}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-274}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-27}:\\ \;\;\;\;\mathsf{fma}\left(t, b, \left(-y\right) \cdot j\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \end{array} \]
                                                  5. Add Preprocessing

                                                  Alternative 9: 60.0% accurate, 1.3× speedup?

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

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

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

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

                                                      if -3.90000000000000033e85 < x < 3.49999999999999985e-75

                                                      1. Initial program 74.4%

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

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

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

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

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

                                                        if 3.49999999999999985e-75 < x < 2.14999999999999994e160

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

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

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

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

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

                                                          if 2.14999999999999994e160 < x

                                                          1. Initial program 77.1%

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

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

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

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

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

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{+85}:\\ \;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-75}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \left(j \cdot c\right) \cdot a\right)\\ \mathbf{elif}\;x \leq 2.15 \cdot 10^{+160}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \left(z \cdot y\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(y, \frac{z}{t}, -a\right) \cdot t\right) \cdot x\\ \end{array} \]
                                                            6. Add Preprocessing

                                                            Alternative 10: 30.0% accurate, 1.4× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{if}\;a \leq -2.95 \cdot 10^{+246}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-291}:\\ \;\;\;\;\left(i \cdot b\right) \cdot t\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+103}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+256}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot a\right) \cdot c\\ \end{array} \end{array} \]
                                                            (FPCore (x y z t a b c i j)
                                                             :precision binary64
                                                             (let* ((t_1 (* (- a) (* t x))))
                                                               (if (<= a -2.95e+246)
                                                                 (* (* c a) j)
                                                                 (if (<= a -4.3e-16)
                                                                   t_1
                                                                   (if (<= a 1.06e-291)
                                                                     (* (* i b) t)
                                                                     (if (<= a 2.1e+103)
                                                                       (* (* z y) x)
                                                                       (if (<= a 3.3e+256) t_1 (* (* j a) c))))))))
                                                            double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                            	double t_1 = -a * (t * x);
                                                            	double tmp;
                                                            	if (a <= -2.95e+246) {
                                                            		tmp = (c * a) * j;
                                                            	} else if (a <= -4.3e-16) {
                                                            		tmp = t_1;
                                                            	} else if (a <= 1.06e-291) {
                                                            		tmp = (i * b) * t;
                                                            	} else if (a <= 2.1e+103) {
                                                            		tmp = (z * y) * x;
                                                            	} else if (a <= 3.3e+256) {
                                                            		tmp = t_1;
                                                            	} else {
                                                            		tmp = (j * a) * c;
                                                            	}
                                                            	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 = -a * (t * x)
                                                                if (a <= (-2.95d+246)) then
                                                                    tmp = (c * a) * j
                                                                else if (a <= (-4.3d-16)) then
                                                                    tmp = t_1
                                                                else if (a <= 1.06d-291) then
                                                                    tmp = (i * b) * t
                                                                else if (a <= 2.1d+103) then
                                                                    tmp = (z * y) * x
                                                                else if (a <= 3.3d+256) then
                                                                    tmp = t_1
                                                                else
                                                                    tmp = (j * a) * c
                                                                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 = -a * (t * x);
                                                            	double tmp;
                                                            	if (a <= -2.95e+246) {
                                                            		tmp = (c * a) * j;
                                                            	} else if (a <= -4.3e-16) {
                                                            		tmp = t_1;
                                                            	} else if (a <= 1.06e-291) {
                                                            		tmp = (i * b) * t;
                                                            	} else if (a <= 2.1e+103) {
                                                            		tmp = (z * y) * x;
                                                            	} else if (a <= 3.3e+256) {
                                                            		tmp = t_1;
                                                            	} else {
                                                            		tmp = (j * a) * c;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            def code(x, y, z, t, a, b, c, i, j):
                                                            	t_1 = -a * (t * x)
                                                            	tmp = 0
                                                            	if a <= -2.95e+246:
                                                            		tmp = (c * a) * j
                                                            	elif a <= -4.3e-16:
                                                            		tmp = t_1
                                                            	elif a <= 1.06e-291:
                                                            		tmp = (i * b) * t
                                                            	elif a <= 2.1e+103:
                                                            		tmp = (z * y) * x
                                                            	elif a <= 3.3e+256:
                                                            		tmp = t_1
                                                            	else:
                                                            		tmp = (j * a) * c
                                                            	return tmp
                                                            
                                                            function code(x, y, z, t, a, b, c, i, j)
                                                            	t_1 = Float64(Float64(-a) * Float64(t * x))
                                                            	tmp = 0.0
                                                            	if (a <= -2.95e+246)
                                                            		tmp = Float64(Float64(c * a) * j);
                                                            	elseif (a <= -4.3e-16)
                                                            		tmp = t_1;
                                                            	elseif (a <= 1.06e-291)
                                                            		tmp = Float64(Float64(i * b) * t);
                                                            	elseif (a <= 2.1e+103)
                                                            		tmp = Float64(Float64(z * y) * x);
                                                            	elseif (a <= 3.3e+256)
                                                            		tmp = t_1;
                                                            	else
                                                            		tmp = Float64(Float64(j * a) * c);
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                            	t_1 = -a * (t * x);
                                                            	tmp = 0.0;
                                                            	if (a <= -2.95e+246)
                                                            		tmp = (c * a) * j;
                                                            	elseif (a <= -4.3e-16)
                                                            		tmp = t_1;
                                                            	elseif (a <= 1.06e-291)
                                                            		tmp = (i * b) * t;
                                                            	elseif (a <= 2.1e+103)
                                                            		tmp = (z * y) * x;
                                                            	elseif (a <= 3.3e+256)
                                                            		tmp = t_1;
                                                            	else
                                                            		tmp = (j * a) * c;
                                                            	end
                                                            	tmp_2 = tmp;
                                                            end
                                                            
                                                            code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.95e+246], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[a, -4.3e-16], t$95$1, If[LessEqual[a, 1.06e-291], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[a, 2.1e+103], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 3.3e+256], t$95$1, N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]]]]]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\
                                                            \mathbf{if}\;a \leq -2.95 \cdot 10^{+246}:\\
                                                            \;\;\;\;\left(c \cdot a\right) \cdot j\\
                                                            
                                                            \mathbf{elif}\;a \leq -4.3 \cdot 10^{-16}:\\
                                                            \;\;\;\;t\_1\\
                                                            
                                                            \mathbf{elif}\;a \leq 1.06 \cdot 10^{-291}:\\
                                                            \;\;\;\;\left(i \cdot b\right) \cdot t\\
                                                            
                                                            \mathbf{elif}\;a \leq 2.1 \cdot 10^{+103}:\\
                                                            \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                                            
                                                            \mathbf{elif}\;a \leq 3.3 \cdot 10^{+256}:\\
                                                            \;\;\;\;t\_1\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\left(j \cdot a\right) \cdot c\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 5 regimes
                                                            2. if a < -2.94999999999999988e246

                                                              1. Initial program 60.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. Applied rewrites61.2%

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

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

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

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

                                                                  if -2.94999999999999988e246 < a < -4.2999999999999999e-16 or 2.1000000000000002e103 < a < 3.2999999999999999e256

                                                                  1. Initial program 59.4%

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

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

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

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

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

                                                                      if -4.2999999999999999e-16 < a < 1.05999999999999992e-291

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

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

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

                                                                          \[\leadsto \left(b \cdot i\right) \cdot t \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites33.2%

                                                                            \[\leadsto \left(i \cdot b\right) \cdot t \]

                                                                          if 1.05999999999999992e-291 < a < 2.1000000000000002e103

                                                                          1. Initial program 82.6%

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

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

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

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

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

                                                                              if 3.2999999999999999e256 < a

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

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

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

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

                                                                                  \[\leadsto \left(j \cdot a\right) \cdot c \]
                                                                              7. Recombined 5 regimes into one program.
                                                                              8. Final simplification40.4%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.95 \cdot 10^{+246}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-16}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-291}:\\ \;\;\;\;\left(i \cdot b\right) \cdot t\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+103}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+256}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot a\right) \cdot c\\ \end{array} \]
                                                                              9. Add Preprocessing

                                                                              Alternative 11: 49.7% accurate, 1.4× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-28}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-148}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-27}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                              (FPCore (x y z t a b c i j)
                                                                               :precision binary64
                                                                               (let* ((t_1 (* (fma (- b) c (* y x)) z)))
                                                                                 (if (<= z -1.7e+48)
                                                                                   t_1
                                                                                   (if (<= z -3.45e-28)
                                                                                     (* (- a) (* t x))
                                                                                     (if (<= z -8.6e-148)
                                                                                       (* (fma (- i) j (* z x)) y)
                                                                                       (if (<= z 5.6e-27) (* (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.7e+48) {
                                                                              		tmp = t_1;
                                                                              	} else if (z <= -3.45e-28) {
                                                                              		tmp = -a * (t * x);
                                                                              	} else if (z <= -8.6e-148) {
                                                                              		tmp = fma(-i, j, (z * x)) * y;
                                                                              	} else if (z <= 5.6e-27) {
                                                                              		tmp = fma(-i, y, (c * a)) * j;
                                                                              	} else {
                                                                              		tmp = t_1;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              function code(x, y, z, t, a, b, c, i, j)
                                                                              	t_1 = Float64(fma(Float64(-b), c, Float64(y * x)) * z)
                                                                              	tmp = 0.0
                                                                              	if (z <= -1.7e+48)
                                                                              		tmp = t_1;
                                                                              	elseif (z <= -3.45e-28)
                                                                              		tmp = Float64(Float64(-a) * Float64(t * x));
                                                                              	elseif (z <= -8.6e-148)
                                                                              		tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y);
                                                                              	elseif (z <= 5.6e-27)
                                                                              		tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j);
                                                                              	else
                                                                              		tmp = t_1;
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.7e+48], t$95$1, If[LessEqual[z, -3.45e-28], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.6e-148], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 5.6e-27], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
                                                                              \mathbf{if}\;z \leq -1.7 \cdot 10^{+48}:\\
                                                                              \;\;\;\;t\_1\\
                                                                              
                                                                              \mathbf{elif}\;z \leq -3.45 \cdot 10^{-28}:\\
                                                                              \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\
                                                                              
                                                                              \mathbf{elif}\;z \leq -8.6 \cdot 10^{-148}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
                                                                              
                                                                              \mathbf{elif}\;z \leq 5.6 \cdot 10^{-27}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;t\_1\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 4 regimes
                                                                              2. if z < -1.7000000000000002e48 or 5.5999999999999999e-27 < 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 z around inf

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

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

                                                                                if -1.7000000000000002e48 < z < -3.45000000000000001e-28

                                                                                1. Initial program 64.6%

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

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

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

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

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

                                                                                    if -3.45000000000000001e-28 < z < -8.5999999999999997e-148

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

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

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

                                                                                      if -8.5999999999999997e-148 < z < 5.5999999999999999e-27

                                                                                      1. Initial program 78.2%

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

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

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

                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+48}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-28}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-148}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-27}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \end{array} \]
                                                                                      7. Add Preprocessing

                                                                                      Alternative 12: 58.7% accurate, 1.5× speedup?

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

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

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

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

                                                                                          if -3.90000000000000033e85 < x < 2.3000000000000001e-60

                                                                                          1. Initial program 74.2%

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

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

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

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

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

                                                                                            if 2.3000000000000001e-60 < x

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

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

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

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

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

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

                                                                                              Alternative 13: 43.2% accurate, 1.6× speedup?

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

                                                                                                1. Initial program 63.6%

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

                                                                                                  \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
                                                                                                4. Applied rewrites64.0%

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

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

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

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

                                                                                                    if -7.39999999999999961e248 < a < -2.69999999999999999e163

                                                                                                    1. Initial program 40.6%

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

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

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

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

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

                                                                                                        if -2.69999999999999999e163 < a < 3.10000000000000017e104

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

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

                                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                                                                                          2. Step-by-step derivation
                                                                                                            1. Applied rewrites41.7%

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

                                                                                                            if 3.10000000000000017e104 < a < 3.2999999999999999e256

                                                                                                            1. Initial program 47.2%

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

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

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

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

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

                                                                                                                if 3.2999999999999999e256 < a

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

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

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

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

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

                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.4 \cdot 10^{+248}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{+163}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+104}:\\ \;\;\;\;\mathsf{fma}\left(t, b, \left(-y\right) \cdot j\right) \cdot i\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+256}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot a\right) \cdot c\\ \end{array} \]
                                                                                                                9. Add Preprocessing

                                                                                                                Alternative 14: 30.6% accurate, 1.6× speedup?

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

                                                                                                                  1. Initial program 68.2%

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

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

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

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

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

                                                                                                                      if -3.10000000000000019e53 < z < 2.19999999999999989e-262 or 2.34999999999999986e-80 < z < 7.8e9

                                                                                                                      1. Initial program 76.4%

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

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

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

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

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

                                                                                                                          if 2.19999999999999989e-262 < z < 2.34999999999999986e-80

                                                                                                                          1. Initial program 81.5%

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

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

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

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

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

                                                                                                                              if 7.8e9 < z

                                                                                                                              1. Initial program 66.1%

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

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

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

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

                                                                                                                                  \[\leadsto \left(\left(-z\right) \cdot b\right) \cdot c \]
                                                                                                                              7. Recombined 4 regimes into one program.
                                                                                                                              8. Final simplification42.7%

                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-262}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-80}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 7800000000:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\ \end{array} \]
                                                                                                                              9. Add Preprocessing

                                                                                                                              Alternative 15: 30.4% accurate, 1.6× speedup?

                                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-262}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-80}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 7800000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \end{array} \end{array} \]
                                                                                                                              (FPCore (x y z t a b c i j)
                                                                                                                               :precision binary64
                                                                                                                               (let* ((t_1 (* (- a) (* t x))))
                                                                                                                                 (if (<= z -3.1e+53)
                                                                                                                                   (* (* z y) x)
                                                                                                                                   (if (<= z 2.2e-262)
                                                                                                                                     t_1
                                                                                                                                     (if (<= z 2.35e-80)
                                                                                                                                       (* (* (- j) y) i)
                                                                                                                                       (if (<= z 7800000000.0) t_1 (* (- b) (* c z))))))))
                                                                                                                              double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                                                                              	double t_1 = -a * (t * x);
                                                                                                                              	double tmp;
                                                                                                                              	if (z <= -3.1e+53) {
                                                                                                                              		tmp = (z * y) * x;
                                                                                                                              	} else if (z <= 2.2e-262) {
                                                                                                                              		tmp = t_1;
                                                                                                                              	} else if (z <= 2.35e-80) {
                                                                                                                              		tmp = (-j * y) * i;
                                                                                                                              	} else if (z <= 7800000000.0) {
                                                                                                                              		tmp = t_1;
                                                                                                                              	} else {
                                                                                                                              		tmp = -b * (c * 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) :: t_1
                                                                                                                                  real(8) :: tmp
                                                                                                                                  t_1 = -a * (t * x)
                                                                                                                                  if (z <= (-3.1d+53)) then
                                                                                                                                      tmp = (z * y) * x
                                                                                                                                  else if (z <= 2.2d-262) then
                                                                                                                                      tmp = t_1
                                                                                                                                  else if (z <= 2.35d-80) then
                                                                                                                                      tmp = (-j * y) * i
                                                                                                                                  else if (z <= 7800000000.0d0) then
                                                                                                                                      tmp = t_1
                                                                                                                                  else
                                                                                                                                      tmp = -b * (c * 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 t_1 = -a * (t * x);
                                                                                                                              	double tmp;
                                                                                                                              	if (z <= -3.1e+53) {
                                                                                                                              		tmp = (z * y) * x;
                                                                                                                              	} else if (z <= 2.2e-262) {
                                                                                                                              		tmp = t_1;
                                                                                                                              	} else if (z <= 2.35e-80) {
                                                                                                                              		tmp = (-j * y) * i;
                                                                                                                              	} else if (z <= 7800000000.0) {
                                                                                                                              		tmp = t_1;
                                                                                                                              	} else {
                                                                                                                              		tmp = -b * (c * z);
                                                                                                                              	}
                                                                                                                              	return tmp;
                                                                                                                              }
                                                                                                                              
                                                                                                                              def code(x, y, z, t, a, b, c, i, j):
                                                                                                                              	t_1 = -a * (t * x)
                                                                                                                              	tmp = 0
                                                                                                                              	if z <= -3.1e+53:
                                                                                                                              		tmp = (z * y) * x
                                                                                                                              	elif z <= 2.2e-262:
                                                                                                                              		tmp = t_1
                                                                                                                              	elif z <= 2.35e-80:
                                                                                                                              		tmp = (-j * y) * i
                                                                                                                              	elif z <= 7800000000.0:
                                                                                                                              		tmp = t_1
                                                                                                                              	else:
                                                                                                                              		tmp = -b * (c * z)
                                                                                                                              	return tmp
                                                                                                                              
                                                                                                                              function code(x, y, z, t, a, b, c, i, j)
                                                                                                                              	t_1 = Float64(Float64(-a) * Float64(t * x))
                                                                                                                              	tmp = 0.0
                                                                                                                              	if (z <= -3.1e+53)
                                                                                                                              		tmp = Float64(Float64(z * y) * x);
                                                                                                                              	elseif (z <= 2.2e-262)
                                                                                                                              		tmp = t_1;
                                                                                                                              	elseif (z <= 2.35e-80)
                                                                                                                              		tmp = Float64(Float64(Float64(-j) * y) * i);
                                                                                                                              	elseif (z <= 7800000000.0)
                                                                                                                              		tmp = t_1;
                                                                                                                              	else
                                                                                                                              		tmp = Float64(Float64(-b) * Float64(c * z));
                                                                                                                              	end
                                                                                                                              	return tmp
                                                                                                                              end
                                                                                                                              
                                                                                                                              function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                                                                              	t_1 = -a * (t * x);
                                                                                                                              	tmp = 0.0;
                                                                                                                              	if (z <= -3.1e+53)
                                                                                                                              		tmp = (z * y) * x;
                                                                                                                              	elseif (z <= 2.2e-262)
                                                                                                                              		tmp = t_1;
                                                                                                                              	elseif (z <= 2.35e-80)
                                                                                                                              		tmp = (-j * y) * i;
                                                                                                                              	elseif (z <= 7800000000.0)
                                                                                                                              		tmp = t_1;
                                                                                                                              	else
                                                                                                                              		tmp = -b * (c * z);
                                                                                                                              	end
                                                                                                                              	tmp_2 = tmp;
                                                                                                                              end
                                                                                                                              
                                                                                                                              code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+53], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 2.2e-262], t$95$1, If[LessEqual[z, 2.35e-80], N[(N[((-j) * y), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 7800000000.0], t$95$1, N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]]]]]]
                                                                                                                              
                                                                                                                              \begin{array}{l}
                                                                                                                              
                                                                                                                              \\
                                                                                                                              \begin{array}{l}
                                                                                                                              t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\
                                                                                                                              \mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\
                                                                                                                              \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                                                                                                              
                                                                                                                              \mathbf{elif}\;z \leq 2.2 \cdot 10^{-262}:\\
                                                                                                                              \;\;\;\;t\_1\\
                                                                                                                              
                                                                                                                              \mathbf{elif}\;z \leq 2.35 \cdot 10^{-80}:\\
                                                                                                                              \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\
                                                                                                                              
                                                                                                                              \mathbf{elif}\;z \leq 7800000000:\\
                                                                                                                              \;\;\;\;t\_1\\
                                                                                                                              
                                                                                                                              \mathbf{else}:\\
                                                                                                                              \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\
                                                                                                                              
                                                                                                                              
                                                                                                                              \end{array}
                                                                                                                              \end{array}
                                                                                                                              
                                                                                                                              Derivation
                                                                                                                              1. Split input into 4 regimes
                                                                                                                              2. if z < -3.10000000000000019e53

                                                                                                                                1. Initial program 68.2%

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

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

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

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

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

                                                                                                                                    if -3.10000000000000019e53 < z < 2.19999999999999989e-262 or 2.34999999999999986e-80 < z < 7.8e9

                                                                                                                                    1. Initial program 76.4%

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

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

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

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

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

                                                                                                                                        if 2.19999999999999989e-262 < z < 2.34999999999999986e-80

                                                                                                                                        1. Initial program 81.5%

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

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

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

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

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

                                                                                                                                            if 7.8e9 < z

                                                                                                                                            1. Initial program 66.1%

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

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

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

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

                                                                                                                                                \[\leadsto \left(-b\right) \cdot \color{blue}{\left(c \cdot z\right)} \]
                                                                                                                                            7. Recombined 4 regimes into one program.
                                                                                                                                            8. Final simplification42.4%

                                                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-262}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-80}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 7800000000:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \end{array} \]
                                                                                                                                            9. Add Preprocessing

                                                                                                                                            Alternative 16: 29.9% accurate, 1.6× speedup?

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

                                                                                                                                              1. Initial program 68.2%

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

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

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

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

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

                                                                                                                                                  if -3.10000000000000019e53 < z < -3.6000000000000001e-243

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

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

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

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

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

                                                                                                                                                      if -3.6000000000000001e-243 < z < 1.7e-85

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

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

                                                                                                                                                          \[\leadsto \left(b \cdot i\right) \cdot t \]
                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                          1. Applied rewrites31.7%

                                                                                                                                                            \[\leadsto \left(i \cdot b\right) \cdot t \]

                                                                                                                                                          if 1.7e-85 < z < 7.8e9

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

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

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

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

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

                                                                                                                                                              if 7.8e9 < z

                                                                                                                                                              1. Initial program 66.1%

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

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

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

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

                                                                                                                                                                  \[\leadsto \left(-b\right) \cdot \color{blue}{\left(c \cdot z\right)} \]
                                                                                                                                                              7. Recombined 5 regimes into one program.
                                                                                                                                                              8. Final simplification41.7%

                                                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-243}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-85}:\\ \;\;\;\;\left(i \cdot b\right) \cdot t\\ \mathbf{elif}\;z \leq 7800000000:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \end{array} \]
                                                                                                                                                              9. Add Preprocessing

                                                                                                                                                              Alternative 17: 30.4% accurate, 1.6× speedup?

                                                                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-297}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-85}:\\ \;\;\;\;\left(i \cdot b\right) \cdot t\\ \mathbf{elif}\;z \leq 7800000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \end{array} \end{array} \]
                                                                                                                                                              (FPCore (x y z t a b c i j)
                                                                                                                                                               :precision binary64
                                                                                                                                                               (let* ((t_1 (* (- a) (* t x))))
                                                                                                                                                                 (if (<= z -3.1e+53)
                                                                                                                                                                   (* (* z y) x)
                                                                                                                                                                   (if (<= z -6e-297)
                                                                                                                                                                     t_1
                                                                                                                                                                     (if (<= z 1.7e-85)
                                                                                                                                                                       (* (* i b) t)
                                                                                                                                                                       (if (<= z 7800000000.0) t_1 (* (- b) (* c z))))))))
                                                                                                                                                              double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                                                                                                              	double t_1 = -a * (t * x);
                                                                                                                                                              	double tmp;
                                                                                                                                                              	if (z <= -3.1e+53) {
                                                                                                                                                              		tmp = (z * y) * x;
                                                                                                                                                              	} else if (z <= -6e-297) {
                                                                                                                                                              		tmp = t_1;
                                                                                                                                                              	} else if (z <= 1.7e-85) {
                                                                                                                                                              		tmp = (i * b) * t;
                                                                                                                                                              	} else if (z <= 7800000000.0) {
                                                                                                                                                              		tmp = t_1;
                                                                                                                                                              	} else {
                                                                                                                                                              		tmp = -b * (c * 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) :: t_1
                                                                                                                                                                  real(8) :: tmp
                                                                                                                                                                  t_1 = -a * (t * x)
                                                                                                                                                                  if (z <= (-3.1d+53)) then
                                                                                                                                                                      tmp = (z * y) * x
                                                                                                                                                                  else if (z <= (-6d-297)) then
                                                                                                                                                                      tmp = t_1
                                                                                                                                                                  else if (z <= 1.7d-85) then
                                                                                                                                                                      tmp = (i * b) * t
                                                                                                                                                                  else if (z <= 7800000000.0d0) then
                                                                                                                                                                      tmp = t_1
                                                                                                                                                                  else
                                                                                                                                                                      tmp = -b * (c * 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 t_1 = -a * (t * x);
                                                                                                                                                              	double tmp;
                                                                                                                                                              	if (z <= -3.1e+53) {
                                                                                                                                                              		tmp = (z * y) * x;
                                                                                                                                                              	} else if (z <= -6e-297) {
                                                                                                                                                              		tmp = t_1;
                                                                                                                                                              	} else if (z <= 1.7e-85) {
                                                                                                                                                              		tmp = (i * b) * t;
                                                                                                                                                              	} else if (z <= 7800000000.0) {
                                                                                                                                                              		tmp = t_1;
                                                                                                                                                              	} else {
                                                                                                                                                              		tmp = -b * (c * z);
                                                                                                                                                              	}
                                                                                                                                                              	return tmp;
                                                                                                                                                              }
                                                                                                                                                              
                                                                                                                                                              def code(x, y, z, t, a, b, c, i, j):
                                                                                                                                                              	t_1 = -a * (t * x)
                                                                                                                                                              	tmp = 0
                                                                                                                                                              	if z <= -3.1e+53:
                                                                                                                                                              		tmp = (z * y) * x
                                                                                                                                                              	elif z <= -6e-297:
                                                                                                                                                              		tmp = t_1
                                                                                                                                                              	elif z <= 1.7e-85:
                                                                                                                                                              		tmp = (i * b) * t
                                                                                                                                                              	elif z <= 7800000000.0:
                                                                                                                                                              		tmp = t_1
                                                                                                                                                              	else:
                                                                                                                                                              		tmp = -b * (c * z)
                                                                                                                                                              	return tmp
                                                                                                                                                              
                                                                                                                                                              function code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                              	t_1 = Float64(Float64(-a) * Float64(t * x))
                                                                                                                                                              	tmp = 0.0
                                                                                                                                                              	if (z <= -3.1e+53)
                                                                                                                                                              		tmp = Float64(Float64(z * y) * x);
                                                                                                                                                              	elseif (z <= -6e-297)
                                                                                                                                                              		tmp = t_1;
                                                                                                                                                              	elseif (z <= 1.7e-85)
                                                                                                                                                              		tmp = Float64(Float64(i * b) * t);
                                                                                                                                                              	elseif (z <= 7800000000.0)
                                                                                                                                                              		tmp = t_1;
                                                                                                                                                              	else
                                                                                                                                                              		tmp = Float64(Float64(-b) * Float64(c * z));
                                                                                                                                                              	end
                                                                                                                                                              	return tmp
                                                                                                                                                              end
                                                                                                                                                              
                                                                                                                                                              function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                              	t_1 = -a * (t * x);
                                                                                                                                                              	tmp = 0.0;
                                                                                                                                                              	if (z <= -3.1e+53)
                                                                                                                                                              		tmp = (z * y) * x;
                                                                                                                                                              	elseif (z <= -6e-297)
                                                                                                                                                              		tmp = t_1;
                                                                                                                                                              	elseif (z <= 1.7e-85)
                                                                                                                                                              		tmp = (i * b) * t;
                                                                                                                                                              	elseif (z <= 7800000000.0)
                                                                                                                                                              		tmp = t_1;
                                                                                                                                                              	else
                                                                                                                                                              		tmp = -b * (c * z);
                                                                                                                                                              	end
                                                                                                                                                              	tmp_2 = tmp;
                                                                                                                                                              end
                                                                                                                                                              
                                                                                                                                                              code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+53], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, -6e-297], t$95$1, If[LessEqual[z, 1.7e-85], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 7800000000.0], t$95$1, N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]]]]]]
                                                                                                                                                              
                                                                                                                                                              \begin{array}{l}
                                                                                                                                                              
                                                                                                                                                              \\
                                                                                                                                                              \begin{array}{l}
                                                                                                                                                              t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\
                                                                                                                                                              \mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\
                                                                                                                                                              \;\;\;\;\left(z \cdot y\right) \cdot x\\
                                                                                                                                                              
                                                                                                                                                              \mathbf{elif}\;z \leq -6 \cdot 10^{-297}:\\
                                                                                                                                                              \;\;\;\;t\_1\\
                                                                                                                                                              
                                                                                                                                                              \mathbf{elif}\;z \leq 1.7 \cdot 10^{-85}:\\
                                                                                                                                                              \;\;\;\;\left(i \cdot b\right) \cdot t\\
                                                                                                                                                              
                                                                                                                                                              \mathbf{elif}\;z \leq 7800000000:\\
                                                                                                                                                              \;\;\;\;t\_1\\
                                                                                                                                                              
                                                                                                                                                              \mathbf{else}:\\
                                                                                                                                                              \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\
                                                                                                                                                              
                                                                                                                                                              
                                                                                                                                                              \end{array}
                                                                                                                                                              \end{array}
                                                                                                                                                              
                                                                                                                                                              Derivation
                                                                                                                                                              1. Split input into 4 regimes
                                                                                                                                                              2. if z < -3.10000000000000019e53

                                                                                                                                                                1. Initial program 68.2%

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

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

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

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

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

                                                                                                                                                                    if -3.10000000000000019e53 < z < -5.9999999999999999e-297 or 1.7e-85 < z < 7.8e9

                                                                                                                                                                    1. Initial program 74.8%

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

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

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

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

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

                                                                                                                                                                        if -5.9999999999999999e-297 < z < 1.7e-85

                                                                                                                                                                        1. Initial program 83.9%

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

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

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

                                                                                                                                                                            \[\leadsto \left(b \cdot i\right) \cdot t \]
                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                            1. Applied rewrites33.6%

                                                                                                                                                                              \[\leadsto \left(i \cdot b\right) \cdot t \]

                                                                                                                                                                            if 7.8e9 < z

                                                                                                                                                                            1. Initial program 66.1%

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

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

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

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

                                                                                                                                                                                \[\leadsto \left(-b\right) \cdot \color{blue}{\left(c \cdot z\right)} \]
                                                                                                                                                                            7. Recombined 4 regimes into one program.
                                                                                                                                                                            8. Final simplification41.5%

                                                                                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-297}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-85}:\\ \;\;\;\;\left(i \cdot b\right) \cdot t\\ \mathbf{elif}\;z \leq 7800000000:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \end{array} \]
                                                                                                                                                                            9. Add Preprocessing

                                                                                                                                                                            Alternative 18: 52.2% accurate, 1.6× speedup?

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

                                                                                                                                                                              1. Initial program 73.0%

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

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

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

                                                                                                                                                                                if -6.6000000000000003e79 < x < -1.17999999999999996e-200

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

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

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

                                                                                                                                                                                  if -1.17999999999999996e-200 < x < 1.79999999999999989e-56

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

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

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

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

                                                                                                                                                                                  Alternative 19: 47.6% accurate, 1.6× speedup?

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

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

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

                                                                                                                                                                                    if -4.1999999999999997e48 < z < -1.59999999999999999e-242

                                                                                                                                                                                    1. Initial program 74.1%

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

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

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

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

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

                                                                                                                                                                                        if -1.59999999999999999e-242 < z < 5.5999999999999999e-27

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

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

                                                                                                                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i} \]
                                                                                                                                                                                          2. Step-by-step derivation
                                                                                                                                                                                            1. Applied rewrites48.3%

                                                                                                                                                                                              \[\leadsto \mathsf{fma}\left(t, b, \left(-y\right) \cdot j\right) \cdot i \]
                                                                                                                                                                                          3. Recombined 3 regimes into one program.
                                                                                                                                                                                          4. Final simplification53.6%

                                                                                                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+48}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-242}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-27}:\\ \;\;\;\;\mathsf{fma}\left(t, b, \left(-y\right) \cdot j\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \end{array} \]
                                                                                                                                                                                          5. Add Preprocessing

                                                                                                                                                                                          Alternative 20: 51.3% accurate, 2.0× speedup?

                                                                                                                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+140} \lor \neg \left(a \leq 1.1 \cdot 10^{+69}\right):\\ \;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\ \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
                                                                                                                                                                                           (if (or (<= a -8e+140) (not (<= a 1.1e+69)))
                                                                                                                                                                                             (* (fma (- t) x (* j c)) a)
                                                                                                                                                                                             (* (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 <= -8e+140) || !(a <= 1.1e+69)) {
                                                                                                                                                                                          		tmp = fma(-t, x, (j * c)) * a;
                                                                                                                                                                                          	} else {
                                                                                                                                                                                          		tmp = fma(-i, j, (z * x)) * y;
                                                                                                                                                                                          	}
                                                                                                                                                                                          	return tmp;
                                                                                                                                                                                          }
                                                                                                                                                                                          
                                                                                                                                                                                          function code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                                                          	tmp = 0.0
                                                                                                                                                                                          	if ((a <= -8e+140) || !(a <= 1.1e+69))
                                                                                                                                                                                          		tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a);
                                                                                                                                                                                          	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_] := If[Or[LessEqual[a, -8e+140], N[Not[LessEqual[a, 1.1e+69]], $MachinePrecision]], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
                                                                                                                                                                                          
                                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                                          
                                                                                                                                                                                          \\
                                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                                          \mathbf{if}\;a \leq -8 \cdot 10^{+140} \lor \neg \left(a \leq 1.1 \cdot 10^{+69}\right):\\
                                                                                                                                                                                          \;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
                                                                                                                                                                                          
                                                                                                                                                                                          \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 a < -8.00000000000000047e140 or 1.1000000000000001e69 < a

                                                                                                                                                                                            1. Initial program 55.5%

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

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

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

                                                                                                                                                                                              if -8.00000000000000047e140 < a < 1.1000000000000001e69

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

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

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

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

                                                                                                                                                                                              Alternative 21: 28.4% accurate, 2.6× speedup?

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

                                                                                                                                                                                                1. Initial program 59.4%

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

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

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

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

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

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

                                                                                                                                                                                                    if -5.79999999999999971e80 < a < 1.99999999999999992e226

                                                                                                                                                                                                    1. Initial program 79.1%

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

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

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

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

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

                                                                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+80} \lor \neg \left(a \leq 2 \cdot 10^{+226}\right):\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \]
                                                                                                                                                                                                    9. Add Preprocessing

                                                                                                                                                                                                    Alternative 22: 30.3% accurate, 2.6× speedup?

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

                                                                                                                                                                                                      1. Initial program 57.5%

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

                                                                                                                                                                                                        \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
                                                                                                                                                                                                      4. Applied rewrites45.4%

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

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

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

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

                                                                                                                                                                                                          if -4.8e23 < a < 4.5000000000000001e128

                                                                                                                                                                                                          1. Initial program 84.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 i around inf

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

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

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

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

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

                                                                                                                                                                                                            Alternative 23: 28.4% accurate, 2.6× speedup?

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

                                                                                                                                                                                                              1. Initial program 58.0%

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

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

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

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

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

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

                                                                                                                                                                                                                  if -5.79999999999999971e80 < a < 1.99999999999999992e226

                                                                                                                                                                                                                  1. Initial program 79.1%

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

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

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

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

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

                                                                                                                                                                                                                    if 1.99999999999999992e226 < a

                                                                                                                                                                                                                    1. Initial program 62.4%

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

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

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

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

                                                                                                                                                                                                                        \[\leadsto \left(j \cdot a\right) \cdot c \]
                                                                                                                                                                                                                    7. Recombined 3 regimes into one program.
                                                                                                                                                                                                                    8. Final simplification33.6%

                                                                                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+80}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+226}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot a\right) \cdot c\\ \end{array} \]
                                                                                                                                                                                                                    9. Add Preprocessing

                                                                                                                                                                                                                    Alternative 24: 30.2% accurate, 2.6× speedup?

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

                                                                                                                                                                                                                      1. Initial program 61.4%

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

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

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

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

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

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

                                                                                                                                                                                                                          if -4.8e23 < a < 4.5000000000000001e128

                                                                                                                                                                                                                          1. Initial program 84.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 i around inf

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

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

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

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

                                                                                                                                                                                                                              if 4.5000000000000001e128 < a

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

                                                                                                                                                                                                                                \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
                                                                                                                                                                                                                              4. Applied rewrites40.4%

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

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

                                                                                                                                                                                                                                  \[\leadsto \left(j \cdot c\right) \cdot \color{blue}{a} \]
                                                                                                                                                                                                                              7. Recombined 3 regimes into one program.
                                                                                                                                                                                                                              8. Final simplification30.2%

                                                                                                                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+23}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+128}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \end{array} \]
                                                                                                                                                                                                                              9. Add Preprocessing

                                                                                                                                                                                                                              Alternative 25: 22.2% accurate, 5.5× speedup?

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

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

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

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

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

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

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

                                                                                                                                                                                                                                  Developer Target 1: 59.5% 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 2025018 
                                                                                                                                                                                                                                  (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)))))