Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 72.7% → 81.1%
Time: 6.5s
Alternatives: 23
Speedup: 0.5×

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}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

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

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

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

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


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

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

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

    1. Initial program 86.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. 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)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \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) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Applied rewrites83.0%

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

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

    1. Initial program 0.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(j \cdot \left(-1 \cdot i + \frac{x \cdot z}{j}\right)\right) \cdot y \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i + \frac{x \cdot z}{j}\right) \cdot j\right) \cdot y \]
      3. +-commutativeN/A

        \[\leadsto \left(\left(\frac{x \cdot z}{j} + -1 \cdot i\right) \cdot j\right) \cdot y \]
      4. associate-/l*N/A

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

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

        \[\leadsto \left(\mathsf{fma}\left(x, \frac{z}{j}, -1 \cdot i\right) \cdot j\right) \cdot y \]
      7. mul-1-negN/A

        \[\leadsto \left(\mathsf{fma}\left(x, \frac{z}{j}, \mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      8. lift-neg.f6445.1

        \[\leadsto \left(\mathsf{fma}\left(x, \frac{z}{j}, -i\right) \cdot j\right) \cdot y \]
    7. Applied rewrites45.1%

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

Alternative 2: 81.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 91.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) \]

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

    1. Initial program 0.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(j \cdot \left(-1 \cdot i + \frac{x \cdot z}{j}\right)\right) \cdot y \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i + \frac{x \cdot z}{j}\right) \cdot j\right) \cdot y \]
      3. +-commutativeN/A

        \[\leadsto \left(\left(\frac{x \cdot z}{j} + -1 \cdot i\right) \cdot j\right) \cdot y \]
      4. associate-/l*N/A

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

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

        \[\leadsto \left(\mathsf{fma}\left(x, \frac{z}{j}, -1 \cdot i\right) \cdot j\right) \cdot y \]
      7. mul-1-negN/A

        \[\leadsto \left(\mathsf{fma}\left(x, \frac{z}{j}, \mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      8. lift-neg.f6445.1

        \[\leadsto \left(\mathsf{fma}\left(x, \frac{z}{j}, -i\right) \cdot j\right) \cdot y \]
    7. Applied rewrites45.1%

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

Alternative 3: 68.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -9.2 \cdot 10^{+249}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y - a \cdot b\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -9.1999999999999993e249

    1. Initial program 53.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. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \left(-1 \cdot a\right) \cdot b\right) \]
      7. associate-*r*N/A

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, \color{blue}{y}, -1 \cdot \left(a \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-1 \cdot a\right) \cdot b\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      12. lower-neg.f6477.6

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right) \]
    4. Applied rewrites77.6%

      \[\leadsto \color{blue}{\left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right)} \]
    5. Step-by-step derivation
      1. lift-fma.f64N/A

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      3. lift-*.f64N/A

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a} \cdot b\right) \]
      7. lower-*.f6477.1

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - a \cdot \color{blue}{b}\right) \]
    6. Applied rewrites77.1%

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

    if -9.1999999999999993e249 < i < 1.35e34

    1. Initial program 76.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. 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)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \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) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Applied rewrites77.3%

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

      \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot c, t, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right) - \left(c \cdot z\right) \cdot b \]
    6. Step-by-step derivation
      1. lift-*.f6470.1

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

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

    if 1.35e34 < i

    1. Initial program 65.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. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \left(-1 \cdot a\right) \cdot b\right) \]
      7. associate-*r*N/A

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, \color{blue}{y}, -1 \cdot \left(a \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-1 \cdot a\right) \cdot b\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      12. lower-neg.f6461.9

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right) \]
    4. Applied rewrites61.9%

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

Alternative 4: 59.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)\\
\mathbf{if}\;a \leq -1.3 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.3000000000000001e105 or 9.5999999999999996e88 < a

    1. Initial program 61.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. Taylor expanded in a around -inf

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

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

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

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

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

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

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

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      8. lower-neg.f6468.6

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

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

    if -1.3000000000000001e105 < a < 2.3500000000000001e-138

    1. Initial program 78.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. 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)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \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) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Applied rewrites76.1%

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

      \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot c, t, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right) - \left(c \cdot z\right) \cdot b \]
    6. Step-by-step derivation
      1. lift-*.f6470.2

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot c, t, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right) - \left(c \cdot z\right) \cdot b \]
    7. Applied rewrites70.2%

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

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

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

        \[\leadsto \left(\left(c \cdot j\right) \cdot t + -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right) - \left(c \cdot z\right) \cdot b \]
      3. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right) - \left(c \cdot z\right) \cdot b \]
      5. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right) - \left(c \cdot z\right) \cdot b \]
      6. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, \left(\mathsf{neg}\left(i\right)\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z\right) \cdot b \]
      9. lift-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z\right) \cdot b \]
      10. lower-*.f6454.4

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z\right) \cdot b \]
    10. Applied rewrites54.4%

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

    if 2.3500000000000001e-138 < a < 9.5999999999999996e88

    1. Initial program 78.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. Taylor expanded in y around inf

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6452.7

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Applied rewrites52.7%

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

Alternative 5: 60.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4000000000000001e105 or 9.5999999999999996e88 < a

    1. Initial program 61.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. Taylor expanded in a around -inf

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

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

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

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

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

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

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

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      8. lower-neg.f6468.6

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

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

    if -1.4000000000000001e105 < a < 9.5999999999999996e88

    1. Initial program 78.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. Taylor expanded in y around inf

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6456.6

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Applied rewrites56.6%

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

