Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 73.7% → 79.8%
Time: 15.3s
Alternatives: 30
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
  (* j (- (* c t) (* i y)))))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
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) - (i * a)))) + (j * ((c * t) - (i * y)))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j):
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y))))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
  (* j (- (* c t) (* i y)))))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
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) - (i * a)))) + (j * ((c * t) - (i * y)))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j):
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y))))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 79.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+145}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-17} \lor \neg \left(z \leq 8 \cdot 10^{+116}\right):\\ \;\;\;\;\left(\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)}{z}\right) - c \cdot b\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-a, x, j \cdot c\right), t, \mathsf{fma}\left(-j, i, 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 (<= z -2.3e+145)
   (* (fma (- b) c (* y x)) z)
   (if (or (<= z -1.2e-17) (not (<= z 8e+116)))
     (*
      (-
       (fma
        y
        x
        (/ (fma (fma (- x) t (* i b)) a (* (fma (- i) y (* c t)) j)) z))
       (* c b))
      z)
     (fma
      (fma (- c) z (* i a))
      b
      (fma (fma (- a) x (* j c)) t (* (fma (- j) i (* z x)) y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (z <= -2.3e+145) {
		tmp = fma(-b, c, (y * x)) * z;
	} else if ((z <= -1.2e-17) || !(z <= 8e+116)) {
		tmp = (fma(y, x, (fma(fma(-x, t, (i * b)), a, (fma(-i, y, (c * t)) * j)) / z)) - (c * b)) * z;
	} else {
		tmp = fma(fma(-c, z, (i * a)), b, fma(fma(-a, x, (j * c)), t, (fma(-j, i, (z * x)) * y)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (z <= -2.3e+145)
		tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z);
	elseif ((z <= -1.2e-17) || !(z <= 8e+116))
		tmp = Float64(Float64(fma(y, x, Float64(fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(fma(Float64(-i), y, Float64(c * t)) * j)) / z)) - Float64(c * b)) * z);
	else
		tmp = fma(fma(Float64(-c), z, Float64(i * a)), b, fma(fma(Float64(-a), x, Float64(j * c)), t, Float64(fma(Float64(-j), i, Float64(z * x)) * y)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -2.3e+145], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[Or[LessEqual[z, -1.2e-17], N[Not[LessEqual[z, 8e+116]], $MachinePrecision]], N[(N[(N[(y * x + N[(N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+145}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-17} \lor \neg \left(z \leq 8 \cdot 10^{+116}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)}{z}\right) - c \cdot b\right) \cdot z\\

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


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

    1. Initial program 61.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites87.4%

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

    if -2.3e145 < z < -1.19999999999999993e-17 or 8.00000000000000012e116 < z

    1. Initial program 75.5%

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

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

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

    if -1.19999999999999993e-17 < z < 8.00000000000000012e116

    1. Initial program 74.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+145}:\\ \;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-17} \lor \neg \left(z \leq 8 \cdot 10^{+116}\right):\\ \;\;\;\;\left(\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)}{z}\right) - c \cdot b\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-a, x, j \cdot c\right), t, \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 77.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\

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

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


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

    1. Initial program 60.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites80.9%

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

    if -2.5e119 < z < -1.19999999999999993e-17

    1. Initial program 91.2%

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

    if -1.19999999999999993e-17 < z

    1. Initial program 74.0%

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

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

Alternative 3: 77.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+142}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\

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


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

    1. Initial program 61.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites87.4%

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

    if -9.5999999999999996e142 < z

    1. Initial program 75.0%

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

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

Alternative 4: 49.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -2.35 \cdot 10^{+132}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-100}:\\ \;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\ \mathbf{elif}\;z \leq -5.7 \cdot 10^{-142}:\\ \;\;\;\;\left(\mathsf{fma}\left(-i, \frac{j}{z}, x\right) \cdot y\right) \cdot z\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-186}:\\ \;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(-c, j, a \cdot x\right)\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-79}:\\ \;\;\;\;\left(\left(j - \frac{b \cdot a}{y}\right) \cdot \left(-i\right)\right) \cdot y\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;\mathsf{fma}\left(\left(-a\right) \cdot t, x, \left(z \cdot y\right) \cdot x\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 (- b) c (* y x)) z)))
   (if (<= z -2.35e+132)
     t_1
     (if (<= z -9.5e-100)
       (* (fma (- x) t (* i b)) a)
       (if (<= z -5.7e-142)
         (* (* (fma (- i) (/ j z) x) y) z)
         (if (<= z 7.2e-186)
           (* (- t) (fma (- c) j (* a x)))
           (if (<= z 2.15e-79)
             (* (* (- j (/ (* b a) y)) (- i)) y)
             (if (<= z 9600000000.0)
               (fma (* (- a) t) x (* (* z y) x))
               t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(-b, c, (y * x)) * z;
	double tmp;
	if (z <= -2.35e+132) {
		tmp = t_1;
	} else if (z <= -9.5e-100) {
		tmp = fma(-x, t, (i * b)) * a;
	} else if (z <= -5.7e-142) {
		tmp = (fma(-i, (j / z), x) * y) * z;
	} else if (z <= 7.2e-186) {
		tmp = -t * fma(-c, j, (a * x));
	} else if (z <= 2.15e-79) {
		tmp = ((j - ((b * a) / y)) * -i) * y;
	} else if (z <= 9600000000.0) {
		tmp = fma((-a * t), x, ((z * y) * x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(Float64(-b), c, Float64(y * x)) * z)
	tmp = 0.0
	if (z <= -2.35e+132)
		tmp = t_1;
	elseif (z <= -9.5e-100)
		tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a);
	elseif (z <= -5.7e-142)
		tmp = Float64(Float64(fma(Float64(-i), Float64(j / z), x) * y) * z);
	elseif (z <= 7.2e-186)
		tmp = Float64(Float64(-t) * fma(Float64(-c), j, Float64(a * x)));
	elseif (z <= 2.15e-79)
		tmp = Float64(Float64(Float64(j - Float64(Float64(b * a) / y)) * Float64(-i)) * y);
	elseif (z <= 9600000000.0)
		tmp = fma(Float64(Float64(-a) * t), x, Float64(Float64(z * y) * x));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.35e+132], t$95$1, If[LessEqual[z, -9.5e-100], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, -5.7e-142], N[(N[(N[((-i) * N[(j / z), $MachinePrecision] + x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 7.2e-186], N[((-t) * N[((-c) * j + N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e-79], N[(N[(N[(j - N[(N[(b * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 9600000000.0], N[(N[((-a) * t), $MachinePrecision] * x + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq -5.7 \cdot 10^{-142}:\\
\;\;\;\;\left(\mathsf{fma}\left(-i, \frac{j}{z}, x\right) \cdot y\right) \cdot z\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{-186}:\\
\;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(-c, j, a \cdot x\right)\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{-79}:\\
\;\;\;\;\left(\left(j - \frac{b \cdot a}{y}\right) \cdot \left(-i\right)\right) \cdot y\\

\mathbf{elif}\;z \leq 9600000000:\\
\;\;\;\;\mathsf{fma}\left(\left(-a\right) \cdot t, x, \left(z \cdot y\right) \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -2.35e132 or 9.6e9 < z

    1. Initial program 68.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites71.0%

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

    if -2.35e132 < z < -9.4999999999999992e-100

    1. Initial program 80.9%

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

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

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

      if -9.4999999999999992e-100 < z < -5.69999999999999995e-142

      1. Initial program 91.6%

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

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

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

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

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

        if -5.69999999999999995e-142 < z < 7.1999999999999997e-186

        1. Initial program 72.5%

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

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

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

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

          if 7.1999999999999997e-186 < z < 2.14999999999999991e-79

          1. Initial program 68.8%

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

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

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

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

            \[\leadsto \left(-1 \cdot \left(i \cdot \left(j - \frac{a \cdot b}{y}\right)\right)\right) \cdot y \]
          8. Step-by-step derivation
            1. Applied rewrites67.9%

              \[\leadsto \left(\left(j - \frac{b \cdot a}{y}\right) \cdot \left(-i\right)\right) \cdot y \]

            if 2.14999999999999991e-79 < z < 9.6e9

            1. Initial program 78.5%

              \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites61.6%

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

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

              Alternative 5: 49.9% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -2.35 \cdot 10^{+132}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-100}:\\ \;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\ \mathbf{elif}\;z \leq -5.7 \cdot 10^{-142}:\\ \;\;\;\;\left(\mathsf{fma}\left(-i, \frac{j}{z}, x\right) \cdot y\right) \cdot z\\ \mathbf{elif}\;z \leq 3.35 \cdot 10^{-186}:\\ \;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(-c, j, a \cdot x\right)\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-79}:\\ \;\;\;\;\mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;\mathsf{fma}\left(\left(-a\right) \cdot t, x, \left(z \cdot y\right) \cdot x\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 (- b) c (* y x)) z)))
                 (if (<= z -2.35e+132)
                   t_1
                   (if (<= z -9.5e-100)
                     (* (fma (- x) t (* i b)) a)
                     (if (<= z -5.7e-142)
                       (* (* (fma (- i) (/ j z) x) y) z)
                       (if (<= z 3.35e-186)
                         (* (- t) (fma (- c) j (* a x)))
                         (if (<= z 2.15e-79)
                           (* (fma (- y) j (* b a)) i)
                           (if (<= z 9600000000.0)
                             (fma (* (- a) t) x (* (* z y) x))
                             t_1))))))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
              	double t_1 = fma(-b, c, (y * x)) * z;
              	double tmp;
              	if (z <= -2.35e+132) {
              		tmp = t_1;
              	} else if (z <= -9.5e-100) {
              		tmp = fma(-x, t, (i * b)) * a;
              	} else if (z <= -5.7e-142) {
              		tmp = (fma(-i, (j / z), x) * y) * z;
              	} else if (z <= 3.35e-186) {
              		tmp = -t * fma(-c, j, (a * x));
              	} else if (z <= 2.15e-79) {
              		tmp = fma(-y, j, (b * a)) * i;
              	} else if (z <= 9600000000.0) {
              		tmp = fma((-a * t), x, ((z * y) * x));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i, j)
              	t_1 = Float64(fma(Float64(-b), c, Float64(y * x)) * z)
              	tmp = 0.0
              	if (z <= -2.35e+132)
              		tmp = t_1;
              	elseif (z <= -9.5e-100)
              		tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a);
              	elseif (z <= -5.7e-142)
              		tmp = Float64(Float64(fma(Float64(-i), Float64(j / z), x) * y) * z);
              	elseif (z <= 3.35e-186)
              		tmp = Float64(Float64(-t) * fma(Float64(-c), j, Float64(a * x)));
              	elseif (z <= 2.15e-79)
              		tmp = Float64(fma(Float64(-y), j, Float64(b * a)) * i);
              	elseif (z <= 9600000000.0)
              		tmp = fma(Float64(Float64(-a) * t), x, Float64(Float64(z * y) * x));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.35e+132], t$95$1, If[LessEqual[z, -9.5e-100], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, -5.7e-142], N[(N[(N[((-i) * N[(j / z), $MachinePrecision] + x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 3.35e-186], N[((-t) * N[((-c) * j + N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e-79], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 9600000000.0], N[(N[((-a) * t), $MachinePrecision] * x + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
              \mathbf{if}\;z \leq -2.35 \cdot 10^{+132}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;z \leq -9.5 \cdot 10^{-100}:\\
              \;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
              
              \mathbf{elif}\;z \leq -5.7 \cdot 10^{-142}:\\
              \;\;\;\;\left(\mathsf{fma}\left(-i, \frac{j}{z}, x\right) \cdot y\right) \cdot z\\
              
              \mathbf{elif}\;z \leq 3.35 \cdot 10^{-186}:\\
              \;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(-c, j, a \cdot x\right)\\
              
              \mathbf{elif}\;z \leq 2.15 \cdot 10^{-79}:\\
              \;\;\;\;\mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\
              
              \mathbf{elif}\;z \leq 9600000000:\\
              \;\;\;\;\mathsf{fma}\left(\left(-a\right) \cdot t, x, \left(z \cdot y\right) \cdot x\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 6 regimes
              2. if z < -2.35e132 or 9.6e9 < z

                1. Initial program 68.4%

                  \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites71.0%

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

                if -2.35e132 < z < -9.4999999999999992e-100

                1. Initial program 80.9%

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

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

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

                  if -9.4999999999999992e-100 < z < -5.69999999999999995e-142

                  1. Initial program 91.6%

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

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

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

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

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

                    if -5.69999999999999995e-142 < z < 3.35000000000000017e-186

                    1. Initial program 72.5%

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

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

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

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

                      if 3.35000000000000017e-186 < z < 2.14999999999999991e-79

                      1. Initial program 68.8%

                        \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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(a \cdot b\right)\right)} \]
                      4. Step-by-step derivation
                        1. Applied rewrites65.0%

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

                        if 2.14999999999999991e-79 < z < 9.6e9

                        1. Initial program 78.5%

                          \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites61.6%

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

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

                          Alternative 6: 49.8% accurate, 1.1× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\ t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -2.35 \cdot 10^{+132}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-85}:\\ \;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-137}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.35 \cdot 10^{-186}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-79}:\\ \;\;\;\;\mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b c i j)
                           :precision binary64
                           (let* ((t_1 (* (fma (- a) t (* z y)) x)) (t_2 (* (fma (- b) c (* y x)) z)))
                             (if (<= z -2.35e+132)
                               t_2
                               (if (<= z -2.8e-85)
                                 (* (fma (- x) t (* i b)) a)
                                 (if (<= z -7.5e-137)
                                   t_1
                                   (if (<= z 3.35e-186)
                                     (* (fma (- a) x (* j c)) t)
                                     (if (<= z 2.15e-79)
                                       (* (fma (- y) j (* b a)) i)
                                       (if (<= z 9600000000.0) t_1 t_2))))))))
                          double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                          	double t_1 = fma(-a, t, (z * y)) * x;
                          	double t_2 = fma(-b, c, (y * x)) * z;
                          	double tmp;
                          	if (z <= -2.35e+132) {
                          		tmp = t_2;
                          	} else if (z <= -2.8e-85) {
                          		tmp = fma(-x, t, (i * b)) * a;
                          	} else if (z <= -7.5e-137) {
                          		tmp = t_1;
                          	} else if (z <= 3.35e-186) {
                          		tmp = fma(-a, x, (j * c)) * t;
                          	} else if (z <= 2.15e-79) {
                          		tmp = fma(-y, j, (b * a)) * i;
                          	} else if (z <= 9600000000.0) {
                          		tmp = t_1;
                          	} else {
                          		tmp = t_2;
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a, b, c, i, j)
                          	t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x)
                          	t_2 = Float64(fma(Float64(-b), c, Float64(y * x)) * z)
                          	tmp = 0.0
                          	if (z <= -2.35e+132)
                          		tmp = t_2;
                          	elseif (z <= -2.8e-85)
                          		tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a);
                          	elseif (z <= -7.5e-137)
                          		tmp = t_1;
                          	elseif (z <= 3.35e-186)
                          		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
                          	elseif (z <= 2.15e-79)
                          		tmp = Float64(fma(Float64(-y), j, Float64(b * a)) * i);
                          	elseif (z <= 9600000000.0)
                          		tmp = t_1;
                          	else
                          		tmp = t_2;
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.35e+132], t$95$2, If[LessEqual[z, -2.8e-85], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, -7.5e-137], t$95$1, If[LessEqual[z, 3.35e-186], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.15e-79], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 9600000000.0], t$95$1, t$95$2]]]]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
                          t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
                          \mathbf{if}\;z \leq -2.35 \cdot 10^{+132}:\\
                          \;\;\;\;t\_2\\
                          
                          \mathbf{elif}\;z \leq -2.8 \cdot 10^{-85}:\\
                          \;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
                          
                          \mathbf{elif}\;z \leq -7.5 \cdot 10^{-137}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;z \leq 3.35 \cdot 10^{-186}:\\
                          \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
                          
                          \mathbf{elif}\;z \leq 2.15 \cdot 10^{-79}:\\
                          \;\;\;\;\mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\
                          
                          \mathbf{elif}\;z \leq 9600000000:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_2\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 5 regimes
                          2. if z < -2.35e132 or 9.6e9 < z

                            1. Initial program 68.4%

                              \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites71.0%

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

                            if -2.35e132 < z < -2.80000000000000017e-85

                            1. Initial program 79.0%

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

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

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

                              if -2.80000000000000017e-85 < z < -7.4999999999999995e-137 or 2.14999999999999991e-79 < z < 9.6e9

                              1. Initial program 86.1%

                                \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites63.6%

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

                                if -7.4999999999999995e-137 < z < 3.35000000000000017e-186

                                1. Initial program 72.0%

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

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

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

                                  if 3.35000000000000017e-186 < z < 2.14999999999999991e-79

                                  1. Initial program 68.8%

                                    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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(a \cdot b\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. Applied rewrites65.0%

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

                                  Alternative 7: 64.6% accurate, 1.2× speedup?

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

                                    1. Initial program 69.9%

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

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

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

                                      if -1.5599999999999999e29 < c < 1.84999999999999999e-12

                                      1. Initial program 80.9%

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

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

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

                                      if 1.84999999999999999e-12 < c < 1.50000000000000001e146

                                      1. Initial program 75.8%

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

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

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

                                        if 1.50000000000000001e146 < c

                                        1. Initial program 51.1%

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

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

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

                                        Alternative 8: 51.0% accurate, 1.2× speedup?

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

                                          1. Initial program 62.2%

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

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

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

                                            if -4.00000000000000014e62 < t < -1.75e-41

                                            1. Initial program 68.3%

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

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

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

                                              if -1.75e-41 < t < -3.0000000000000002e-104

                                              1. Initial program 67.2%

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

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

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

                                                if -3.0000000000000002e-104 < t < 7.19999999999999989e-280

                                                1. Initial program 79.5%

                                                  \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites65.6%

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

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

                                                    if 7.19999999999999989e-280 < t < 1.08e-94

                                                    1. Initial program 85.7%

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

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

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

                                                      if 1.08e-94 < t

                                                      1. Initial program 73.1%

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

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

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

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

                                                      Alternative 9: 29.0% accurate, 1.2× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\ \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-171}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-62}:\\ \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;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 (* (* (- t) a) x)))
                                                         (if (<= z -1.8e+143)
                                                           (* (* z x) y)
                                                           (if (<= z -2.6e+110)
                                                             (* b (* (- c) z))
                                                             (if (<= z -3.2e-243)
                                                               t_1
                                                               (if (<= z 3.7e-171)
                                                                 (* (* j t) c)
                                                                 (if (<= z 1.5e-62)
                                                                   (* (* (- i) y) j)
                                                                   (if (<= z 9600000000.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 = (-t * a) * x;
                                                      	double tmp;
                                                      	if (z <= -1.8e+143) {
                                                      		tmp = (z * x) * y;
                                                      	} else if (z <= -2.6e+110) {
                                                      		tmp = b * (-c * z);
                                                      	} else if (z <= -3.2e-243) {
                                                      		tmp = t_1;
                                                      	} else if (z <= 3.7e-171) {
                                                      		tmp = (j * t) * c;
                                                      	} else if (z <= 1.5e-62) {
                                                      		tmp = (-i * y) * j;
                                                      	} else if (z <= 9600000000.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 = (-t * a) * x
                                                          if (z <= (-1.8d+143)) then
                                                              tmp = (z * x) * y
                                                          else if (z <= (-2.6d+110)) then
                                                              tmp = b * (-c * z)
                                                          else if (z <= (-3.2d-243)) then
                                                              tmp = t_1
                                                          else if (z <= 3.7d-171) then
                                                              tmp = (j * t) * c
                                                          else if (z <= 1.5d-62) then
                                                              tmp = (-i * y) * j
                                                          else if (z <= 9600000000.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 = (-t * a) * x;
                                                      	double tmp;
                                                      	if (z <= -1.8e+143) {
                                                      		tmp = (z * x) * y;
                                                      	} else if (z <= -2.6e+110) {
                                                      		tmp = b * (-c * z);
                                                      	} else if (z <= -3.2e-243) {
                                                      		tmp = t_1;
                                                      	} else if (z <= 3.7e-171) {
                                                      		tmp = (j * t) * c;
                                                      	} else if (z <= 1.5e-62) {
                                                      		tmp = (-i * y) * j;
                                                      	} else if (z <= 9600000000.0) {
                                                      		tmp = t_1;
                                                      	} else {
                                                      		tmp = (-z * b) * c;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x, y, z, t, a, b, c, i, j):
                                                      	t_1 = (-t * a) * x
                                                      	tmp = 0
                                                      	if z <= -1.8e+143:
                                                      		tmp = (z * x) * y
                                                      	elif z <= -2.6e+110:
                                                      		tmp = b * (-c * z)
                                                      	elif z <= -3.2e-243:
                                                      		tmp = t_1
                                                      	elif z <= 3.7e-171:
                                                      		tmp = (j * t) * c
                                                      	elif z <= 1.5e-62:
                                                      		tmp = (-i * y) * j
                                                      	elif z <= 9600000000.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(Float64(-t) * a) * x)
                                                      	tmp = 0.0
                                                      	if (z <= -1.8e+143)
                                                      		tmp = Float64(Float64(z * x) * y);
                                                      	elseif (z <= -2.6e+110)
                                                      		tmp = Float64(b * Float64(Float64(-c) * z));
                                                      	elseif (z <= -3.2e-243)
                                                      		tmp = t_1;
                                                      	elseif (z <= 3.7e-171)
                                                      		tmp = Float64(Float64(j * t) * c);
                                                      	elseif (z <= 1.5e-62)
                                                      		tmp = Float64(Float64(Float64(-i) * y) * j);
                                                      	elseif (z <= 9600000000.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 = (-t * a) * x;
                                                      	tmp = 0.0;
                                                      	if (z <= -1.8e+143)
                                                      		tmp = (z * x) * y;
                                                      	elseif (z <= -2.6e+110)
                                                      		tmp = b * (-c * z);
                                                      	elseif (z <= -3.2e-243)
                                                      		tmp = t_1;
                                                      	elseif (z <= 3.7e-171)
                                                      		tmp = (j * t) * c;
                                                      	elseif (z <= 1.5e-62)
                                                      		tmp = (-i * y) * j;
                                                      	elseif (z <= 9600000000.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[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.8e+143], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -2.6e+110], N[(b * N[((-c) * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-243], t$95$1, If[LessEqual[z, 3.7e-171], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 1.5e-62], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 9600000000.0], t$95$1, N[(N[((-z) * b), $MachinePrecision] * c), $MachinePrecision]]]]]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_1 := \left(\left(-t\right) \cdot a\right) \cdot x\\
                                                      \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\
                                                      \;\;\;\;\left(z \cdot x\right) \cdot y\\
                                                      
                                                      \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\
                                                      \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\
                                                      
                                                      \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      \mathbf{elif}\;z \leq 3.7 \cdot 10^{-171}:\\
                                                      \;\;\;\;\left(j \cdot t\right) \cdot c\\
                                                      
                                                      \mathbf{elif}\;z \leq 1.5 \cdot 10^{-62}:\\
                                                      \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
                                                      
                                                      \mathbf{elif}\;z \leq 9600000000:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 6 regimes
                                                      2. if z < -1.8e143

                                                        1. Initial program 61.2%

                                                          \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites74.8%

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

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

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

                                                            if -1.8e143 < z < -2.6e110

                                                            1. Initial program 60.9%

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

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

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

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

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

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

                                                                  if -2.6e110 < z < -3.1999999999999998e-243 or 1.5000000000000001e-62 < z < 9.6e9

                                                                  1. Initial program 84.0%

                                                                    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites54.8%

                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites42.5%

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

                                                                      if -3.1999999999999998e-243 < z < 3.70000000000000012e-171

                                                                      1. Initial program 65.7%

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

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

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

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

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

                                                                          if 3.70000000000000012e-171 < z < 1.5000000000000001e-62

                                                                          1. Initial program 71.5%

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

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

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

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

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

                                                                              if 9.6e9 < z

                                                                              1. Initial program 72.0%

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

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

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

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

                                                                                    \[\leadsto \left(\left(-z\right) \cdot b\right) \cdot c \]
                                                                                4. Recombined 6 regimes into one program.
                                                                                5. Final simplification47.2%

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\ \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\ \;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-171}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-62}:\\ \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\ \end{array} \]
                                                                                6. Add Preprocessing

                                                                                Alternative 10: 28.9% accurate, 1.2× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(-c\right) \cdot z\right)\\ t_2 := \left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-171}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-62}:\\ \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                (FPCore (x y z t a b c i j)
                                                                                 :precision binary64
                                                                                 (let* ((t_1 (* b (* (- c) z))) (t_2 (* (* (- t) a) x)))
                                                                                   (if (<= z -1.8e+143)
                                                                                     (* (* z x) y)
                                                                                     (if (<= z -2.6e+110)
                                                                                       t_1
                                                                                       (if (<= z -3.2e-243)
                                                                                         t_2
                                                                                         (if (<= z 3.7e-171)
                                                                                           (* (* j t) c)
                                                                                           (if (<= z 1.5e-62)
                                                                                             (* (* (- i) y) j)
                                                                                             (if (<= z 9600000000.0) t_2 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 = b * (-c * z);
                                                                                	double t_2 = (-t * a) * x;
                                                                                	double tmp;
                                                                                	if (z <= -1.8e+143) {
                                                                                		tmp = (z * x) * y;
                                                                                	} else if (z <= -2.6e+110) {
                                                                                		tmp = t_1;
                                                                                	} else if (z <= -3.2e-243) {
                                                                                		tmp = t_2;
                                                                                	} else if (z <= 3.7e-171) {
                                                                                		tmp = (j * t) * c;
                                                                                	} else if (z <= 1.5e-62) {
                                                                                		tmp = (-i * y) * j;
                                                                                	} else if (z <= 9600000000.0) {
                                                                                		tmp = t_2;
                                                                                	} else {
                                                                                		tmp = t_1;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                module fmin_fmax_functions
                                                                                    implicit none
                                                                                    private
                                                                                    public fmax
                                                                                    public fmin
                                                                                
                                                                                    interface fmax
                                                                                        module procedure fmax88
                                                                                        module procedure fmax44
                                                                                        module procedure fmax84
                                                                                        module procedure fmax48
                                                                                    end interface
                                                                                    interface fmin
                                                                                        module procedure fmin88
                                                                                        module procedure fmin44
                                                                                        module procedure fmin84
                                                                                        module procedure fmin48
                                                                                    end interface
                                                                                contains
                                                                                    real(8) function fmax88(x, y) result (res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(4) function fmax44(x, y) result (res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmax84(x, y) result(res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmax48(x, y) result(res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin88(x, y) result (res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(4) function fmin44(x, y) result (res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin84(x, y) result(res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin48(x, y) result(res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                    end function
                                                                                end module
                                                                                
                                                                                real(8) function code(x, y, z, t, a, b, c, i, j)
                                                                                use fmin_fmax_functions
                                                                                    real(8), intent (in) :: x
                                                                                    real(8), intent (in) :: y
                                                                                    real(8), intent (in) :: z
                                                                                    real(8), intent (in) :: t
                                                                                    real(8), intent (in) :: a
                                                                                    real(8), intent (in) :: b
                                                                                    real(8), intent (in) :: c
                                                                                    real(8), intent (in) :: i
                                                                                    real(8), intent (in) :: j
                                                                                    real(8) :: t_1
                                                                                    real(8) :: t_2
                                                                                    real(8) :: tmp
                                                                                    t_1 = b * (-c * z)
                                                                                    t_2 = (-t * a) * x
                                                                                    if (z <= (-1.8d+143)) then
                                                                                        tmp = (z * x) * y
                                                                                    else if (z <= (-2.6d+110)) then
                                                                                        tmp = t_1
                                                                                    else if (z <= (-3.2d-243)) then
                                                                                        tmp = t_2
                                                                                    else if (z <= 3.7d-171) then
                                                                                        tmp = (j * t) * c
                                                                                    else if (z <= 1.5d-62) then
                                                                                        tmp = (-i * y) * j
                                                                                    else if (z <= 9600000000.0d0) then
                                                                                        tmp = t_2
                                                                                    else
                                                                                        tmp = t_1
                                                                                    end if
                                                                                    code = tmp
                                                                                end function
                                                                                
                                                                                public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                                	double t_1 = b * (-c * z);
                                                                                	double t_2 = (-t * a) * x;
                                                                                	double tmp;
                                                                                	if (z <= -1.8e+143) {
                                                                                		tmp = (z * x) * y;
                                                                                	} else if (z <= -2.6e+110) {
                                                                                		tmp = t_1;
                                                                                	} else if (z <= -3.2e-243) {
                                                                                		tmp = t_2;
                                                                                	} else if (z <= 3.7e-171) {
                                                                                		tmp = (j * t) * c;
                                                                                	} else if (z <= 1.5e-62) {
                                                                                		tmp = (-i * y) * j;
                                                                                	} else if (z <= 9600000000.0) {
                                                                                		tmp = t_2;
                                                                                	} else {
                                                                                		tmp = t_1;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                def code(x, y, z, t, a, b, c, i, j):
                                                                                	t_1 = b * (-c * z)
                                                                                	t_2 = (-t * a) * x
                                                                                	tmp = 0
                                                                                	if z <= -1.8e+143:
                                                                                		tmp = (z * x) * y
                                                                                	elif z <= -2.6e+110:
                                                                                		tmp = t_1
                                                                                	elif z <= -3.2e-243:
                                                                                		tmp = t_2
                                                                                	elif z <= 3.7e-171:
                                                                                		tmp = (j * t) * c
                                                                                	elif z <= 1.5e-62:
                                                                                		tmp = (-i * y) * j
                                                                                	elif z <= 9600000000.0:
                                                                                		tmp = t_2
                                                                                	else:
                                                                                		tmp = t_1
                                                                                	return tmp
                                                                                
                                                                                function code(x, y, z, t, a, b, c, i, j)
                                                                                	t_1 = Float64(b * Float64(Float64(-c) * z))
                                                                                	t_2 = Float64(Float64(Float64(-t) * a) * x)
                                                                                	tmp = 0.0
                                                                                	if (z <= -1.8e+143)
                                                                                		tmp = Float64(Float64(z * x) * y);
                                                                                	elseif (z <= -2.6e+110)
                                                                                		tmp = t_1;
                                                                                	elseif (z <= -3.2e-243)
                                                                                		tmp = t_2;
                                                                                	elseif (z <= 3.7e-171)
                                                                                		tmp = Float64(Float64(j * t) * c);
                                                                                	elseif (z <= 1.5e-62)
                                                                                		tmp = Float64(Float64(Float64(-i) * y) * j);
                                                                                	elseif (z <= 9600000000.0)
                                                                                		tmp = t_2;
                                                                                	else
                                                                                		tmp = t_1;
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                                	t_1 = b * (-c * z);
                                                                                	t_2 = (-t * a) * x;
                                                                                	tmp = 0.0;
                                                                                	if (z <= -1.8e+143)
                                                                                		tmp = (z * x) * y;
                                                                                	elseif (z <= -2.6e+110)
                                                                                		tmp = t_1;
                                                                                	elseif (z <= -3.2e-243)
                                                                                		tmp = t_2;
                                                                                	elseif (z <= 3.7e-171)
                                                                                		tmp = (j * t) * c;
                                                                                	elseif (z <= 1.5e-62)
                                                                                		tmp = (-i * y) * j;
                                                                                	elseif (z <= 9600000000.0)
                                                                                		tmp = t_2;
                                                                                	else
                                                                                		tmp = t_1;
                                                                                	end
                                                                                	tmp_2 = tmp;
                                                                                end
                                                                                
                                                                                code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[((-c) * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.8e+143], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -2.6e+110], t$95$1, If[LessEqual[z, -3.2e-243], t$95$2, If[LessEqual[z, 3.7e-171], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 1.5e-62], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 9600000000.0], t$95$2, t$95$1]]]]]]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_1 := b \cdot \left(\left(-c\right) \cdot z\right)\\
                                                                                t_2 := \left(\left(-t\right) \cdot a\right) \cdot x\\
                                                                                \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\
                                                                                \;\;\;\;\left(z \cdot x\right) \cdot y\\
                                                                                
                                                                                \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\
                                                                                \;\;\;\;t\_1\\
                                                                                
                                                                                \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\
                                                                                \;\;\;\;t\_2\\
                                                                                
                                                                                \mathbf{elif}\;z \leq 3.7 \cdot 10^{-171}:\\
                                                                                \;\;\;\;\left(j \cdot t\right) \cdot c\\
                                                                                
                                                                                \mathbf{elif}\;z \leq 1.5 \cdot 10^{-62}:\\
                                                                                \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
                                                                                
                                                                                \mathbf{elif}\;z \leq 9600000000:\\
                                                                                \;\;\;\;t\_2\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;t\_1\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 5 regimes
                                                                                2. if z < -1.8e143

                                                                                  1. Initial program 61.2%

                                                                                    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites74.8%

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

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

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

                                                                                      if -1.8e143 < z < -2.6e110 or 9.6e9 < z

                                                                                      1. Initial program 70.2%

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

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

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

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

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

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

                                                                                            if -2.6e110 < z < -3.1999999999999998e-243 or 1.5000000000000001e-62 < z < 9.6e9

                                                                                            1. Initial program 84.0%

                                                                                              \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites54.8%

                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites42.5%

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

                                                                                                if -3.1999999999999998e-243 < z < 3.70000000000000012e-171

                                                                                                1. Initial program 65.7%

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

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

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

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

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

                                                                                                    if 3.70000000000000012e-171 < z < 1.5000000000000001e-62

                                                                                                    1. Initial program 71.5%

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

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

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

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

                                                                                                          \[\leadsto \left(\left(-i\right) \cdot y\right) \cdot j \]
                                                                                                      4. Recombined 5 regimes into one program.
                                                                                                      5. Final simplification46.1%

                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\ \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\ \;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-171}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-62}:\\ \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\ \end{array} \]
                                                                                                      6. Add Preprocessing

                                                                                                      Alternative 11: 29.0% accurate, 1.2× speedup?

                                                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(-c\right) \cdot z\right)\\ t_2 := \left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-79}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                                      (FPCore (x y z t a b c i j)
                                                                                                       :precision binary64
                                                                                                       (let* ((t_1 (* b (* (- c) z))) (t_2 (* (* (- t) a) x)))
                                                                                                         (if (<= z -1.8e+143)
                                                                                                           (* (* z x) y)
                                                                                                           (if (<= z -2.6e+110)
                                                                                                             t_1
                                                                                                             (if (<= z -3.2e-243)
                                                                                                               t_2
                                                                                                               (if (<= z 8.2e-159)
                                                                                                                 (* (* j t) c)
                                                                                                                 (if (<= z 2.05e-79)
                                                                                                                   (* (* (- j) y) i)
                                                                                                                   (if (<= z 9600000000.0) t_2 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 = b * (-c * z);
                                                                                                      	double t_2 = (-t * a) * x;
                                                                                                      	double tmp;
                                                                                                      	if (z <= -1.8e+143) {
                                                                                                      		tmp = (z * x) * y;
                                                                                                      	} else if (z <= -2.6e+110) {
                                                                                                      		tmp = t_1;
                                                                                                      	} else if (z <= -3.2e-243) {
                                                                                                      		tmp = t_2;
                                                                                                      	} else if (z <= 8.2e-159) {
                                                                                                      		tmp = (j * t) * c;
                                                                                                      	} else if (z <= 2.05e-79) {
                                                                                                      		tmp = (-j * y) * i;
                                                                                                      	} else if (z <= 9600000000.0) {
                                                                                                      		tmp = t_2;
                                                                                                      	} else {
                                                                                                      		tmp = t_1;
                                                                                                      	}
                                                                                                      	return tmp;
                                                                                                      }
                                                                                                      
                                                                                                      module fmin_fmax_functions
                                                                                                          implicit none
                                                                                                          private
                                                                                                          public fmax
                                                                                                          public fmin
                                                                                                      
                                                                                                          interface fmax
                                                                                                              module procedure fmax88
                                                                                                              module procedure fmax44
                                                                                                              module procedure fmax84
                                                                                                              module procedure fmax48
                                                                                                          end interface
                                                                                                          interface fmin
                                                                                                              module procedure fmin88
                                                                                                              module procedure fmin44
                                                                                                              module procedure fmin84
                                                                                                              module procedure fmin48
                                                                                                          end interface
                                                                                                      contains
                                                                                                          real(8) function fmax88(x, y) result (res)
                                                                                                              real(8), intent (in) :: x
                                                                                                              real(8), intent (in) :: y
                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(4) function fmax44(x, y) result (res)
                                                                                                              real(4), intent (in) :: x
                                                                                                              real(4), intent (in) :: y
                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmax84(x, y) result(res)
                                                                                                              real(8), intent (in) :: x
                                                                                                              real(4), intent (in) :: y
                                                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmax48(x, y) result(res)
                                                                                                              real(4), intent (in) :: x
                                                                                                              real(8), intent (in) :: y
                                                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmin88(x, y) result (res)
                                                                                                              real(8), intent (in) :: x
                                                                                                              real(8), intent (in) :: y
                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(4) function fmin44(x, y) result (res)
                                                                                                              real(4), intent (in) :: x
                                                                                                              real(4), intent (in) :: y
                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmin84(x, y) result(res)
                                                                                                              real(8), intent (in) :: x
                                                                                                              real(4), intent (in) :: y
                                                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmin48(x, y) result(res)
                                                                                                              real(4), intent (in) :: x
                                                                                                              real(8), intent (in) :: y
                                                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                          end function
                                                                                                      end module
                                                                                                      
                                                                                                      real(8) function code(x, y, z, t, a, b, c, i, j)
                                                                                                      use fmin_fmax_functions
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          real(8), intent (in) :: z
                                                                                                          real(8), intent (in) :: t
                                                                                                          real(8), intent (in) :: a
                                                                                                          real(8), intent (in) :: b
                                                                                                          real(8), intent (in) :: c
                                                                                                          real(8), intent (in) :: i
                                                                                                          real(8), intent (in) :: j
                                                                                                          real(8) :: t_1
                                                                                                          real(8) :: t_2
                                                                                                          real(8) :: tmp
                                                                                                          t_1 = b * (-c * z)
                                                                                                          t_2 = (-t * a) * x
                                                                                                          if (z <= (-1.8d+143)) then
                                                                                                              tmp = (z * x) * y
                                                                                                          else if (z <= (-2.6d+110)) then
                                                                                                              tmp = t_1
                                                                                                          else if (z <= (-3.2d-243)) then
                                                                                                              tmp = t_2
                                                                                                          else if (z <= 8.2d-159) then
                                                                                                              tmp = (j * t) * c
                                                                                                          else if (z <= 2.05d-79) then
                                                                                                              tmp = (-j * y) * i
                                                                                                          else if (z <= 9600000000.0d0) then
                                                                                                              tmp = t_2
                                                                                                          else
                                                                                                              tmp = t_1
                                                                                                          end if
                                                                                                          code = tmp
                                                                                                      end function
                                                                                                      
                                                                                                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                                                      	double t_1 = b * (-c * z);
                                                                                                      	double t_2 = (-t * a) * x;
                                                                                                      	double tmp;
                                                                                                      	if (z <= -1.8e+143) {
                                                                                                      		tmp = (z * x) * y;
                                                                                                      	} else if (z <= -2.6e+110) {
                                                                                                      		tmp = t_1;
                                                                                                      	} else if (z <= -3.2e-243) {
                                                                                                      		tmp = t_2;
                                                                                                      	} else if (z <= 8.2e-159) {
                                                                                                      		tmp = (j * t) * c;
                                                                                                      	} else if (z <= 2.05e-79) {
                                                                                                      		tmp = (-j * y) * i;
                                                                                                      	} else if (z <= 9600000000.0) {
                                                                                                      		tmp = t_2;
                                                                                                      	} else {
                                                                                                      		tmp = t_1;
                                                                                                      	}
                                                                                                      	return tmp;
                                                                                                      }
                                                                                                      
                                                                                                      def code(x, y, z, t, a, b, c, i, j):
                                                                                                      	t_1 = b * (-c * z)
                                                                                                      	t_2 = (-t * a) * x
                                                                                                      	tmp = 0
                                                                                                      	if z <= -1.8e+143:
                                                                                                      		tmp = (z * x) * y
                                                                                                      	elif z <= -2.6e+110:
                                                                                                      		tmp = t_1
                                                                                                      	elif z <= -3.2e-243:
                                                                                                      		tmp = t_2
                                                                                                      	elif z <= 8.2e-159:
                                                                                                      		tmp = (j * t) * c
                                                                                                      	elif z <= 2.05e-79:
                                                                                                      		tmp = (-j * y) * i
                                                                                                      	elif z <= 9600000000.0:
                                                                                                      		tmp = t_2
                                                                                                      	else:
                                                                                                      		tmp = t_1
                                                                                                      	return tmp
                                                                                                      
                                                                                                      function code(x, y, z, t, a, b, c, i, j)
                                                                                                      	t_1 = Float64(b * Float64(Float64(-c) * z))
                                                                                                      	t_2 = Float64(Float64(Float64(-t) * a) * x)
                                                                                                      	tmp = 0.0
                                                                                                      	if (z <= -1.8e+143)
                                                                                                      		tmp = Float64(Float64(z * x) * y);
                                                                                                      	elseif (z <= -2.6e+110)
                                                                                                      		tmp = t_1;
                                                                                                      	elseif (z <= -3.2e-243)
                                                                                                      		tmp = t_2;
                                                                                                      	elseif (z <= 8.2e-159)
                                                                                                      		tmp = Float64(Float64(j * t) * c);
                                                                                                      	elseif (z <= 2.05e-79)
                                                                                                      		tmp = Float64(Float64(Float64(-j) * y) * i);
                                                                                                      	elseif (z <= 9600000000.0)
                                                                                                      		tmp = t_2;
                                                                                                      	else
                                                                                                      		tmp = t_1;
                                                                                                      	end
                                                                                                      	return tmp
                                                                                                      end
                                                                                                      
                                                                                                      function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                                                      	t_1 = b * (-c * z);
                                                                                                      	t_2 = (-t * a) * x;
                                                                                                      	tmp = 0.0;
                                                                                                      	if (z <= -1.8e+143)
                                                                                                      		tmp = (z * x) * y;
                                                                                                      	elseif (z <= -2.6e+110)
                                                                                                      		tmp = t_1;
                                                                                                      	elseif (z <= -3.2e-243)
                                                                                                      		tmp = t_2;
                                                                                                      	elseif (z <= 8.2e-159)
                                                                                                      		tmp = (j * t) * c;
                                                                                                      	elseif (z <= 2.05e-79)
                                                                                                      		tmp = (-j * y) * i;
                                                                                                      	elseif (z <= 9600000000.0)
                                                                                                      		tmp = t_2;
                                                                                                      	else
                                                                                                      		tmp = t_1;
                                                                                                      	end
                                                                                                      	tmp_2 = tmp;
                                                                                                      end
                                                                                                      
                                                                                                      code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[((-c) * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.8e+143], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -2.6e+110], t$95$1, If[LessEqual[z, -3.2e-243], t$95$2, If[LessEqual[z, 8.2e-159], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 2.05e-79], N[(N[((-j) * y), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 9600000000.0], t$95$2, t$95$1]]]]]]]]
                                                                                                      
                                                                                                      \begin{array}{l}
                                                                                                      
                                                                                                      \\
                                                                                                      \begin{array}{l}
                                                                                                      t_1 := b \cdot \left(\left(-c\right) \cdot z\right)\\
                                                                                                      t_2 := \left(\left(-t\right) \cdot a\right) \cdot x\\
                                                                                                      \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\
                                                                                                      \;\;\;\;\left(z \cdot x\right) \cdot y\\
                                                                                                      
                                                                                                      \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\
                                                                                                      \;\;\;\;t\_1\\
                                                                                                      
                                                                                                      \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\
                                                                                                      \;\;\;\;t\_2\\
                                                                                                      
                                                                                                      \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\
                                                                                                      \;\;\;\;\left(j \cdot t\right) \cdot c\\
                                                                                                      
                                                                                                      \mathbf{elif}\;z \leq 2.05 \cdot 10^{-79}:\\
                                                                                                      \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\
                                                                                                      
                                                                                                      \mathbf{elif}\;z \leq 9600000000:\\
                                                                                                      \;\;\;\;t\_2\\
                                                                                                      
                                                                                                      \mathbf{else}:\\
                                                                                                      \;\;\;\;t\_1\\
                                                                                                      
                                                                                                      
                                                                                                      \end{array}
                                                                                                      \end{array}
                                                                                                      
                                                                                                      Derivation
                                                                                                      1. Split input into 5 regimes
                                                                                                      2. if z < -1.8e143

                                                                                                        1. Initial program 61.2%

                                                                                                          \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites74.8%

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

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

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

                                                                                                            if -1.8e143 < z < -2.6e110 or 9.6e9 < z

                                                                                                            1. Initial program 70.2%

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

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

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

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

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

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

                                                                                                                  if -2.6e110 < z < -3.1999999999999998e-243 or 2.04999999999999997e-79 < z < 9.6e9

                                                                                                                  1. Initial program 83.0%

                                                                                                                    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites54.7%

                                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites41.2%

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

                                                                                                                      if -3.1999999999999998e-243 < z < 8.20000000000000029e-159

                                                                                                                      1. Initial program 67.4%

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

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

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

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

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

                                                                                                                          if 8.20000000000000029e-159 < z < 2.04999999999999997e-79

                                                                                                                          1. Initial program 70.7%

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

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

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

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

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

                                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+143}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+110}:\\ \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\ \;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-79}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\ \end{array} \]
                                                                                                                            6. Add Preprocessing

                                                                                                                            Alternative 12: 50.9% accurate, 1.2× speedup?

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

                                                                                                                              1. Initial program 68.7%

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

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

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

                                                                                                                                if -4.00000000000000014e62 < t < -1.75e-41

                                                                                                                                1. Initial program 68.3%

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

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

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

                                                                                                                                  if -1.75e-41 < t < -3.0000000000000002e-104

                                                                                                                                  1. Initial program 67.2%

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

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

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

                                                                                                                                    if -3.0000000000000002e-104 < t < 7.19999999999999989e-280

                                                                                                                                    1. Initial program 79.5%

                                                                                                                                      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites65.6%

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

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

                                                                                                                                        if 7.19999999999999989e-280 < t < 1.08e-94

                                                                                                                                        1. Initial program 85.7%

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

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

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

                                                                                                                                        Alternative 13: 51.4% accurate, 1.2× speedup?

                                                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-c, z, i \cdot a\right) \cdot b\\ t_2 := \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{if}\;t \leq -4 \cdot 10^{+62}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-41}:\\ \;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-105}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-280}:\\ \;\;\;\;\mathsf{fma}\left(z, x, \left(-j\right) \cdot i\right) \cdot y\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{-94}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                                                                                        (FPCore (x y z t a b c i j)
                                                                                                                                         :precision binary64
                                                                                                                                         (let* ((t_1 (* (fma (- c) z (* i a)) b)) (t_2 (* (fma (- a) x (* j c)) t)))
                                                                                                                                           (if (<= t -4e+62)
                                                                                                                                             t_2
                                                                                                                                             (if (<= t -7.5e-41)
                                                                                                                                               (* (fma (- x) t (* i b)) a)
                                                                                                                                               (if (<= t -1.8e-105)
                                                                                                                                                 t_1
                                                                                                                                                 (if (<= t 7.2e-280)
                                                                                                                                                   (* (fma z x (* (- j) i)) y)
                                                                                                                                                   (if (<= t 1.08e-94) t_1 t_2)))))))
                                                                                                                                        double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                                                                                        	double t_1 = fma(-c, z, (i * a)) * b;
                                                                                                                                        	double t_2 = fma(-a, x, (j * c)) * t;
                                                                                                                                        	double tmp;
                                                                                                                                        	if (t <= -4e+62) {
                                                                                                                                        		tmp = t_2;
                                                                                                                                        	} else if (t <= -7.5e-41) {
                                                                                                                                        		tmp = fma(-x, t, (i * b)) * a;
                                                                                                                                        	} else if (t <= -1.8e-105) {
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	} else if (t <= 7.2e-280) {
                                                                                                                                        		tmp = fma(z, x, (-j * i)) * y;
                                                                                                                                        	} else if (t <= 1.08e-94) {
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	} else {
                                                                                                                                        		tmp = t_2;
                                                                                                                                        	}
                                                                                                                                        	return tmp;
                                                                                                                                        }
                                                                                                                                        
                                                                                                                                        function code(x, y, z, t, a, b, c, i, j)
                                                                                                                                        	t_1 = Float64(fma(Float64(-c), z, Float64(i * a)) * b)
                                                                                                                                        	t_2 = Float64(fma(Float64(-a), x, Float64(j * c)) * t)
                                                                                                                                        	tmp = 0.0
                                                                                                                                        	if (t <= -4e+62)
                                                                                                                                        		tmp = t_2;
                                                                                                                                        	elseif (t <= -7.5e-41)
                                                                                                                                        		tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a);
                                                                                                                                        	elseif (t <= -1.8e-105)
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	elseif (t <= 7.2e-280)
                                                                                                                                        		tmp = Float64(fma(z, x, Float64(Float64(-j) * i)) * y);
                                                                                                                                        	elseif (t <= 1.08e-94)
                                                                                                                                        		tmp = t_1;
                                                                                                                                        	else
                                                                                                                                        		tmp = t_2;
                                                                                                                                        	end
                                                                                                                                        	return tmp
                                                                                                                                        end
                                                                                                                                        
                                                                                                                                        code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4e+62], t$95$2, If[LessEqual[t, -7.5e-41], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, -1.8e-105], t$95$1, If[LessEqual[t, 7.2e-280], N[(N[(z * x + N[((-j) * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1.08e-94], t$95$1, t$95$2]]]]]]]
                                                                                                                                        
                                                                                                                                        \begin{array}{l}
                                                                                                                                        
                                                                                                                                        \\
                                                                                                                                        \begin{array}{l}
                                                                                                                                        t_1 := \mathsf{fma}\left(-c, z, i \cdot a\right) \cdot b\\
                                                                                                                                        t_2 := \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
                                                                                                                                        \mathbf{if}\;t \leq -4 \cdot 10^{+62}:\\
                                                                                                                                        \;\;\;\;t\_2\\
                                                                                                                                        
                                                                                                                                        \mathbf{elif}\;t \leq -7.5 \cdot 10^{-41}:\\
                                                                                                                                        \;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
                                                                                                                                        
                                                                                                                                        \mathbf{elif}\;t \leq -1.8 \cdot 10^{-105}:\\
                                                                                                                                        \;\;\;\;t\_1\\
                                                                                                                                        
                                                                                                                                        \mathbf{elif}\;t \leq 7.2 \cdot 10^{-280}:\\
                                                                                                                                        \;\;\;\;\mathsf{fma}\left(z, x, \left(-j\right) \cdot i\right) \cdot y\\
                                                                                                                                        
                                                                                                                                        \mathbf{elif}\;t \leq 1.08 \cdot 10^{-94}:\\
                                                                                                                                        \;\;\;\;t\_1\\
                                                                                                                                        
                                                                                                                                        \mathbf{else}:\\
                                                                                                                                        \;\;\;\;t\_2\\
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        \end{array}
                                                                                                                                        \end{array}
                                                                                                                                        
                                                                                                                                        Derivation
                                                                                                                                        1. Split input into 4 regimes
                                                                                                                                        2. if t < -4.00000000000000014e62 or 1.08e-94 < t

                                                                                                                                          1. Initial program 68.7%

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

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

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

                                                                                                                                            if -4.00000000000000014e62 < t < -7.50000000000000049e-41

                                                                                                                                            1. Initial program 68.3%

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

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

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

                                                                                                                                              if -7.50000000000000049e-41 < t < -1.79999999999999982e-105 or 7.19999999999999989e-280 < t < 1.08e-94

                                                                                                                                              1. Initial program 81.5%

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

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

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

                                                                                                                                                if -1.79999999999999982e-105 < t < 7.19999999999999989e-280

                                                                                                                                                1. Initial program 79.5%

                                                                                                                                                  \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites65.6%

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

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

                                                                                                                                                  Alternative 14: 48.9% accurate, 1.2× speedup?

                                                                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\ t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-137}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-158}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{elif}\;z \leq 10^{-62}:\\ \;\;\;\;\mathsf{fma}\left(z, x, \left(-j\right) \cdot i\right) \cdot y\\ \mathbf{elif}\;z \leq 9600000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                                                                                                  (FPCore (x y z t a b c i j)
                                                                                                                                                   :precision binary64
                                                                                                                                                   (let* ((t_1 (* (fma (- a) t (* z y)) x)) (t_2 (* (fma (- b) c (* y x)) z)))
                                                                                                                                                     (if (<= z -3.5e+111)
                                                                                                                                                       t_2
                                                                                                                                                       (if (<= z -7.5e-137)
                                                                                                                                                         t_1
                                                                                                                                                         (if (<= z 1.5e-158)
                                                                                                                                                           (* (fma (- a) x (* j c)) t)
                                                                                                                                                           (if (<= z 1e-62)
                                                                                                                                                             (* (fma z x (* (- j) i)) y)
                                                                                                                                                             (if (<= z 9600000000.0) t_1 t_2)))))))
                                                                                                                                                  double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                                                                                                  	double t_1 = fma(-a, t, (z * y)) * x;
                                                                                                                                                  	double t_2 = fma(-b, c, (y * x)) * z;
                                                                                                                                                  	double tmp;
                                                                                                                                                  	if (z <= -3.5e+111) {
                                                                                                                                                  		tmp = t_2;
                                                                                                                                                  	} else if (z <= -7.5e-137) {
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	} else if (z <= 1.5e-158) {
                                                                                                                                                  		tmp = fma(-a, x, (j * c)) * t;
                                                                                                                                                  	} else if (z <= 1e-62) {
                                                                                                                                                  		tmp = fma(z, x, (-j * i)) * y;
                                                                                                                                                  	} else if (z <= 9600000000.0) {
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	} else {
                                                                                                                                                  		tmp = t_2;
                                                                                                                                                  	}
                                                                                                                                                  	return tmp;
                                                                                                                                                  }
                                                                                                                                                  
                                                                                                                                                  function code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                  	t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x)
                                                                                                                                                  	t_2 = Float64(fma(Float64(-b), c, Float64(y * x)) * z)
                                                                                                                                                  	tmp = 0.0
                                                                                                                                                  	if (z <= -3.5e+111)
                                                                                                                                                  		tmp = t_2;
                                                                                                                                                  	elseif (z <= -7.5e-137)
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	elseif (z <= 1.5e-158)
                                                                                                                                                  		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
                                                                                                                                                  	elseif (z <= 1e-62)
                                                                                                                                                  		tmp = Float64(fma(z, x, Float64(Float64(-j) * i)) * y);
                                                                                                                                                  	elseif (z <= 9600000000.0)
                                                                                                                                                  		tmp = t_1;
                                                                                                                                                  	else
                                                                                                                                                  		tmp = t_2;
                                                                                                                                                  	end
                                                                                                                                                  	return tmp
                                                                                                                                                  end
                                                                                                                                                  
                                                                                                                                                  code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3.5e+111], t$95$2, If[LessEqual[z, -7.5e-137], t$95$1, If[LessEqual[z, 1.5e-158], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1e-62], N[(N[(z * x + N[((-j) * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 9600000000.0], t$95$1, t$95$2]]]]]]]
                                                                                                                                                  
                                                                                                                                                  \begin{array}{l}
                                                                                                                                                  
                                                                                                                                                  \\
                                                                                                                                                  \begin{array}{l}
                                                                                                                                                  t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
                                                                                                                                                  t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
                                                                                                                                                  \mathbf{if}\;z \leq -3.5 \cdot 10^{+111}:\\
                                                                                                                                                  \;\;\;\;t\_2\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{elif}\;z \leq -7.5 \cdot 10^{-137}:\\
                                                                                                                                                  \;\;\;\;t\_1\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{elif}\;z \leq 1.5 \cdot 10^{-158}:\\
                                                                                                                                                  \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{elif}\;z \leq 10^{-62}:\\
                                                                                                                                                  \;\;\;\;\mathsf{fma}\left(z, x, \left(-j\right) \cdot i\right) \cdot y\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{elif}\;z \leq 9600000000:\\
                                                                                                                                                  \;\;\;\;t\_1\\
                                                                                                                                                  
                                                                                                                                                  \mathbf{else}:\\
                                                                                                                                                  \;\;\;\;t\_2\\
                                                                                                                                                  
                                                                                                                                                  
                                                                                                                                                  \end{array}
                                                                                                                                                  \end{array}
                                                                                                                                                  
                                                                                                                                                  Derivation
                                                                                                                                                  1. Split input into 4 regimes
                                                                                                                                                  2. if z < -3.5000000000000002e111 or 9.6e9 < z

                                                                                                                                                    1. Initial program 67.2%

                                                                                                                                                      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites69.7%

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

                                                                                                                                                    if -3.5000000000000002e111 < z < -7.4999999999999995e-137 or 1e-62 < z < 9.6e9

                                                                                                                                                    1. Initial program 86.9%

                                                                                                                                                      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites58.6%

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

                                                                                                                                                      if -7.4999999999999995e-137 < z < 1.5e-158

                                                                                                                                                      1. Initial program 70.9%

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

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

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

                                                                                                                                                        if 1.5e-158 < z < 1e-62

                                                                                                                                                        1. Initial program 70.2%

                                                                                                                                                          \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites60.4%

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

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

                                                                                                                                                          Alternative 15: 58.7% accurate, 1.3× speedup?

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

                                                                                                                                                            1. Initial program 67.1%

                                                                                                                                                              \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites70.8%

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

                                                                                                                                                            if -2.6999999999999999e111 < z < 4.80000000000000009e26

                                                                                                                                                            1. Initial program 76.7%

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

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

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

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

                                                                                                                                                            Alternative 16: 28.6% accurate, 1.4× speedup?

                                                                                                                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot x\right) \cdot y\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+138}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-205}:\\ \;\;\;\;\left(i \cdot a\right) \cdot b\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-79}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 0.00048:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\ \end{array} \end{array} \]
                                                                                                                                                            (FPCore (x y z t a b c i j)
                                                                                                                                                             :precision binary64
                                                                                                                                                             (let* ((t_1 (* (* z x) y)))
                                                                                                                                                               (if (<= z -1.45e+138)
                                                                                                                                                                 t_1
                                                                                                                                                                 (if (<= z -2.7e-205)
                                                                                                                                                                   (* (* i a) b)
                                                                                                                                                                   (if (<= z 8.2e-159)
                                                                                                                                                                     (* (* j t) c)
                                                                                                                                                                     (if (<= z 3.1e-79)
                                                                                                                                                                       (* (* (- j) y) i)
                                                                                                                                                                       (if (<= z 0.00048) 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 = (z * x) * y;
                                                                                                                                                            	double tmp;
                                                                                                                                                            	if (z <= -1.45e+138) {
                                                                                                                                                            		tmp = t_1;
                                                                                                                                                            	} else if (z <= -2.7e-205) {
                                                                                                                                                            		tmp = (i * a) * b;
                                                                                                                                                            	} else if (z <= 8.2e-159) {
                                                                                                                                                            		tmp = (j * t) * c;
                                                                                                                                                            	} else if (z <= 3.1e-79) {
                                                                                                                                                            		tmp = (-j * y) * i;
                                                                                                                                                            	} else if (z <= 0.00048) {
                                                                                                                                                            		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 = (z * x) * y
                                                                                                                                                                if (z <= (-1.45d+138)) then
                                                                                                                                                                    tmp = t_1
                                                                                                                                                                else if (z <= (-2.7d-205)) then
                                                                                                                                                                    tmp = (i * a) * b
                                                                                                                                                                else if (z <= 8.2d-159) then
                                                                                                                                                                    tmp = (j * t) * c
                                                                                                                                                                else if (z <= 3.1d-79) then
                                                                                                                                                                    tmp = (-j * y) * i
                                                                                                                                                                else if (z <= 0.00048d0) 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 = (z * x) * y;
                                                                                                                                                            	double tmp;
                                                                                                                                                            	if (z <= -1.45e+138) {
                                                                                                                                                            		tmp = t_1;
                                                                                                                                                            	} else if (z <= -2.7e-205) {
                                                                                                                                                            		tmp = (i * a) * b;
                                                                                                                                                            	} else if (z <= 8.2e-159) {
                                                                                                                                                            		tmp = (j * t) * c;
                                                                                                                                                            	} else if (z <= 3.1e-79) {
                                                                                                                                                            		tmp = (-j * y) * i;
                                                                                                                                                            	} else if (z <= 0.00048) {
                                                                                                                                                            		tmp = t_1;
                                                                                                                                                            	} else {
                                                                                                                                                            		tmp = b * (-c * z);
                                                                                                                                                            	}
                                                                                                                                                            	return tmp;
                                                                                                                                                            }
                                                                                                                                                            
                                                                                                                                                            def code(x, y, z, t, a, b, c, i, j):
                                                                                                                                                            	t_1 = (z * x) * y
                                                                                                                                                            	tmp = 0
                                                                                                                                                            	if z <= -1.45e+138:
                                                                                                                                                            		tmp = t_1
                                                                                                                                                            	elif z <= -2.7e-205:
                                                                                                                                                            		tmp = (i * a) * b
                                                                                                                                                            	elif z <= 8.2e-159:
                                                                                                                                                            		tmp = (j * t) * c
                                                                                                                                                            	elif z <= 3.1e-79:
                                                                                                                                                            		tmp = (-j * y) * i
                                                                                                                                                            	elif z <= 0.00048:
                                                                                                                                                            		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(z * x) * y)
                                                                                                                                                            	tmp = 0.0
                                                                                                                                                            	if (z <= -1.45e+138)
                                                                                                                                                            		tmp = t_1;
                                                                                                                                                            	elseif (z <= -2.7e-205)
                                                                                                                                                            		tmp = Float64(Float64(i * a) * b);
                                                                                                                                                            	elseif (z <= 8.2e-159)
                                                                                                                                                            		tmp = Float64(Float64(j * t) * c);
                                                                                                                                                            	elseif (z <= 3.1e-79)
                                                                                                                                                            		tmp = Float64(Float64(Float64(-j) * y) * i);
                                                                                                                                                            	elseif (z <= 0.00048)
                                                                                                                                                            		tmp = t_1;
                                                                                                                                                            	else
                                                                                                                                                            		tmp = Float64(b * Float64(Float64(-c) * z));
                                                                                                                                                            	end
                                                                                                                                                            	return tmp
                                                                                                                                                            end
                                                                                                                                                            
                                                                                                                                                            function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                            	t_1 = (z * x) * y;
                                                                                                                                                            	tmp = 0.0;
                                                                                                                                                            	if (z <= -1.45e+138)
                                                                                                                                                            		tmp = t_1;
                                                                                                                                                            	elseif (z <= -2.7e-205)
                                                                                                                                                            		tmp = (i * a) * b;
                                                                                                                                                            	elseif (z <= 8.2e-159)
                                                                                                                                                            		tmp = (j * t) * c;
                                                                                                                                                            	elseif (z <= 3.1e-79)
                                                                                                                                                            		tmp = (-j * y) * i;
                                                                                                                                                            	elseif (z <= 0.00048)
                                                                                                                                                            		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[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -1.45e+138], t$95$1, If[LessEqual[z, -2.7e-205], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 8.2e-159], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 3.1e-79], N[(N[((-j) * y), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 0.00048], t$95$1, N[(b * N[((-c) * z), $MachinePrecision]), $MachinePrecision]]]]]]]
                                                                                                                                                            
                                                                                                                                                            \begin{array}{l}
                                                                                                                                                            
                                                                                                                                                            \\
                                                                                                                                                            \begin{array}{l}
                                                                                                                                                            t_1 := \left(z \cdot x\right) \cdot y\\
                                                                                                                                                            \mathbf{if}\;z \leq -1.45 \cdot 10^{+138}:\\
                                                                                                                                                            \;\;\;\;t\_1\\
                                                                                                                                                            
                                                                                                                                                            \mathbf{elif}\;z \leq -2.7 \cdot 10^{-205}:\\
                                                                                                                                                            \;\;\;\;\left(i \cdot a\right) \cdot b\\
                                                                                                                                                            
                                                                                                                                                            \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\
                                                                                                                                                            \;\;\;\;\left(j \cdot t\right) \cdot c\\
                                                                                                                                                            
                                                                                                                                                            \mathbf{elif}\;z \leq 3.1 \cdot 10^{-79}:\\
                                                                                                                                                            \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\
                                                                                                                                                            
                                                                                                                                                            \mathbf{elif}\;z \leq 0.00048:\\
                                                                                                                                                            \;\;\;\;t\_1\\
                                                                                                                                                            
                                                                                                                                                            \mathbf{else}:\\
                                                                                                                                                            \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\
                                                                                                                                                            
                                                                                                                                                            
                                                                                                                                                            \end{array}
                                                                                                                                                            \end{array}
                                                                                                                                                            
                                                                                                                                                            Derivation
                                                                                                                                                            1. Split input into 5 regimes
                                                                                                                                                            2. if z < -1.45000000000000005e138 or 3.0999999999999999e-79 < z < 4.80000000000000012e-4

                                                                                                                                                              1. Initial program 69.3%

                                                                                                                                                                \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites61.7%

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

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

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

                                                                                                                                                                  if -1.45000000000000005e138 < z < -2.7000000000000001e-205

                                                                                                                                                                  1. Initial program 80.3%

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

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

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

                                                                                                                                                                      \[\leadsto \left(a \cdot i\right) \cdot b \]
                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                      1. Applied rewrites37.4%

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

                                                                                                                                                                      if -2.7000000000000001e-205 < z < 8.20000000000000029e-159

                                                                                                                                                                      1. Initial program 71.0%

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

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

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

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

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

                                                                                                                                                                          if 8.20000000000000029e-159 < z < 3.0999999999999999e-79

                                                                                                                                                                          1. Initial program 70.7%

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

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

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

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

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

                                                                                                                                                                              if 4.80000000000000012e-4 < z

                                                                                                                                                                              1. Initial program 72.7%

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

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

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

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

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

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

                                                                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+138}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-205}:\\ \;\;\;\;\left(i \cdot a\right) \cdot b\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-79}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 0.00048:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(-c\right) \cdot z\right)\\ \end{array} \]
                                                                                                                                                                                  6. Add Preprocessing

                                                                                                                                                                                  Alternative 17: 28.3% accurate, 1.4× speedup?

                                                                                                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot x\right) \cdot y\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+138}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-205}:\\ \;\;\;\;\left(i \cdot a\right) \cdot b\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-79}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 0.00048:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\ \end{array} \end{array} \]
                                                                                                                                                                                  (FPCore (x y z t a b c i j)
                                                                                                                                                                                   :precision binary64
                                                                                                                                                                                   (let* ((t_1 (* (* z x) y)))
                                                                                                                                                                                     (if (<= z -1.45e+138)
                                                                                                                                                                                       t_1
                                                                                                                                                                                       (if (<= z -2.7e-205)
                                                                                                                                                                                         (* (* i a) b)
                                                                                                                                                                                         (if (<= z 8.2e-159)
                                                                                                                                                                                           (* (* j t) c)
                                                                                                                                                                                           (if (<= z 3.1e-79)
                                                                                                                                                                                             (* (* (- j) y) i)
                                                                                                                                                                                             (if (<= z 0.00048) 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 = (z * x) * y;
                                                                                                                                                                                  	double tmp;
                                                                                                                                                                                  	if (z <= -1.45e+138) {
                                                                                                                                                                                  		tmp = t_1;
                                                                                                                                                                                  	} else if (z <= -2.7e-205) {
                                                                                                                                                                                  		tmp = (i * a) * b;
                                                                                                                                                                                  	} else if (z <= 8.2e-159) {
                                                                                                                                                                                  		tmp = (j * t) * c;
                                                                                                                                                                                  	} else if (z <= 3.1e-79) {
                                                                                                                                                                                  		tmp = (-j * y) * i;
                                                                                                                                                                                  	} else if (z <= 0.00048) {
                                                                                                                                                                                  		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 = (z * x) * y
                                                                                                                                                                                      if (z <= (-1.45d+138)) then
                                                                                                                                                                                          tmp = t_1
                                                                                                                                                                                      else if (z <= (-2.7d-205)) then
                                                                                                                                                                                          tmp = (i * a) * b
                                                                                                                                                                                      else if (z <= 8.2d-159) then
                                                                                                                                                                                          tmp = (j * t) * c
                                                                                                                                                                                      else if (z <= 3.1d-79) then
                                                                                                                                                                                          tmp = (-j * y) * i
                                                                                                                                                                                      else if (z <= 0.00048d0) 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 = (z * x) * y;
                                                                                                                                                                                  	double tmp;
                                                                                                                                                                                  	if (z <= -1.45e+138) {
                                                                                                                                                                                  		tmp = t_1;
                                                                                                                                                                                  	} else if (z <= -2.7e-205) {
                                                                                                                                                                                  		tmp = (i * a) * b;
                                                                                                                                                                                  	} else if (z <= 8.2e-159) {
                                                                                                                                                                                  		tmp = (j * t) * c;
                                                                                                                                                                                  	} else if (z <= 3.1e-79) {
                                                                                                                                                                                  		tmp = (-j * y) * i;
                                                                                                                                                                                  	} else if (z <= 0.00048) {
                                                                                                                                                                                  		tmp = t_1;
                                                                                                                                                                                  	} else {
                                                                                                                                                                                  		tmp = (-b * c) * z;
                                                                                                                                                                                  	}
                                                                                                                                                                                  	return tmp;
                                                                                                                                                                                  }
                                                                                                                                                                                  
                                                                                                                                                                                  def code(x, y, z, t, a, b, c, i, j):
                                                                                                                                                                                  	t_1 = (z * x) * y
                                                                                                                                                                                  	tmp = 0
                                                                                                                                                                                  	if z <= -1.45e+138:
                                                                                                                                                                                  		tmp = t_1
                                                                                                                                                                                  	elif z <= -2.7e-205:
                                                                                                                                                                                  		tmp = (i * a) * b
                                                                                                                                                                                  	elif z <= 8.2e-159:
                                                                                                                                                                                  		tmp = (j * t) * c
                                                                                                                                                                                  	elif z <= 3.1e-79:
                                                                                                                                                                                  		tmp = (-j * y) * i
                                                                                                                                                                                  	elif z <= 0.00048:
                                                                                                                                                                                  		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(z * x) * y)
                                                                                                                                                                                  	tmp = 0.0
                                                                                                                                                                                  	if (z <= -1.45e+138)
                                                                                                                                                                                  		tmp = t_1;
                                                                                                                                                                                  	elseif (z <= -2.7e-205)
                                                                                                                                                                                  		tmp = Float64(Float64(i * a) * b);
                                                                                                                                                                                  	elseif (z <= 8.2e-159)
                                                                                                                                                                                  		tmp = Float64(Float64(j * t) * c);
                                                                                                                                                                                  	elseif (z <= 3.1e-79)
                                                                                                                                                                                  		tmp = Float64(Float64(Float64(-j) * y) * i);
                                                                                                                                                                                  	elseif (z <= 0.00048)
                                                                                                                                                                                  		tmp = t_1;
                                                                                                                                                                                  	else
                                                                                                                                                                                  		tmp = Float64(Float64(Float64(-b) * c) * z);
                                                                                                                                                                                  	end
                                                                                                                                                                                  	return tmp
                                                                                                                                                                                  end
                                                                                                                                                                                  
                                                                                                                                                                                  function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                                                  	t_1 = (z * x) * y;
                                                                                                                                                                                  	tmp = 0.0;
                                                                                                                                                                                  	if (z <= -1.45e+138)
                                                                                                                                                                                  		tmp = t_1;
                                                                                                                                                                                  	elseif (z <= -2.7e-205)
                                                                                                                                                                                  		tmp = (i * a) * b;
                                                                                                                                                                                  	elseif (z <= 8.2e-159)
                                                                                                                                                                                  		tmp = (j * t) * c;
                                                                                                                                                                                  	elseif (z <= 3.1e-79)
                                                                                                                                                                                  		tmp = (-j * y) * i;
                                                                                                                                                                                  	elseif (z <= 0.00048)
                                                                                                                                                                                  		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[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -1.45e+138], t$95$1, If[LessEqual[z, -2.7e-205], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 8.2e-159], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 3.1e-79], N[(N[((-j) * y), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 0.00048], t$95$1, N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision]]]]]]]
                                                                                                                                                                                  
                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                  
                                                                                                                                                                                  \\
                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                  t_1 := \left(z \cdot x\right) \cdot y\\
                                                                                                                                                                                  \mathbf{if}\;z \leq -1.45 \cdot 10^{+138}:\\
                                                                                                                                                                                  \;\;\;\;t\_1\\
                                                                                                                                                                                  
                                                                                                                                                                                  \mathbf{elif}\;z \leq -2.7 \cdot 10^{-205}:\\
                                                                                                                                                                                  \;\;\;\;\left(i \cdot a\right) \cdot b\\
                                                                                                                                                                                  
                                                                                                                                                                                  \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\
                                                                                                                                                                                  \;\;\;\;\left(j \cdot t\right) \cdot c\\
                                                                                                                                                                                  
                                                                                                                                                                                  \mathbf{elif}\;z \leq 3.1 \cdot 10^{-79}:\\
                                                                                                                                                                                  \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\
                                                                                                                                                                                  
                                                                                                                                                                                  \mathbf{elif}\;z \leq 0.00048:\\
                                                                                                                                                                                  \;\;\;\;t\_1\\
                                                                                                                                                                                  
                                                                                                                                                                                  \mathbf{else}:\\
                                                                                                                                                                                  \;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
                                                                                                                                                                                  
                                                                                                                                                                                  
                                                                                                                                                                                  \end{array}
                                                                                                                                                                                  \end{array}
                                                                                                                                                                                  
                                                                                                                                                                                  Derivation
                                                                                                                                                                                  1. Split input into 5 regimes
                                                                                                                                                                                  2. if z < -1.45000000000000005e138 or 3.0999999999999999e-79 < z < 4.80000000000000012e-4

                                                                                                                                                                                    1. Initial program 69.3%

                                                                                                                                                                                      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites61.7%

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

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

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

                                                                                                                                                                                        if -1.45000000000000005e138 < z < -2.7000000000000001e-205

                                                                                                                                                                                        1. Initial program 80.3%

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

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

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

                                                                                                                                                                                            \[\leadsto \left(a \cdot i\right) \cdot b \]
                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                            1. Applied rewrites37.4%

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

                                                                                                                                                                                            if -2.7000000000000001e-205 < z < 8.20000000000000029e-159

                                                                                                                                                                                            1. Initial program 71.0%

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

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

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

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

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

                                                                                                                                                                                                if 8.20000000000000029e-159 < z < 3.0999999999999999e-79

                                                                                                                                                                                                1. Initial program 70.7%

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

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

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

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

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

                                                                                                                                                                                                    if 4.80000000000000012e-4 < z

                                                                                                                                                                                                    1. Initial program 72.7%

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

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

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

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

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

                                                                                                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+138}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-205}:\\ \;\;\;\;\left(i \cdot a\right) \cdot b\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-159}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-79}:\\ \;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\ \mathbf{elif}\;z \leq 0.00048:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\ \end{array} \]
                                                                                                                                                                                                      6. Add Preprocessing

                                                                                                                                                                                                      Alternative 18: 30.1% accurate, 1.4× speedup?

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

                                                                                                                                                                                                        1. Initial program 62.2%

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

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

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

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

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

                                                                                                                                                                                                            if -4.00000000000000014e62 < t < -2.9999999999999999e-81

                                                                                                                                                                                                            1. Initial program 68.9%

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

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

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

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

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

                                                                                                                                                                                                                if -2.9999999999999999e-81 < t < -5.80000000000000033e-192

                                                                                                                                                                                                                1. Initial program 73.3%

                                                                                                                                                                                                                  \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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.9%

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

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

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

                                                                                                                                                                                                                    if -5.80000000000000033e-192 < t < 2.00000000000000004e-287

                                                                                                                                                                                                                    1. Initial program 82.1%

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

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

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

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

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

                                                                                                                                                                                                                        if 2.00000000000000004e-287 < t < 4.5e-95

                                                                                                                                                                                                                        1. Initial program 85.7%

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

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

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

                                                                                                                                                                                                                            \[\leadsto \left(a \cdot i\right) \cdot b \]
                                                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                                                            1. Applied rewrites36.0%

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

                                                                                                                                                                                                                            if 4.5e-95 < t

                                                                                                                                                                                                                            1. Initial program 73.1%

                                                                                                                                                                                                                              \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites49.1%

                                                                                                                                                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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.2%

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

                                                                                                                                                                                                                              Alternative 19: 44.4% accurate, 1.6× speedup?

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

                                                                                                                                                                                                                                1. Initial program 50.4%

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

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

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

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

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

                                                                                                                                                                                                                                    if -1.6000000000000001e236 < t < -3.3e78 or 6.0000000000000002e-164 < t

                                                                                                                                                                                                                                    1. Initial program 73.1%

                                                                                                                                                                                                                                      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites51.1%

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

                                                                                                                                                                                                                                      if -3.3e78 < t < 6.0000000000000002e-164

                                                                                                                                                                                                                                      1. Initial program 76.5%

                                                                                                                                                                                                                                        \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites51.6%

                                                                                                                                                                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y} \]
                                                                                                                                                                                                                                        2. Step-by-step derivation
                                                                                                                                                                                                                                          1. Applied rewrites52.5%

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

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

                                                                                                                                                                                                                                        Alternative 20: 30.4% accurate, 1.6× speedup?

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

                                                                                                                                                                                                                                          1. Initial program 62.2%

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

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

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

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

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

                                                                                                                                                                                                                                              if -4.00000000000000014e62 < t < -2.9999999999999999e-81

                                                                                                                                                                                                                                              1. Initial program 68.9%

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

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

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

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

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

                                                                                                                                                                                                                                                  if -2.9999999999999999e-81 < t < 5.9000000000000001e-137

                                                                                                                                                                                                                                                  1. Initial program 81.6%

                                                                                                                                                                                                                                                    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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.0%

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

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

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

                                                                                                                                                                                                                                                      if 5.9000000000000001e-137 < t < 4.5e-95

                                                                                                                                                                                                                                                      1. Initial program 77.6%

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

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

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

                                                                                                                                                                                                                                                          \[\leadsto \left(a \cdot i\right) \cdot b \]
                                                                                                                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                                                                                                                          1. Applied rewrites68.4%

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

                                                                                                                                                                                                                                                          if 4.5e-95 < t

                                                                                                                                                                                                                                                          1. Initial program 73.1%

                                                                                                                                                                                                                                                            \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites49.1%

                                                                                                                                                                                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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.2%

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

                                                                                                                                                                                                                                                            Alternative 21: 51.3% accurate, 1.6× speedup?

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

                                                                                                                                                                                                                                                              1. Initial program 68.8%

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

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

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

                                                                                                                                                                                                                                                                if -3.8000000000000001e71 < t < 7.19999999999999989e-280

                                                                                                                                                                                                                                                                1. Initial program 74.2%

                                                                                                                                                                                                                                                                  \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites55.7%

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

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

                                                                                                                                                                                                                                                                    if 7.19999999999999989e-280 < t < 1.08e-94

                                                                                                                                                                                                                                                                    1. Initial program 85.7%

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

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

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

                                                                                                                                                                                                                                                                    Alternative 22: 29.3% accurate, 1.7× speedup?

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

                                                                                                                                                                                                                                                                      1. Initial program 62.2%

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

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

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

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

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

                                                                                                                                                                                                                                                                          if -4.00000000000000014e62 < t < -2.9999999999999999e-81

                                                                                                                                                                                                                                                                          1. Initial program 68.9%

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

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

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

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

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

                                                                                                                                                                                                                                                                              if -2.9999999999999999e-81 < t < 5.9000000000000001e-137

                                                                                                                                                                                                                                                                              1. Initial program 81.6%

                                                                                                                                                                                                                                                                                \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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.0%

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

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

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

                                                                                                                                                                                                                                                                                  if 5.9000000000000001e-137 < t < 2.8999999999999998e-93

                                                                                                                                                                                                                                                                                  1. Initial program 79.9%

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

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

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

                                                                                                                                                                                                                                                                                      \[\leadsto \left(a \cdot i\right) \cdot b \]
                                                                                                                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                                                                                                                      1. Applied rewrites61.9%

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

                                                                                                                                                                                                                                                                                      if 2.8999999999999998e-93 < t

                                                                                                                                                                                                                                                                                      1. Initial program 72.7%

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

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

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

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

                                                                                                                                                                                                                                                                                            \[\leadsto \left(c \cdot t\right) \cdot j \]
                                                                                                                                                                                                                                                                                        4. Recombined 5 regimes into one program.
                                                                                                                                                                                                                                                                                        5. Add Preprocessing

                                                                                                                                                                                                                                                                                        Alternative 23: 51.5% accurate, 2.0× speedup?

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

                                                                                                                                                                                                                                                                                          1. Initial program 68.3%

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

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

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

                                                                                                                                                                                                                                                                                            if -3.8000000000000001e71 < t < 1.10000000000000001e-68

                                                                                                                                                                                                                                                                                            1. Initial program 77.9%

                                                                                                                                                                                                                                                                                              \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites51.2%

                                                                                                                                                                                                                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y} \]
                                                                                                                                                                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                                                                                                                                                                1. Applied rewrites51.9%

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

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

                                                                                                                                                                                                                                                                                              Alternative 24: 42.2% accurate, 2.0× speedup?

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

                                                                                                                                                                                                                                                                                                1. Initial program 61.9%

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

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

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

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

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

                                                                                                                                                                                                                                                                                                    if -8.0000000000000004e76 < t < 2.05e46

                                                                                                                                                                                                                                                                                                    1. Initial program 77.8%

                                                                                                                                                                                                                                                                                                      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites48.4%

                                                                                                                                                                                                                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y} \]
                                                                                                                                                                                                                                                                                                      2. Step-by-step derivation
                                                                                                                                                                                                                                                                                                        1. Applied rewrites49.0%

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

                                                                                                                                                                                                                                                                                                        if 2.05e46 < t

                                                                                                                                                                                                                                                                                                        1. Initial program 71.0%

                                                                                                                                                                                                                                                                                                          \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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(-a, t, 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 rewrites46.9%

                                                                                                                                                                                                                                                                                                              \[\leadsto \left(\left(-t\right) \cdot a\right) \cdot x \]
                                                                                                                                                                                                                                                                                                          4. Recombined 3 regimes into one program.
                                                                                                                                                                                                                                                                                                          5. Add Preprocessing

                                                                                                                                                                                                                                                                                                          Alternative 25: 29.8% accurate, 2.1× speedup?

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

                                                                                                                                                                                                                                                                                                            1. Initial program 73.9%

                                                                                                                                                                                                                                                                                                              \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites46.7%

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

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

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

                                                                                                                                                                                                                                                                                                                if -1.2e17 < x < -1.0600000000000001e-273

                                                                                                                                                                                                                                                                                                                1. Initial program 79.4%

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

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

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

                                                                                                                                                                                                                                                                                                                    \[\leadsto \left(a \cdot i\right) \cdot b \]
                                                                                                                                                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                    1. Applied rewrites32.0%

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

                                                                                                                                                                                                                                                                                                                    if -1.0600000000000001e-273 < x < 6.1000000000000001e-33

                                                                                                                                                                                                                                                                                                                    1. Initial program 66.7%

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

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

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

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

                                                                                                                                                                                                                                                                                                                          \[\leadsto \left(c \cdot t\right) \cdot j \]
                                                                                                                                                                                                                                                                                                                      4. Recombined 3 regimes into one program.
                                                                                                                                                                                                                                                                                                                      5. Add Preprocessing

                                                                                                                                                                                                                                                                                                                      Alternative 26: 29.6% accurate, 2.1× speedup?

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

                                                                                                                                                                                                                                                                                                                        1. Initial program 77.0%

                                                                                                                                                                                                                                                                                                                          \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites71.1%

                                                                                                                                                                                                                                                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites38.9%

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

                                                                                                                                                                                                                                                                                                                            if -1.2e17 < x < -1.0600000000000001e-273

                                                                                                                                                                                                                                                                                                                            1. Initial program 79.4%

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

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

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

                                                                                                                                                                                                                                                                                                                                \[\leadsto \left(a \cdot i\right) \cdot b \]
                                                                                                                                                                                                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                                1. Applied rewrites32.0%

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

                                                                                                                                                                                                                                                                                                                                if -1.0600000000000001e-273 < x < 6.1000000000000001e-33

                                                                                                                                                                                                                                                                                                                                1. Initial program 66.7%

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                    if 6.1000000000000001e-33 < x

                                                                                                                                                                                                                                                                                                                                    1. Initial program 71.8%

                                                                                                                                                                                                                                                                                                                                      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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.0%

                                                                                                                                                                                                                                                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites65.2%

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

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

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

                                                                                                                                                                                                                                                                                                                                        Alternative 27: 30.0% accurate, 2.6× speedup?

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

                                                                                                                                                                                                                                                                                                                                          1. Initial program 72.9%

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

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

                                                                                                                                                                                                                                                                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites66.6%

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

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

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

                                                                                                                                                                                                                                                                                                                                                if -6.9999999999999997e90 < x < 1.85000000000000012e-60

                                                                                                                                                                                                                                                                                                                                                1. Initial program 73.7%

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+90} \lor \neg \left(x \leq 1.85 \cdot 10^{-60}\right):\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \end{array} \]
                                                                                                                                                                                                                                                                                                                                                  6. Add Preprocessing

                                                                                                                                                                                                                                                                                                                                                  Alternative 28: 29.1% accurate, 2.6× speedup?

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

                                                                                                                                                                                                                                                                                                                                                    1. Initial program 64.6%

                                                                                                                                                                                                                                                                                                                                                      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites63.3%

                                                                                                                                                                                                                                                                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites60.3%

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

                                                                                                                                                                                                                                                                                                                                                        if -1.45000000000000005e138 < z < 9.9999999999999996e-82

                                                                                                                                                                                                                                                                                                                                                        1. Initial program 74.5%

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

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

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

                                                                                                                                                                                                                                                                                                                                                            \[\leadsto \left(a \cdot i\right) \cdot b \]
                                                                                                                                                                                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                                                            1. Applied rewrites30.8%

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

                                                                                                                                                                                                                                                                                                                                                            if 9.9999999999999996e-82 < z

                                                                                                                                                                                                                                                                                                                                                            1. Initial program 75.0%

                                                                                                                                                                                                                                                                                                                                                              \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites40.9%

                                                                                                                                                                                                                                                                                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites43.5%

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

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

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

                                                                                                                                                                                                                                                                                                                                                                Alternative 29: 29.9% accurate, 2.6× speedup?

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

                                                                                                                                                                                                                                                                                                                                                                  1. Initial program 73.8%

                                                                                                                                                                                                                                                                                                                                                                    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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.1%

                                                                                                                                                                                                                                                                                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites41.7%

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

                                                                                                                                                                                                                                                                                                                                                                      if -5.70000000000000018e90 < x < 1.85000000000000012e-60

                                                                                                                                                                                                                                                                                                                                                                      1. Initial program 73.7%

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                                                          if 1.85000000000000012e-60 < x

                                                                                                                                                                                                                                                                                                                                                                          1. Initial program 72.4%

                                                                                                                                                                                                                                                                                                                                                                            \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites62.4%

                                                                                                                                                                                                                                                                                                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites63.6%

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

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

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

                                                                                                                                                                                                                                                                                                                                                                              Alternative 30: 22.3% accurate, 5.5× speedup?

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

                                                                                                                                                                                                                                                                                                                                                                                \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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 rewrites40.4%

                                                                                                                                                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, 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 rewrites41.4%

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                    Developer Target 1: 69.1% accurate, 0.2× speedup?

                                                                                                                                                                                                                                                                                                                                                                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                                                                                                                                                                                                                                                                                                                                    (FPCore (x y z t a b c i j)
                                                                                                                                                                                                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                                                                                                                                                                                                     (let* ((t_1
                                                                                                                                                                                                                                                                                                                                                                                             (+
                                                                                                                                                                                                                                                                                                                                                                                              (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
                                                                                                                                                                                                                                                                                                                                                                                              (/
                                                                                                                                                                                                                                                                                                                                                                                               (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
                                                                                                                                                                                                                                                                                                                                                                                               (+ (* c t) (* i y)))))
                                                                                                                                                                                                                                                                                                                                                                                            (t_2
                                                                                                                                                                                                                                                                                                                                                                                             (-
                                                                                                                                                                                                                                                                                                                                                                                              (* x (- (* z y) (* a t)))
                                                                                                                                                                                                                                                                                                                                                                                              (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
                                                                                                                                                                                                                                                                                                                                                                                       (if (< t -8.120978919195912e-33)
                                                                                                                                                                                                                                                                                                                                                                                         t_2
                                                                                                                                                                                                                                                                                                                                                                                         (if (< t -4.712553818218485e-169)
                                                                                                                                                                                                                                                                                                                                                                                           t_1
                                                                                                                                                                                                                                                                                                                                                                                           (if (< t -7.633533346031584e-308)
                                                                                                                                                                                                                                                                                                                                                                                             t_2
                                                                                                                                                                                                                                                                                                                                                                                             (if (< t 1.0535888557455487e-139) 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
                                                                                                                                                                                                                                                                                                                                                                                    	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
                                                                                                                                                                                                                                                                                                                                                                                    	double tmp;
                                                                                                                                                                                                                                                                                                                                                                                    	if (t < -8.120978919195912e-33) {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	} else if (t < -4.712553818218485e-169) {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1;
                                                                                                                                                                                                                                                                                                                                                                                    	} else if (t < -7.633533346031584e-308) {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	} else if (t < 1.0535888557455487e-139) {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1;
                                                                                                                                                                                                                                                                                                                                                                                    	} else {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	}
                                                                                                                                                                                                                                                                                                                                                                                    	return tmp;
                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    module fmin_fmax_functions
                                                                                                                                                                                                                                                                                                                                                                                        implicit none
                                                                                                                                                                                                                                                                                                                                                                                        private
                                                                                                                                                                                                                                                                                                                                                                                        public fmax
                                                                                                                                                                                                                                                                                                                                                                                        public fmin
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                        interface fmax
                                                                                                                                                                                                                                                                                                                                                                                            module procedure fmax88
                                                                                                                                                                                                                                                                                                                                                                                            module procedure fmax44
                                                                                                                                                                                                                                                                                                                                                                                            module procedure fmax84
                                                                                                                                                                                                                                                                                                                                                                                            module procedure fmax48
                                                                                                                                                                                                                                                                                                                                                                                        end interface
                                                                                                                                                                                                                                                                                                                                                                                        interface fmin
                                                                                                                                                                                                                                                                                                                                                                                            module procedure fmin88
                                                                                                                                                                                                                                                                                                                                                                                            module procedure fmin44
                                                                                                                                                                                                                                                                                                                                                                                            module procedure fmin84
                                                                                                                                                                                                                                                                                                                                                                                            module procedure fmin48
                                                                                                                                                                                                                                                                                                                                                                                        end interface
                                                                                                                                                                                                                                                                                                                                                                                    contains
                                                                                                                                                                                                                                                                                                                                                                                        real(8) function fmax88(x, y) result (res)
                                                                                                                                                                                                                                                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                                                                                                                                                                                        real(4) function fmax44(x, y) result (res)
                                                                                                                                                                                                                                                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                                                                                                                                                                                        real(8) function fmax84(x, y) result(res)
                                                                                                                                                                                                                                                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                                                                                                                                                                                        real(8) function fmax48(x, y) result(res)
                                                                                                                                                                                                                                                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                                                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                                                                                                                                                                                        real(8) function fmin88(x, y) result (res)
                                                                                                                                                                                                                                                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                                                                                                                                                                                        real(4) function fmin44(x, y) result (res)
                                                                                                                                                                                                                                                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                                                                                                                                                                                        real(8) function fmin84(x, y) result(res)
                                                                                                                                                                                                                                                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                                                                                                                                                                                        real(8) function fmin48(x, y) result(res)
                                                                                                                                                                                                                                                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                                                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                                                                                                                                                                                    end module
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    real(8) function code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                                                                                                                                                                                                                                                    use fmin_fmax_functions
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: z
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: t
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: a
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: b
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: c
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: i
                                                                                                                                                                                                                                                                                                                                                                                        real(8), intent (in) :: j
                                                                                                                                                                                                                                                                                                                                                                                        real(8) :: t_1
                                                                                                                                                                                                                                                                                                                                                                                        real(8) :: t_2
                                                                                                                                                                                                                                                                                                                                                                                        real(8) :: tmp
                                                                                                                                                                                                                                                                                                                                                                                        t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
                                                                                                                                                                                                                                                                                                                                                                                        t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
                                                                                                                                                                                                                                                                                                                                                                                        if (t < (-8.120978919195912d-33)) then
                                                                                                                                                                                                                                                                                                                                                                                            tmp = t_2
                                                                                                                                                                                                                                                                                                                                                                                        else if (t < (-4.712553818218485d-169)) then
                                                                                                                                                                                                                                                                                                                                                                                            tmp = t_1
                                                                                                                                                                                                                                                                                                                                                                                        else if (t < (-7.633533346031584d-308)) then
                                                                                                                                                                                                                                                                                                                                                                                            tmp = t_2
                                                                                                                                                                                                                                                                                                                                                                                        else if (t < 1.0535888557455487d-139) then
                                                                                                                                                                                                                                                                                                                                                                                            tmp = t_1
                                                                                                                                                                                                                                                                                                                                                                                        else
                                                                                                                                                                                                                                                                                                                                                                                            tmp = t_2
                                                                                                                                                                                                                                                                                                                                                                                        end if
                                                                                                                                                                                                                                                                                                                                                                                        code = tmp
                                                                                                                                                                                                                                                                                                                                                                                    end function
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
                                                                                                                                                                                                                                                                                                                                                                                    	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
                                                                                                                                                                                                                                                                                                                                                                                    	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
                                                                                                                                                                                                                                                                                                                                                                                    	double tmp;
                                                                                                                                                                                                                                                                                                                                                                                    	if (t < -8.120978919195912e-33) {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	} else if (t < -4.712553818218485e-169) {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1;
                                                                                                                                                                                                                                                                                                                                                                                    	} else if (t < -7.633533346031584e-308) {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	} else if (t < 1.0535888557455487e-139) {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1;
                                                                                                                                                                                                                                                                                                                                                                                    	} else {
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	}
                                                                                                                                                                                                                                                                                                                                                                                    	return tmp;
                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    def code(x, y, z, t, a, b, c, i, j):
                                                                                                                                                                                                                                                                                                                                                                                    	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y)))
                                                                                                                                                                                                                                                                                                                                                                                    	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
                                                                                                                                                                                                                                                                                                                                                                                    	tmp = 0
                                                                                                                                                                                                                                                                                                                                                                                    	if t < -8.120978919195912e-33:
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2
                                                                                                                                                                                                                                                                                                                                                                                    	elif t < -4.712553818218485e-169:
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1
                                                                                                                                                                                                                                                                                                                                                                                    	elif t < -7.633533346031584e-308:
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2
                                                                                                                                                                                                                                                                                                                                                                                    	elif t < 1.0535888557455487e-139:
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1
                                                                                                                                                                                                                                                                                                                                                                                    	else:
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2
                                                                                                                                                                                                                                                                                                                                                                                    	return tmp
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    function code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                                                                                                                                                                                                                                                    	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y))))
                                                                                                                                                                                                                                                                                                                                                                                    	t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j)))
                                                                                                                                                                                                                                                                                                                                                                                    	tmp = 0.0
                                                                                                                                                                                                                                                                                                                                                                                    	if (t < -8.120978919195912e-33)
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	elseif (t < -4.712553818218485e-169)
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1;
                                                                                                                                                                                                                                                                                                                                                                                    	elseif (t < -7.633533346031584e-308)
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	elseif (t < 1.0535888557455487e-139)
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1;
                                                                                                                                                                                                                                                                                                                                                                                    	else
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	end
                                                                                                                                                                                                                                                                                                                                                                                    	return tmp
                                                                                                                                                                                                                                                                                                                                                                                    end
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    function tmp_2 = code(x, y, z, t, a, b, c, i, j)
                                                                                                                                                                                                                                                                                                                                                                                    	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y)));
                                                                                                                                                                                                                                                                                                                                                                                    	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
                                                                                                                                                                                                                                                                                                                                                                                    	tmp = 0.0;
                                                                                                                                                                                                                                                                                                                                                                                    	if (t < -8.120978919195912e-33)
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	elseif (t < -4.712553818218485e-169)
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1;
                                                                                                                                                                                                                                                                                                                                                                                    	elseif (t < -7.633533346031584e-308)
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	elseif (t < 1.0535888557455487e-139)
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_1;
                                                                                                                                                                                                                                                                                                                                                                                    	else
                                                                                                                                                                                                                                                                                                                                                                                    		tmp = t_2;
                                                                                                                                                                                                                                                                                                                                                                                    	end
                                                                                                                                                                                                                                                                                                                                                                                    	tmp_2 = tmp;
                                                                                                                                                                                                                                                                                                                                                                                    end
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                                                    t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
                                                                                                                                                                                                                                                                                                                                                                                    t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
                                                                                                                                                                                                                                                                                                                                                                                    \mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
                                                                                                                                                                                                                                                                                                                                                                                    \;\;\;\;t\_2\\
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    \mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
                                                                                                                                                                                                                                                                                                                                                                                    \;\;\;\;t\_1\\
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    \mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
                                                                                                                                                                                                                                                                                                                                                                                    \;\;\;\;t\_2\\
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    \mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
                                                                                                                                                                                                                                                                                                                                                                                    \;\;\;\;t\_1\\
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                                                                                                                                                                                                                                                    \;\;\;\;t\_2\\
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                                                                                                                                                                    Reproduce

                                                                                                                                                                                                                                                                                                                                                                                    ?
                                                                                                                                                                                                                                                                                                                                                                                    herbie shell --seed 2025018 
                                                                                                                                                                                                                                                                                                                                                                                    (FPCore (x y z t a b c i j)
                                                                                                                                                                                                                                                                                                                                                                                      :name "Linear.Matrix:det33 from linear-1.19.1.3"
                                                                                                                                                                                                                                                                                                                                                                                      :precision binary64
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                      :alt
                                                                                                                                                                                                                                                                                                                                                                                      (! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                      (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))