Alternative 6: 28.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\ t_2 := \left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{if}\;i \leq -1.82 \cdot 10^{-35}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;i \leq -7.8 \cdot 10^{-287}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 7.5 \cdot 10^{-263}:\\ \;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\ \mathbf{elif}\;i \leq 9.5 \cdot 10^{-148}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 1.25 \cdot 10^{+101}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* -1.0 (* a (* t x)))) (t_2 (* (* (- i) j) y)))
   (if (<= i -1.82e-35)
     t_2
     (if (<= i -7.8e-287)
       t_1
       (if (<= i 7.5e-263)
         (* (* (- b) z) c)
         (if (<= i 9.5e-148) t_1 (if (<= i 1.25e+101) t_2 (* (* b a) i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = -1.0 * (a * (t * x));
	double t_2 = (-i * j) * y;
	double tmp;
	if (i <= -1.82e-35) {
		tmp = t_2;
	} else if (i <= -7.8e-287) {
		tmp = t_1;
	} else if (i <= 7.5e-263) {
		tmp = (-b * z) * c;
	} else if (i <= 9.5e-148) {
		tmp = t_1;
	} else if (i <= 1.25e+101) {
		tmp = t_2;
	} else {
		tmp = (b * a) * i;
	}
	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 = (-1.0d0) * (a * (t * x))
    t_2 = (-i * j) * y
    if (i <= (-1.82d-35)) then
        tmp = t_2
    else if (i <= (-7.8d-287)) then
        tmp = t_1
    else if (i <= 7.5d-263) then
        tmp = (-b * z) * c
    else if (i <= 9.5d-148) then
        tmp = t_1
    else if (i <= 1.25d+101) then
        tmp = t_2
    else
        tmp = (b * a) * i
    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 = -1.0 * (a * (t * x));
	double t_2 = (-i * j) * y;
	double tmp;
	if (i <= -1.82e-35) {
		tmp = t_2;
	} else if (i <= -7.8e-287) {
		tmp = t_1;
	} else if (i <= 7.5e-263) {
		tmp = (-b * z) * c;
	} else if (i <= 9.5e-148) {
		tmp = t_1;
	} else if (i <= 1.25e+101) {
		tmp = t_2;
	} else {
		tmp = (b * a) * i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = -1.0 * (a * (t * x))
	t_2 = (-i * j) * y
	tmp = 0
	if i <= -1.82e-35:
		tmp = t_2
	elif i <= -7.8e-287:
		tmp = t_1
	elif i <= 7.5e-263:
		tmp = (-b * z) * c
	elif i <= 9.5e-148:
		tmp = t_1
	elif i <= 1.25e+101:
		tmp = t_2
	else:
		tmp = (b * a) * i
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(-1.0 * Float64(a * Float64(t * x)))
	t_2 = Float64(Float64(Float64(-i) * j) * y)
	tmp = 0.0
	if (i <= -1.82e-35)
		tmp = t_2;
	elseif (i <= -7.8e-287)
		tmp = t_1;
	elseif (i <= 7.5e-263)
		tmp = Float64(Float64(Float64(-b) * z) * c);
	elseif (i <= 9.5e-148)
		tmp = t_1;
	elseif (i <= 1.25e+101)
		tmp = t_2;
	else
		tmp = Float64(Float64(b * a) * i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = -1.0 * (a * (t * x));
	t_2 = (-i * j) * y;
	tmp = 0.0;
	if (i <= -1.82e-35)
		tmp = t_2;
	elseif (i <= -7.8e-287)
		tmp = t_1;
	elseif (i <= 7.5e-263)
		tmp = (-b * z) * c;
	elseif (i <= 9.5e-148)
		tmp = t_1;
	elseif (i <= 1.25e+101)
		tmp = t_2;
	else
		tmp = (b * a) * i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[i, -1.82e-35], t$95$2, If[LessEqual[i, -7.8e-287], t$95$1, If[LessEqual[i, 7.5e-263], N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[i, 9.5e-148], t$95$1, If[LessEqual[i, 1.25e+101], t$95$2, N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\
t_2 := \left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{if}\;i \leq -1.82 \cdot 10^{-35}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;i \leq -7.8 \cdot 10^{-287}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq 7.5 \cdot 10^{-263}:\\
\;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\

\mathbf{elif}\;i \leq 9.5 \cdot 10^{-148}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq 1.25 \cdot 10^{+101}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -1.82000000000000003e-35 or 9.50000000000000069e-148 < i < 1.24999999999999997e101

    1. Initial program 70.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      3. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6426.0

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    7. Applied rewrites26.0%

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

    if -1.82000000000000003e-35 < i < -7.7999999999999999e-287 or 7.50000000000000044e-263 < i < 9.50000000000000069e-148

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot \color{blue}{x}\right)\right) \]
      3. lift-*.f6427.1

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites27.1%

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

    if -7.7999999999999999e-287 < i < 7.50000000000000044e-263

    1. Initial program 79.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. Taylor expanded in c around inf

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

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

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

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6448.4

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites48.4%

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

      \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot c \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b \cdot z\right)\right) \cdot c \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      3. lift-*.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lift-neg.f6426.0

        \[\leadsto \left(\left(-b\right) \cdot z\right) \cdot c \]
    7. Applied rewrites26.0%

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

    if 1.24999999999999997e101 < i

    1. Initial program 62.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6449.2

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites49.2%

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

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6439.3

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites39.3%

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      4. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      5. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      6. lower-*.f6439.7

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    9. Applied rewrites39.7%

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 7: 30.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -2.9 \cdot 10^{+72}:\\ \;\;\;\;\left(c \cdot j\right) \cdot t\\ \mathbf{elif}\;j \leq -7.4 \cdot 10^{-9}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{elif}\;j \leq 6 \cdot 10^{-309}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{-232}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;j \leq 3.4 \cdot 10^{-66}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= j -2.9e+72)
   (* (* c j) t)
   (if (<= j -7.4e-9)
     (* (* (- i) j) y)
     (if (<= j 6e-309)
       (* (* z y) x)
       (if (<= j 3.5e-232)
         (* (* b a) i)
         (if (<= j 3.4e-66) (* (* z x) y) (* (- i) (* j y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -2.9e+72) {
		tmp = (c * j) * t;
	} else if (j <= -7.4e-9) {
		tmp = (-i * j) * y;
	} else if (j <= 6e-309) {
		tmp = (z * y) * x;
	} else if (j <= 3.5e-232) {
		tmp = (b * a) * i;
	} else if (j <= 3.4e-66) {
		tmp = (z * x) * y;
	} else {
		tmp = -i * (j * y);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (j <= (-2.9d+72)) then
        tmp = (c * j) * t
    else if (j <= (-7.4d-9)) then
        tmp = (-i * j) * y
    else if (j <= 6d-309) then
        tmp = (z * y) * x
    else if (j <= 3.5d-232) then
        tmp = (b * a) * i
    else if (j <= 3.4d-66) then
        tmp = (z * x) * y
    else
        tmp = -i * (j * y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -2.9e+72) {
		tmp = (c * j) * t;
	} else if (j <= -7.4e-9) {
		tmp = (-i * j) * y;
	} else if (j <= 6e-309) {
		tmp = (z * y) * x;
	} else if (j <= 3.5e-232) {
		tmp = (b * a) * i;
	} else if (j <= 3.4e-66) {
		tmp = (z * x) * y;
	} else {
		tmp = -i * (j * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if j <= -2.9e+72:
		tmp = (c * j) * t
	elif j <= -7.4e-9:
		tmp = (-i * j) * y
	elif j <= 6e-309:
		tmp = (z * y) * x
	elif j <= 3.5e-232:
		tmp = (b * a) * i
	elif j <= 3.4e-66:
		tmp = (z * x) * y
	else:
		tmp = -i * (j * y)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (j <= -2.9e+72)
		tmp = Float64(Float64(c * j) * t);
	elseif (j <= -7.4e-9)
		tmp = Float64(Float64(Float64(-i) * j) * y);
	elseif (j <= 6e-309)
		tmp = Float64(Float64(z * y) * x);
	elseif (j <= 3.5e-232)
		tmp = Float64(Float64(b * a) * i);
	elseif (j <= 3.4e-66)
		tmp = Float64(Float64(z * x) * y);
	else
		tmp = Float64(Float64(-i) * Float64(j * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -2.9e+72)
		tmp = (c * j) * t;
	elseif (j <= -7.4e-9)
		tmp = (-i * j) * y;
	elseif (j <= 6e-309)
		tmp = (z * y) * x;
	elseif (j <= 3.5e-232)
		tmp = (b * a) * i;
	elseif (j <= 3.4e-66)
		tmp = (z * x) * y;
	else
		tmp = -i * (j * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -2.9e+72], N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[j, -7.4e-9], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 6e-309], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 3.5e-232], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[j, 3.4e-66], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.9 \cdot 10^{+72}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

\mathbf{elif}\;j \leq -7.4 \cdot 10^{-9}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\

\mathbf{elif}\;j \leq 6 \cdot 10^{-309}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;j \leq 3.5 \cdot 10^{-232}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{elif}\;j \leq 3.4 \cdot 10^{-66}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{else}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if j < -2.90000000000000017e72

    1. Initial program 70.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. Taylor expanded in t around inf

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6438.8

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites38.8%

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

    if -2.90000000000000017e72 < j < -7.4e-9

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      3. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6423.9

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    7. Applied rewrites23.9%

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

    if -7.4e-9 < j < 6.000000000000001e-309

    1. Initial program 73.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6426.0

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites26.0%

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

    if 6.000000000000001e-309 < j < 3.4999999999999998e-232

    1. Initial program 70.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6449.0

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

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

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6429.2

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites29.2%

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      4. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      5. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      6. lower-*.f6431.6

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    9. Applied rewrites31.6%

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

    if 3.4999999999999998e-232 < j < 3.39999999999999997e-66

    1. Initial program 72.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6428.0

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    7. Applied rewrites28.0%

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

    if 3.39999999999999997e-66 < j

    1. Initial program 73.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. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \left(-1 \cdot a\right) \cdot b\right) \]
      7. associate-*r*N/A

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, \color{blue}{y}, -1 \cdot \left(a \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-1 \cdot a\right) \cdot b\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      12. lower-neg.f6444.6

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right) \]
    4. Applied rewrites44.6%

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

      \[\leadsto \left(-i\right) \cdot \left(j \cdot \color{blue}{y}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6431.2

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
    7. Applied rewrites31.2%

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

Alternative 8: 30.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{if}\;j \leq -2.9 \cdot 10^{+72}:\\ \;\;\;\;\left(c \cdot j\right) \cdot t\\ \mathbf{elif}\;j \leq -7.4 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 6 \cdot 10^{-309}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{-232}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;j \leq 3.4 \cdot 10^{-66}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* (- i) j) y)))
   (if (<= j -2.9e+72)
     (* (* c j) t)
     (if (<= j -7.4e-9)
       t_1
       (if (<= j 6e-309)
         (* (* z y) x)
         (if (<= j 3.5e-232)
           (* (* b a) i)
           (if (<= j 3.4e-66) (* (* z x) y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (-i * j) * y;
	double tmp;
	if (j <= -2.9e+72) {
		tmp = (c * j) * t;
	} else if (j <= -7.4e-9) {
		tmp = t_1;
	} else if (j <= 6e-309) {
		tmp = (z * y) * x;
	} else if (j <= 3.5e-232) {
		tmp = (b * a) * i;
	} else if (j <= 3.4e-66) {
		tmp = (z * x) * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-i * j) * y
    if (j <= (-2.9d+72)) then
        tmp = (c * j) * t
    else if (j <= (-7.4d-9)) then
        tmp = t_1
    else if (j <= 6d-309) then
        tmp = (z * y) * x
    else if (j <= 3.5d-232) then
        tmp = (b * a) * i
    else if (j <= 3.4d-66) then
        tmp = (z * x) * y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (-i * j) * y;
	double tmp;
	if (j <= -2.9e+72) {
		tmp = (c * j) * t;
	} else if (j <= -7.4e-9) {
		tmp = t_1;
	} else if (j <= 6e-309) {
		tmp = (z * y) * x;
	} else if (j <= 3.5e-232) {
		tmp = (b * a) * i;
	} else if (j <= 3.4e-66) {
		tmp = (z * x) * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (-i * j) * y
	tmp = 0
	if j <= -2.9e+72:
		tmp = (c * j) * t
	elif j <= -7.4e-9:
		tmp = t_1
	elif j <= 6e-309:
		tmp = (z * y) * x
	elif j <= 3.5e-232:
		tmp = (b * a) * i
	elif j <= 3.4e-66:
		tmp = (z * x) * y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(-i) * j) * y)
	tmp = 0.0
	if (j <= -2.9e+72)
		tmp = Float64(Float64(c * j) * t);
	elseif (j <= -7.4e-9)
		tmp = t_1;
	elseif (j <= 6e-309)
		tmp = Float64(Float64(z * y) * x);
	elseif (j <= 3.5e-232)
		tmp = Float64(Float64(b * a) * i);
	elseif (j <= 3.4e-66)
		tmp = Float64(Float64(z * x) * y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (-i * j) * y;
	tmp = 0.0;
	if (j <= -2.9e+72)
		tmp = (c * j) * t;
	elseif (j <= -7.4e-9)
		tmp = t_1;
	elseif (j <= 6e-309)
		tmp = (z * y) * x;
	elseif (j <= 3.5e-232)
		tmp = (b * a) * i;
	elseif (j <= 3.4e-66)
		tmp = (z * x) * y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[j, -2.9e+72], N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[j, -7.4e-9], t$95$1, If[LessEqual[j, 6e-309], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 3.5e-232], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[j, 3.4e-66], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{if}\;j \leq -2.9 \cdot 10^{+72}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

\mathbf{elif}\;j \leq -7.4 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 6 \cdot 10^{-309}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;j \leq 3.5 \cdot 10^{-232}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{elif}\;j \leq 3.4 \cdot 10^{-66}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if j < -2.90000000000000017e72

    1. Initial program 70.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. Taylor expanded in t around inf

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6438.8

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites38.8%

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

    if -2.90000000000000017e72 < j < -7.4e-9 or 3.39999999999999997e-66 < j

    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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      3. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6429.9

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    7. Applied rewrites29.9%

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

    if -7.4e-9 < j < 6.000000000000001e-309

    1. Initial program 73.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6426.0

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites26.0%

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

    if 6.000000000000001e-309 < j < 3.4999999999999998e-232

    1. Initial program 70.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6449.0

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

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

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6429.2

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites29.2%

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      4. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      5. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      6. lower-*.f6431.6

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    9. Applied rewrites31.6%

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

    if 3.4999999999999998e-232 < j < 3.39999999999999997e-66

    1. Initial program 72.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6428.0

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    7. Applied rewrites28.0%

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

Alternative 9: 42.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -3.1 \cdot 10^{+72}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

\mathbf{elif}\;j \leq 1.5 \cdot 10^{-236}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

\mathbf{elif}\;j \leq 2.05 \cdot 10^{+174}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\

\mathbf{else}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -3.09999999999999988e72

    1. Initial program 70.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. Taylor expanded in t around inf

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6438.8

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites38.8%

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

    if -3.09999999999999988e72 < j < 1.50000000000000007e-236

    1. Initial program 73.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6445.3

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites45.3%

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

    if 1.50000000000000007e-236 < j < 2.05000000000000015e174

    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. Taylor expanded in z around inf

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      7. lower-neg.f6440.6

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

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

    if 2.05000000000000015e174 < j

    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. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \left(-1 \cdot a\right) \cdot b\right) \]
      7. associate-*r*N/A

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, \color{blue}{y}, -1 \cdot \left(a \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-1 \cdot a\right) \cdot b\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      12. lower-neg.f6450.1

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right) \]
    4. Applied rewrites50.1%

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

      \[\leadsto \left(-i\right) \cdot \left(j \cdot \color{blue}{y}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6442.7

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
    7. Applied rewrites42.7%

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

Alternative 10: 30.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot j\right) \cdot t\\ \mathbf{if}\;j \leq -24000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 6 \cdot 10^{-309}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{-232}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;j \leq 3.6 \cdot 10^{-66}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c j) t)))
   (if (<= j -24000000000.0)
     t_1
     (if (<= j 6e-309)
       (* (* z y) x)
       (if (<= j 3.5e-232)
         (* (* b a) i)
         (if (<= j 3.6e-66) (* (* z x) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * j) * t;
	double tmp;
	if (j <= -24000000000.0) {
		tmp = t_1;
	} else if (j <= 6e-309) {
		tmp = (z * y) * x;
	} else if (j <= 3.5e-232) {
		tmp = (b * a) * i;
	} else if (j <= 3.6e-66) {
		tmp = (z * x) * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (c * j) * t
    if (j <= (-24000000000.0d0)) then
        tmp = t_1
    else if (j <= 6d-309) then
        tmp = (z * y) * x
    else if (j <= 3.5d-232) then
        tmp = (b * a) * i
    else if (j <= 3.6d-66) then
        tmp = (z * x) * y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * j) * t;
	double tmp;
	if (j <= -24000000000.0) {
		tmp = t_1;
	} else if (j <= 6e-309) {
		tmp = (z * y) * x;
	} else if (j <= 3.5e-232) {
		tmp = (b * a) * i;
	} else if (j <= 3.6e-66) {
		tmp = (z * x) * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * j) * t
	tmp = 0
	if j <= -24000000000.0:
		tmp = t_1
	elif j <= 6e-309:
		tmp = (z * y) * x
	elif j <= 3.5e-232:
		tmp = (b * a) * i
	elif j <= 3.6e-66:
		tmp = (z * x) * y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * j) * t)
	tmp = 0.0
	if (j <= -24000000000.0)
		tmp = t_1;
	elseif (j <= 6e-309)
		tmp = Float64(Float64(z * y) * x);
	elseif (j <= 3.5e-232)
		tmp = Float64(Float64(b * a) * i);
	elseif (j <= 3.6e-66)
		tmp = Float64(Float64(z * x) * y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * j) * t;
	tmp = 0.0;
	if (j <= -24000000000.0)
		tmp = t_1;
	elseif (j <= 6e-309)
		tmp = (z * y) * x;
	elseif (j <= 3.5e-232)
		tmp = (b * a) * i;
	elseif (j <= 3.6e-66)
		tmp = (z * x) * y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[j, -24000000000.0], t$95$1, If[LessEqual[j, 6e-309], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 3.5e-232], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[j, 3.6e-66], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot j\right) \cdot t\\
\mathbf{if}\;j \leq -24000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 6 \cdot 10^{-309}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;j \leq 3.5 \cdot 10^{-232}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{elif}\;j \leq 3.6 \cdot 10^{-66}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -2.4e10 or 3.60000000000000012e-66 < j

    1. Initial program 72.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. Taylor expanded in t around inf

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6433.0

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites33.0%

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

    if -2.4e10 < j < 6.000000000000001e-309

    1. Initial program 73.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6425.7

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites25.7%

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

    if 6.000000000000001e-309 < j < 3.4999999999999998e-232

    1. Initial program 70.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6449.0

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

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

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6429.2

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites29.2%

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      4. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      5. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      6. lower-*.f6431.6

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    9. Applied rewrites31.6%

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

    if 3.4999999999999998e-232 < j < 3.60000000000000012e-66

    1. Initial program 72.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6428.0

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    7. Applied rewrites28.0%

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

Alternative 11: 52.3% accurate, 2.0× 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.1 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-42}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (fma (- a) x (* j c)) t)))
   (if (<= t -3.1e-12)
     t_1
     (if (<= t 1.3e-42) (* (fma (- i) j (* z x)) y) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(-a, x, (j * c)) * t;
	double tmp;
	if (t <= -3.1e-12) {
		tmp = t_1;
	} else if (t <= 1.3e-42) {
		tmp = fma(-i, j, (z * x)) * y;
	} 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.1e-12)
		tmp = t_1;
	elseif (t <= 1.3e-42)
		tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y);
	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.1e-12], t$95$1, If[LessEqual[t, 1.3e-42], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $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.1 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.1000000000000001e-12 or 1.3e-42 < t

    1. Initial program 66.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. Taylor expanded in t around inf

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

    if -3.1000000000000001e-12 < t < 1.3e-42

    1. Initial program 80.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

Alternative 12: 52.6% accurate, 2.0× 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.3 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-31}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (fma (- a) x (* j c)) t)))
   (if (<= t -4.3e-12)
     t_1
     (if (<= t 8.5e-31) (* (fma y x (* (- b) c)) z) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(-a, x, (j * c)) * t;
	double tmp;
	if (t <= -4.3e-12) {
		tmp = t_1;
	} else if (t <= 8.5e-31) {
		tmp = fma(y, x, (-b * c)) * z;
	} 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 <= -4.3e-12)
		tmp = t_1;
	elseif (t <= 8.5e-31)
		tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.3e-12], t$95$1, If[LessEqual[t, 8.5e-31], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $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.3 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-31}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.29999999999999985e-12 or 8.5000000000000007e-31 < t

    1. Initial program 66.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. Taylor expanded in t around inf

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6457.5

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

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

    if -4.29999999999999985e-12 < t < 8.5000000000000007e-31

    1. Initial program 80.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. Taylor expanded in z around inf

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      7. lower-neg.f6446.8

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

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

Alternative 13: 52.9% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{if}\;c \leq -9 \cdot 10^{+79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 7.6 \cdot 10^{-33}:\\ \;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (fma j t (* (- b) z)) c)))
   (if (<= c -9e+79) t_1 (if (<= c 7.6e-33) (* (fma (- a) t (* 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(j, t, (-b * z)) * c;
	double tmp;
	if (c <= -9e+79) {
		tmp = t_1;
	} else if (c <= 7.6e-33) {
		tmp = fma(-a, t, (z * y)) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(j, t, Float64(Float64(-b) * z)) * c)
	tmp = 0.0
	if (c <= -9e+79)
		tmp = t_1;
	elseif (c <= 7.6e-33)
		tmp = Float64(fma(Float64(-a), t, 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[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -9e+79], t$95$1, If[LessEqual[c, 7.6e-33], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -8.99999999999999987e79 or 7.59999999999999988e-33 < c

    1. Initial program 65.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. Taylor expanded in c around inf

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

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

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

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6461.0

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites61.0%

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

    if -8.99999999999999987e79 < c < 7.59999999999999988e-33

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

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

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

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x \]
      3. lower-*.f64N/A

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

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(y \cdot z + \left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(y \cdot z + -1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x \]
      9. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t + y \cdot z\right) \cdot x \]
      10. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x \]
      11. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right) \cdot x \]
      12. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t, y \cdot z\right) \cdot x \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
      14. lower-*.f6446.0

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    4. Applied rewrites46.0%

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

Alternative 14: 43.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -4.4 \cdot 10^{+117}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\

\mathbf{elif}\;i \leq 265000000000:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -4.40000000000000028e117

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      3. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6440.3

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    7. Applied rewrites40.3%

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

    if -4.40000000000000028e117 < i < 2.65e11

    1. Initial program 78.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. Taylor expanded in c around inf

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

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

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

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6444.4

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites44.4%

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

    if 2.65e11 < i

    1. Initial program 66.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6445.0

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites45.0%

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

Alternative 15: 42.2% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -3.1 \cdot 10^{+72}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

\mathbf{elif}\;j \leq 2.8 \cdot 10^{+144}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\


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

    1. Initial program 70.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. Taylor expanded in t around inf

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6438.8

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites38.8%

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

    if -3.09999999999999988e72 < j < 2.80000000000000007e144

    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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6443.6

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites43.6%

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

    if 2.80000000000000007e144 < j

    1. Initial program 70.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. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y + \left(-1 \cdot a\right) \cdot b\right) \]
      7. associate-*r*N/A

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, \color{blue}{y}, -1 \cdot \left(a \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-1 \cdot a\right) \cdot b\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \]
      12. lower-neg.f6448.5

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right) \]
    4. Applied rewrites48.5%

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

      \[\leadsto \left(-i\right) \cdot \left(j \cdot \color{blue}{y}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6440.4

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
    7. Applied rewrites40.4%

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

Alternative 16: 29.7% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot j\right) \cdot t\\ \mathbf{if}\;j \leq -2.2 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 3.25 \cdot 10^{+100}:\\ \;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c j) t)))
   (if (<= j -2.2e+45) t_1 (if (<= j 3.25e+100) (* (* (- b) z) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * j) * t;
	double tmp;
	if (j <= -2.2e+45) {
		tmp = t_1;
	} else if (j <= 3.25e+100) {
		tmp = (-b * z) * c;
	} 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 = (c * j) * t
    if (j <= (-2.2d+45)) then
        tmp = t_1
    else if (j <= 3.25d+100) then
        tmp = (-b * z) * c
    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 = (c * j) * t;
	double tmp;
	if (j <= -2.2e+45) {
		tmp = t_1;
	} else if (j <= 3.25e+100) {
		tmp = (-b * z) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * j) * t
	tmp = 0
	if j <= -2.2e+45:
		tmp = t_1
	elif j <= 3.25e+100:
		tmp = (-b * z) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * j) * t)
	tmp = 0.0
	if (j <= -2.2e+45)
		tmp = t_1;
	elseif (j <= 3.25e+100)
		tmp = Float64(Float64(Float64(-b) * z) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * j) * t;
	tmp = 0.0;
	if (j <= -2.2e+45)
		tmp = t_1;
	elseif (j <= 3.25e+100)
		tmp = (-b * z) * c;
	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[(c * j), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[j, -2.2e+45], t$95$1, If[LessEqual[j, 3.25e+100], N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot j\right) \cdot t\\
\mathbf{if}\;j \leq -2.2 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 3.25 \cdot 10^{+100}:\\
\;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -2.2e45 or 3.25e100 < j

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6438.1

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites38.1%

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

    if -2.2e45 < j < 3.25e100

    1. Initial program 73.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. Taylor expanded in c around inf

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

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

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

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6433.4

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites33.4%

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

      \[\leadsto \left(-1 \cdot \left(b \cdot z\right)\right) \cdot c \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b \cdot z\right)\right) \cdot c \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      3. lift-*.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lift-neg.f6424.5

        \[\leadsto \left(\left(-b\right) \cdot z\right) \cdot c \]
    7. Applied rewrites24.5%

      \[\leadsto \left(\left(-b\right) \cdot z\right) \cdot c \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 29.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot j\right) \cdot t\\ \mathbf{if}\;j \leq -2.2 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 2.1 \cdot 10^{+90}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\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 (* (* c j) t)))
   (if (<= j -2.2e+45) t_1 (if (<= j 2.1e+90) (* (* (- c) z) 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 = (c * j) * t;
	double tmp;
	if (j <= -2.2e+45) {
		tmp = t_1;
	} else if (j <= 2.1e+90) {
		tmp = (-c * z) * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (c * j) * t
    if (j <= (-2.2d+45)) then
        tmp = t_1
    else if (j <= 2.1d+90) then
        tmp = (-c * z) * b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * j) * t;
	double tmp;
	if (j <= -2.2e+45) {
		tmp = t_1;
	} else if (j <= 2.1e+90) {
		tmp = (-c * z) * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * j) * t
	tmp = 0
	if j <= -2.2e+45:
		tmp = t_1
	elif j <= 2.1e+90:
		tmp = (-c * z) * b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * j) * t)
	tmp = 0.0
	if (j <= -2.2e+45)
		tmp = t_1;
	elseif (j <= 2.1e+90)
		tmp = Float64(Float64(Float64(-c) * z) * b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * j) * t;
	tmp = 0.0;
	if (j <= -2.2e+45)
		tmp = t_1;
	elseif (j <= 2.1e+90)
		tmp = (-c * z) * b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[j, -2.2e+45], t$95$1, If[LessEqual[j, 2.1e+90], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot j\right) \cdot t\\
\mathbf{if}\;j \leq -2.2 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 2.1 \cdot 10^{+90}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -2.2e45 or 2.09999999999999981e90 < j

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6437.9

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites37.9%

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

    if -2.2e45 < j < 2.09999999999999981e90

    1. Initial program 73.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6444.6

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites44.6%

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

      \[\leadsto \left(-1 \cdot \left(c \cdot z\right)\right) \cdot b \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z\right)\right) \cdot b \]
      2. lift-*.f6423.8

        \[\leadsto \left(-1 \cdot \left(c \cdot z\right)\right) \cdot b \]
    7. Applied rewrites23.8%

      \[\leadsto \left(-1 \cdot \left(c \cdot z\right)\right) \cdot b \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z\right)\right) \cdot b \]
      2. lift-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z\right)\right) \cdot b \]
      3. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(c \cdot z\right)\right) \cdot b \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-*.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. lower-neg.f6423.8

        \[\leadsto \left(\left(-c\right) \cdot z\right) \cdot b \]
    9. Applied rewrites23.8%

      \[\leadsto \color{blue}{\left(\left(-c\right) \cdot z\right) \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 29.4% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot j\right) \cdot t\\ \mathbf{if}\;j \leq -2.55 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 3.4 \cdot 10^{+100}:\\ \;\;\;\;-\left(c \cdot b\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c j) t)))
   (if (<= j -2.55e+45) t_1 (if (<= j 3.4e+100) (- (* (* c b) z)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * j) * t;
	double tmp;
	if (j <= -2.55e+45) {
		tmp = t_1;
	} else if (j <= 3.4e+100) {
		tmp = -((c * b) * z);
	} 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 = (c * j) * t
    if (j <= (-2.55d+45)) then
        tmp = t_1
    else if (j <= 3.4d+100) then
        tmp = -((c * b) * z)
    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 = (c * j) * t;
	double tmp;
	if (j <= -2.55e+45) {
		tmp = t_1;
	} else if (j <= 3.4e+100) {
		tmp = -((c * b) * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * j) * t
	tmp = 0
	if j <= -2.55e+45:
		tmp = t_1
	elif j <= 3.4e+100:
		tmp = -((c * b) * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * j) * t)
	tmp = 0.0
	if (j <= -2.55e+45)
		tmp = t_1;
	elseif (j <= 3.4e+100)
		tmp = Float64(-Float64(Float64(c * b) * z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * j) * t;
	tmp = 0.0;
	if (j <= -2.55e+45)
		tmp = t_1;
	elseif (j <= 3.4e+100)
		tmp = -((c * b) * z);
	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[(c * j), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[j, -2.55e+45], t$95$1, If[LessEqual[j, 3.4e+100], (-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot j\right) \cdot t\\
\mathbf{if}\;j \leq -2.55 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 3.4 \cdot 10^{+100}:\\
\;\;\;\;-\left(c \cdot b\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -2.5499999999999999e45 or 3.39999999999999994e100 < j

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6438.1

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites38.1%

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

    if -2.5499999999999999e45 < j < 3.39999999999999994e100

    1. Initial program 73.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6444.4

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites44.4%

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

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6425.5

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites25.5%

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Taylor expanded in z around inf

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right) \]
      2. lower-neg.f64N/A

        \[\leadsto -b \cdot \left(c \cdot z\right) \]
      3. associate-*r*N/A

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      4. lower-*.f64N/A

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      5. *-commutativeN/A

        \[\leadsto -\left(c \cdot b\right) \cdot z \]
      6. lower-*.f6424.0

        \[\leadsto -\left(c \cdot b\right) \cdot z \]
    10. Applied rewrites24.0%

      \[\leadsto -\left(c \cdot b\right) \cdot z \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 30.0% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot j\right) \cdot t\\ \mathbf{if}\;j \leq -24000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 1.18 \cdot 10^{+100}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c j) t)))
   (if (<= j -24000000000.0) t_1 (if (<= j 1.18e+100) (* (* 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 = (c * j) * t;
	double tmp;
	if (j <= -24000000000.0) {
		tmp = t_1;
	} else if (j <= 1.18e+100) {
		tmp = (z * y) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (c * j) * t
    if (j <= (-24000000000.0d0)) then
        tmp = t_1
    else if (j <= 1.18d+100) then
        tmp = (z * y) * x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * j) * t;
	double tmp;
	if (j <= -24000000000.0) {
		tmp = t_1;
	} else if (j <= 1.18e+100) {
		tmp = (z * y) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * j) * t
	tmp = 0
	if j <= -24000000000.0:
		tmp = t_1
	elif j <= 1.18e+100:
		tmp = (z * y) * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * j) * t)
	tmp = 0.0
	if (j <= -24000000000.0)
		tmp = t_1;
	elseif (j <= 1.18e+100)
		tmp = Float64(Float64(z * y) * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * j) * t;
	tmp = 0.0;
	if (j <= -24000000000.0)
		tmp = t_1;
	elseif (j <= 1.18e+100)
		tmp = (z * y) * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[j, -24000000000.0], t$95$1, If[LessEqual[j, 1.18e+100], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot j\right) \cdot t\\
\mathbf{if}\;j \leq -24000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 1.18 \cdot 10^{+100}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -2.4e10 or 1.18e100 < j

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6436.8

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites36.8%

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

    if -2.4e10 < j < 1.18e100

    1. Initial program 73.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6425.2

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites25.2%

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

Alternative 20: 30.0% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(j \cdot t\right)\\ \mathbf{if}\;j \leq -24000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 2.95 \cdot 10^{+99}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* c (* j t))))
   (if (<= j -24000000000.0) t_1 (if (<= j 2.95e+99) (* (* 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 = c * (j * t);
	double tmp;
	if (j <= -24000000000.0) {
		tmp = t_1;
	} else if (j <= 2.95e+99) {
		tmp = (z * y) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = c * (j * t)
    if (j <= (-24000000000.0d0)) then
        tmp = t_1
    else if (j <= 2.95d+99) then
        tmp = (z * y) * x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = c * (j * t);
	double tmp;
	if (j <= -24000000000.0) {
		tmp = t_1;
	} else if (j <= 2.95e+99) {
		tmp = (z * y) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = c * (j * t)
	tmp = 0
	if j <= -24000000000.0:
		tmp = t_1
	elif j <= 2.95e+99:
		tmp = (z * y) * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(c * Float64(j * t))
	tmp = 0.0
	if (j <= -24000000000.0)
		tmp = t_1;
	elseif (j <= 2.95e+99)
		tmp = Float64(Float64(z * y) * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = c * (j * t);
	tmp = 0.0;
	if (j <= -24000000000.0)
		tmp = t_1;
	elseif (j <= 2.95e+99)
		tmp = (z * y) * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -24000000000.0], t$95$1, If[LessEqual[j, 2.95e+99], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t\right)\\
\mathbf{if}\;j \leq -24000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 2.95 \cdot 10^{+99}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -2.4e10 or 2.9499999999999999e99 < j

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6436.7

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites36.7%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]

    if -2.4e10 < j < 2.9499999999999999e99

    1. Initial program 73.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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lower-*.f6425.3

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites25.3%

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

Alternative 21: 30.2% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -5.2 \cdot 10^{+87}:\\ \;\;\;\;a \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;i \leq 4 \cdot 10^{+100}:\\ \;\;\;\;c \cdot \left(j \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= i -5.2e+87)
   (* a (* b i))
   (if (<= i 4e+100) (* c (* j t)) (* (* b a) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (i <= -5.2e+87) {
		tmp = a * (b * i);
	} else if (i <= 4e+100) {
		tmp = c * (j * t);
	} else {
		tmp = (b * a) * i;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (i <= (-5.2d+87)) then
        tmp = a * (b * i)
    else if (i <= 4d+100) then
        tmp = c * (j * t)
    else
        tmp = (b * a) * i
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (i <= -5.2e+87) {
		tmp = a * (b * i);
	} else if (i <= 4e+100) {
		tmp = c * (j * t);
	} else {
		tmp = (b * a) * i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if i <= -5.2e+87:
		tmp = a * (b * i)
	elif i <= 4e+100:
		tmp = c * (j * t)
	else:
		tmp = (b * a) * i
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (i <= -5.2e+87)
		tmp = Float64(a * Float64(b * i));
	elseif (i <= 4e+100)
		tmp = Float64(c * Float64(j * t));
	else
		tmp = Float64(Float64(b * a) * i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (i <= -5.2e+87)
		tmp = a * (b * i);
	elseif (i <= 4e+100)
		tmp = c * (j * t);
	else
		tmp = (b * a) * i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -5.2e+87], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4e+100], N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -5.2 \cdot 10^{+87}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\

\mathbf{elif}\;i \leq 4 \cdot 10^{+100}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -5.19999999999999997e87

    1. Initial program 60.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6451.4

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites51.4%

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

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6441.3

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites41.3%

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

    if -5.19999999999999997e87 < i < 4.00000000000000006e100

    1. Initial program 78.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. Taylor expanded in t around inf

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6424.9

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites24.9%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]

    if 4.00000000000000006e100 < i

    1. Initial program 62.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. Taylor expanded in b around inf

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

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

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

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

        \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6449.3

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites49.3%

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

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6439.4

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites39.4%

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto a \cdot \left(b \cdot i\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      4. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      5. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      6. lower-*.f6439.8

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    9. Applied rewrites39.8%

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 22: 22.7% accurate, 5.5× speedup?

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

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

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

\\
\left(b \cdot a\right) \cdot i
\end{array}
Derivation
  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. Taylor expanded in b around inf

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

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

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

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

      \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    5. lower-fma.f64N/A

      \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    6. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
    7. lower-*.f64N/A

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

      \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    9. lower-neg.f6438.9

      \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
  4. Applied rewrites38.9%

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

    \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
    2. lower-*.f6422.2

      \[\leadsto a \cdot \left(b \cdot i\right) \]
  7. Applied rewrites22.2%

    \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  8. Step-by-step derivation
    1. lift-*.f64N/A

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

      \[\leadsto a \cdot \left(b \cdot i\right) \]
    3. associate-*r*N/A

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    4. lower-*.f64N/A

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    5. *-commutativeN/A

      \[\leadsto \left(b \cdot a\right) \cdot i \]
    6. lower-*.f6422.7

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  9. Applied rewrites22.7%

    \[\leadsto \left(b \cdot a\right) \cdot i \]
  10. Add Preprocessing

Alternative 23: 22.2% accurate, 5.5× speedup?

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

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

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

\\
a \cdot \left(b \cdot i\right)
\end{array}
Derivation
  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. Taylor expanded in b around inf

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

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

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

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

      \[\leadsto \left(i \cdot a + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    5. lower-fma.f64N/A

      \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    6. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(i, a, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
    7. lower-*.f64N/A

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

      \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
    9. lower-neg.f6438.9

      \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
  4. Applied rewrites38.9%

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

    \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
    2. lower-*.f6422.2

      \[\leadsto a \cdot \left(b \cdot i\right) \]
  7. Applied rewrites22.2%

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

Developer Target 1: 68.3% 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 2025093 
(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)))))