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

Percentage Accurate: 73.3% → 82.2%
Time: 8.6s
Alternatives: 25
Speedup: 0.5×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 73.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 82.2% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 91.7%

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

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

    1. Initial program 0.0%

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

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

      \[\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 2: 71.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := i \cdot t - c \cdot z\\
t_2 := z \cdot y - a \cdot t\\
\mathbf{if}\;b \leq -1.32 \cdot 10^{+161}:\\
\;\;\;\;t\_1 \cdot b\\

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

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-33}:\\
\;\;\;\;\mathsf{fma}\left(-i, j \cdot y, \mathsf{fma}\left(t\_2, x, \left(j \cdot c\right) \cdot a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, t\_2 \cdot x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.3199999999999999e161

    1. Initial program 70.5%

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

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

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

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

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

        \[\leadsto \left(i \cdot t - c \cdot z\right) \cdot b \]
      5. lift-*.f6470.0

        \[\leadsto \left(i \cdot t - c \cdot z\right) \cdot b \]
    4. Applied rewrites70.0%

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

    if -1.3199999999999999e161 < b < -1.2800000000000001e-180

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2800000000000001e-180 < b < 1.14999999999999993e-33

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j \cdot y, a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      6. +-commutativeN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j \cdot y, \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot c\right) \cdot a\right)\right) \]
      16. lift-*.f6474.0

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

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

    if 1.14999999999999993e-33 < b

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(i \cdot t\right) \cdot b + \left(y \cdot z - a \cdot t\right) \cdot x\right) - b \cdot \left(c \cdot z\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(i \cdot t\right) \cdot b + \left(z \cdot y - a \cdot t\right) \cdot x\right) - b \cdot \left(c \cdot z\right) \]
      4. +-commutativeN/A

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

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      7. lift-*.f64N/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      8. lift-*.f64N/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      9. associate--l+N/A

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

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

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) + \left(\left(i \cdot t\right) \cdot b - \left(c \cdot b\right) \cdot z\right) \]
    7. Applied rewrites68.5%

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

Alternative 3: 70.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq -6.4 \cdot 10^{-71}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, x, \left(b \cdot t - j \cdot y\right) \cdot i\right)\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-33}:\\
\;\;\;\;\mathsf{fma}\left(-i, j \cdot y, \mathsf{fma}\left(t\_2, x, \left(j \cdot c\right) \cdot a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, t\_2 \cdot x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.7200000000000001e106

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j \cdot c, a, \left(i \cdot t - c \cdot z\right) \cdot b\right) \]
      5. lower-*.f6469.9

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

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

    if -1.7200000000000001e106 < b < -6.3999999999999998e-71

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x + i \cdot \left(b \cdot t - j \cdot y\right) \]
      4. lower-fma.f64N/A

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

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

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

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

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

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

    if -6.3999999999999998e-71 < b < 1.14999999999999993e-33

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j \cdot y, a \cdot \left(c \cdot j\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      6. +-commutativeN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j \cdot y, \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot c\right) \cdot a\right)\right) \]
      16. lift-*.f6473.0

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

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

    if 1.14999999999999993e-33 < b

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(i \cdot t\right) \cdot b + \left(y \cdot z - a \cdot t\right) \cdot x\right) - b \cdot \left(c \cdot z\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(i \cdot t\right) \cdot b + \left(z \cdot y - a \cdot t\right) \cdot x\right) - b \cdot \left(c \cdot z\right) \]
      4. +-commutativeN/A

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

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      7. lift-*.f64N/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      8. lift-*.f64N/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      9. associate--l+N/A

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

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

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) + \left(\left(i \cdot t\right) \cdot b - \left(c \cdot b\right) \cdot z\right) \]
    7. Applied rewrites68.5%

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

Alternative 4: 68.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;c \leq -3.3 \cdot 10^{-241}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t - c \cdot z, b, t\_2 \cdot x\right)\\

\mathbf{elif}\;c \leq 4 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, x, \left(b \cdot t - j \cdot y\right) \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -6.19999999999999963e230 or 4.00000000000000029e70 < c

    1. Initial program 61.2%

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

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

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

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

        \[\leadsto \left(a \cdot j - b \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      6. lower-*.f6468.9

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
    4. Applied rewrites68.9%

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

    if -6.19999999999999963e230 < c < -3.2999999999999999e-241

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(i \cdot t\right) \cdot b + \left(y \cdot z - a \cdot t\right) \cdot x\right) - b \cdot \left(c \cdot z\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(i \cdot t\right) \cdot b + \left(z \cdot y - a \cdot t\right) \cdot x\right) - b \cdot \left(c \cdot z\right) \]
      4. +-commutativeN/A

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

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      7. lift-*.f64N/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      8. lift-*.f64N/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      9. associate--l+N/A

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

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

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) + \left(\left(i \cdot t\right) \cdot b - \left(c \cdot b\right) \cdot z\right) \]
    7. Applied rewrites61.5%

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

    if -3.2999999999999999e-241 < c < 4.00000000000000029e70

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x + i \cdot \left(b \cdot t - j \cdot y\right) \]
      4. lower-fma.f64N/A

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

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

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

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

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

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

Alternative 5: 67.5% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;c \leq -3.3 \cdot 10^{-241}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t - c \cdot z, b, t\_2\right)\\

\mathbf{elif}\;c \leq 4 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot t - j \cdot y, i, t\_2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -6.19999999999999963e230 or 4.00000000000000029e70 < c

    1. Initial program 61.2%

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

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

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

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

        \[\leadsto \left(a \cdot j - b \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      6. lower-*.f6468.9

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
    4. Applied rewrites68.9%

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

    if -6.19999999999999963e230 < c < -3.2999999999999999e-241

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(i \cdot t\right) \cdot b + \left(y \cdot z - a \cdot t\right) \cdot x\right) - b \cdot \left(c \cdot z\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(i \cdot t\right) \cdot b + \left(z \cdot y - a \cdot t\right) \cdot x\right) - b \cdot \left(c \cdot z\right) \]
      4. +-commutativeN/A

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

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      7. lift-*.f64N/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      8. lift-*.f64N/A

        \[\leadsto \left(\left(z \cdot y - a \cdot t\right) \cdot x + \left(i \cdot t\right) \cdot b\right) - \left(c \cdot b\right) \cdot z \]
      9. associate--l+N/A

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

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

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) + \left(\left(i \cdot t\right) \cdot b - \left(c \cdot b\right) \cdot z\right) \]
    7. Applied rewrites61.5%

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

    if -3.2999999999999999e-241 < c < 4.00000000000000029e70

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b \cdot t - j \cdot y, i, \left(z \cdot y - a \cdot t\right) \cdot x\right) \]
      13. lower-*.f6472.5

        \[\leadsto \mathsf{fma}\left(b \cdot t - j \cdot y, i, \left(z \cdot y - a \cdot t\right) \cdot x\right) \]
    10. Applied rewrites72.5%

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

Alternative 6: 67.4% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -4.00000000000000007e205 or 4.00000000000000029e70 < c

    1. Initial program 60.9%

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

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

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

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

        \[\leadsto \left(a \cdot j - b \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      6. lower-*.f6468.5

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
    4. Applied rewrites68.5%

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

    if -4.00000000000000007e205 < c < 4.00000000000000029e70

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b \cdot t - j \cdot y, i, \left(z \cdot y - a \cdot t\right) \cdot x\right) \]
      13. lower-*.f6467.9

        \[\leadsto \mathsf{fma}\left(b \cdot t - j \cdot y, i, \left(z \cdot y - a \cdot t\right) \cdot x\right) \]
    10. Applied rewrites67.9%

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

Alternative 7: 60.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.3e18 or 7.99999999999999985e109 < y

    1. Initial program 64.5%

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

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

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

    if -2.3e18 < y < 7.1999999999999998e-134

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j \cdot c, a, \left(i \cdot t\right) \cdot b - \left(c \cdot b\right) \cdot z\right) \]
      3. lift-*.f6458.1

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

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

    if 7.1999999999999998e-134 < y < 1.6000000000000001e-60

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

    if 1.6000000000000001e-60 < y < 7.99999999999999985e109

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 59.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := \left(z \cdot y - a \cdot t\right) \cdot x\\ \mathbf{if}\;x \leq -0.235:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-37}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-124}:\\ \;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+145}:\\ \;\;\;\;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 (+ (* (* i t) b) (* j (- (* c a) (* y i)))))
        (t_2 (* (- (* z y) (* a t)) x)))
   (if (<= x -0.235)
     t_2
     (if (<= x -3.2e-37)
       t_1
       (if (<= x -6e-124)
         (* (- (* y x) (* c b)) z)
         (if (<= x 1.9e+145) 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 = ((i * t) * b) + (j * ((c * a) - (y * i)));
	double t_2 = ((z * y) - (a * t)) * x;
	double tmp;
	if (x <= -0.235) {
		tmp = t_2;
	} else if (x <= -3.2e-37) {
		tmp = t_1;
	} else if (x <= -6e-124) {
		tmp = ((y * x) - (c * b)) * z;
	} else if (x <= 1.9e+145) {
		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 = ((i * t) * b) + (j * ((c * a) - (y * i)))
    t_2 = ((z * y) - (a * t)) * x
    if (x <= (-0.235d0)) then
        tmp = t_2
    else if (x <= (-3.2d-37)) then
        tmp = t_1
    else if (x <= (-6d-124)) then
        tmp = ((y * x) - (c * b)) * z
    else if (x <= 1.9d+145) 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 = ((i * t) * b) + (j * ((c * a) - (y * i)));
	double t_2 = ((z * y) - (a * t)) * x;
	double tmp;
	if (x <= -0.235) {
		tmp = t_2;
	} else if (x <= -3.2e-37) {
		tmp = t_1;
	} else if (x <= -6e-124) {
		tmp = ((y * x) - (c * b)) * z;
	} else if (x <= 1.9e+145) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((i * t) * b) + (j * ((c * a) - (y * i)))
	t_2 = ((z * y) - (a * t)) * x
	tmp = 0
	if x <= -0.235:
		tmp = t_2
	elif x <= -3.2e-37:
		tmp = t_1
	elif x <= -6e-124:
		tmp = ((y * x) - (c * b)) * z
	elif x <= 1.9e+145:
		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(i * t) * b) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
	t_2 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x)
	tmp = 0.0
	if (x <= -0.235)
		tmp = t_2;
	elseif (x <= -3.2e-37)
		tmp = t_1;
	elseif (x <= -6e-124)
		tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z);
	elseif (x <= 1.9e+145)
		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 = ((i * t) * b) + (j * ((c * a) - (y * i)));
	t_2 = ((z * y) - (a * t)) * x;
	tmp = 0.0;
	if (x <= -0.235)
		tmp = t_2;
	elseif (x <= -3.2e-37)
		tmp = t_1;
	elseif (x <= -6e-124)
		tmp = ((y * x) - (c * b)) * z;
	elseif (x <= 1.9e+145)
		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[(i * t), $MachinePrecision] * b), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -0.235], t$95$2, If[LessEqual[x, -3.2e-37], t$95$1, If[LessEqual[x, -6e-124], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 1.9e+145], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.2 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 1.9 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -0.23499999999999999 or 1.90000000000000006e145 < x

    1. Initial program 73.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6462.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites62.2%

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

    if -0.23499999999999999 < x < -3.1999999999999999e-37 or -6e-124 < x < 1.90000000000000006e145

    1. Initial program 72.8%

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

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

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

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

        \[\leadsto \left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right) \]
    4. Applied rewrites56.0%

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

    if -3.1999999999999999e-37 < x < -6e-124

    1. Initial program 75.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lower--.f64N/A

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

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

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

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6434.3

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites34.3%

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

Alternative 9: 58.5% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.5000000000000004e66 or 1.90000000000000006e145 < x

    1. Initial program 72.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6465.8

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites65.8%

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

    if -8.5000000000000004e66 < x < -8.0000000000000001e-125

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j \cdot c, a, \left(-i\right) \cdot \left(j \cdot y\right) - \left(c \cdot b\right) \cdot z\right) \]
      5. lift-*.f6449.3

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

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

    if -8.0000000000000001e-125 < x < 1.90000000000000006e145

    1. Initial program 72.5%

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

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

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

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

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

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

Alternative 10: 56.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.4e16 or 7.99999999999999985e109 < y

    1. Initial program 64.5%

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

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

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

    if -6.4e16 < y < 7.99999999999999985e109

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 52.9% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -3.6 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.25 \cdot 10^{-144}:\\
\;\;\;\;\left(j \cdot a - b \cdot z\right) \cdot c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.60000000000000008e47 or 1.25e34 < y

    1. Initial program 64.8%

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

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

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

    if -3.60000000000000008e47 < y < 2.2499999999999999e-144

    1. Initial program 80.3%

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

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

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

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

        \[\leadsto \left(a \cdot j - b \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      6. lower-*.f6445.8

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

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

    if 2.2499999999999999e-144 < y < 1.25e34

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 52.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -3.6 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+37}:\\
\;\;\;\;\left(j \cdot a - b \cdot z\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.60000000000000008e47 or 2.49999999999999994e37 < y

    1. Initial program 64.7%

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

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

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

    if -3.60000000000000008e47 < y < 2.49999999999999994e37

    1. Initial program 79.8%

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

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

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

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

        \[\leadsto \left(a \cdot j - b \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      6. lower-*.f6444.6

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
    4. Applied rewrites44.6%

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

Alternative 13: 52.3% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2 \cdot 10^{-216}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.30000000000000006e-85 or 1.32e-82 < z

    1. Initial program 68.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lower--.f64N/A

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

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

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

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6452.1

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites52.1%

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

    if -1.30000000000000006e-85 < z < 2.0000000000000001e-216

    1. Initial program 81.9%

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

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

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

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      3. *-commutativeN/A

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

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

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      6. lift-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      7. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      8. lower-*.f6447.0

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
    4. Applied rewrites47.0%

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

    if 2.0000000000000001e-216 < z < 1.32e-82

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) - \left(-1 \cdot b\right) \cdot i\right) \cdot t \]
      3. mul-1-negN/A

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

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + b \cdot i\right) \cdot t \]
      5. lower-*.f64N/A

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + b \cdot i\right) \cdot t \]
      7. mul-1-negN/A

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

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

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

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

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

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

Alternative 14: 51.6% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;c \leq -3 \cdot 10^{-168}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\

\mathbf{elif}\;c \leq 1.95 \cdot 10^{+71}:\\
\;\;\;\;\left(b \cdot t - j \cdot y\right) \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -4.00000000000000007e205 or 1.9500000000000001e71 < c

    1. Initial program 60.8%

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

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

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

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

        \[\leadsto \left(a \cdot j - b \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      6. lower-*.f6468.6

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
    4. Applied rewrites68.6%

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

    if -4.00000000000000007e205 < c < -2.99999999999999991e-168

    1. Initial program 75.7%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lower--.f64N/A

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

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

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

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6438.5

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites38.5%

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

    if -2.99999999999999991e-168 < c < 1.9500000000000001e71

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(j \cdot y\right)\right) - -1 \cdot \left(b \cdot t\right)\right) \cdot i \]
      3. mul-1-negN/A

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

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

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(b \cdot t\right)\right)\right) \cdot i \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(b\right)\right) \cdot t\right) \cdot i \]
      7. fp-cancel-sign-sub-invN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right) \cdot i \]
      8. +-commutativeN/A

        \[\leadsto \left(b \cdot t + -1 \cdot \left(j \cdot y\right)\right) \cdot i \]
      9. mul-1-negN/A

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

        \[\leadsto \left(b \cdot t + \left(\mathsf{neg}\left(j\right)\right) \cdot y\right) \cdot i \]
      11. cancel-sign-sub-invN/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      12. lower--.f64N/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      13. lift-*.f64N/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      14. lift-*.f6446.0

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

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

Alternative 15: 50.2% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := \left(j \cdot a - b \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -5.2 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 1.95 \cdot 10^{+71}:\\
\;\;\;\;\left(b \cdot t - j \cdot y\right) \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -5.2e-82 or 1.9500000000000001e71 < c

    1. Initial program 66.4%

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

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

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

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

        \[\leadsto \left(a \cdot j - b \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
      6. lower-*.f6457.8

        \[\leadsto \left(j \cdot a - b \cdot z\right) \cdot c \]
    4. Applied rewrites57.8%

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

    if -5.2e-82 < c < 1.9500000000000001e71

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(j \cdot y\right)\right) - -1 \cdot \left(b \cdot t\right)\right) \cdot i \]
      3. mul-1-negN/A

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

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

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(b \cdot t\right)\right)\right) \cdot i \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(b\right)\right) \cdot t\right) \cdot i \]
      7. fp-cancel-sign-sub-invN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right) \cdot i \]
      8. +-commutativeN/A

        \[\leadsto \left(b \cdot t + -1 \cdot \left(j \cdot y\right)\right) \cdot i \]
      9. mul-1-negN/A

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

        \[\leadsto \left(b \cdot t + \left(\mathsf{neg}\left(j\right)\right) \cdot y\right) \cdot i \]
      11. cancel-sign-sub-invN/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      12. lower--.f64N/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      13. lift-*.f64N/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      14. lift-*.f6445.5

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
    7. Applied rewrites45.5%

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

Alternative 16: 49.8% accurate, 2.0× speedup?

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

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

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

\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 3.1 \cdot 10^{-27}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.5e36 or 3.0999999999999998e-27 < b

    1. Initial program 73.3%

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

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

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

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

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

        \[\leadsto \left(i \cdot t - c \cdot z\right) \cdot b \]
      5. lift-*.f6458.8

        \[\leadsto \left(i \cdot t - c \cdot z\right) \cdot b \]
    4. Applied rewrites58.8%

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

    if -1.5e36 < b < 3.0999999999999998e-27

    1. Initial program 73.2%

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

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

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

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      3. *-commutativeN/A

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

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

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      6. lift-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      7. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      8. lower-*.f6445.7

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

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

Alternative 17: 45.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b \cdot t - j \cdot y\right) \cdot i\\ t_2 := \left(c \cdot a - i \cdot y\right) \cdot j\\ \mathbf{if}\;j \leq -1.4 \cdot 10^{+41}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;j \leq -2.8 \cdot 10^{-231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 10^{-271}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;j \leq 1.65 \cdot 10^{+212}:\\ \;\;\;\;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 (* (- (* b t) (* j y)) i)) (t_2 (* (- (* c a) (* i y)) j)))
   (if (<= j -1.4e+41)
     t_2
     (if (<= j -2.8e-231)
       t_1
       (if (<= j 1e-271) (* (* z y) x) (if (<= j 1.65e+212) 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 = ((b * t) - (j * y)) * i;
	double t_2 = ((c * a) - (i * y)) * j;
	double tmp;
	if (j <= -1.4e+41) {
		tmp = t_2;
	} else if (j <= -2.8e-231) {
		tmp = t_1;
	} else if (j <= 1e-271) {
		tmp = (z * y) * x;
	} else if (j <= 1.65e+212) {
		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 = ((b * t) - (j * y)) * i
    t_2 = ((c * a) - (i * y)) * j
    if (j <= (-1.4d+41)) then
        tmp = t_2
    else if (j <= (-2.8d-231)) then
        tmp = t_1
    else if (j <= 1d-271) then
        tmp = (z * y) * x
    else if (j <= 1.65d+212) 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 = ((b * t) - (j * y)) * i;
	double t_2 = ((c * a) - (i * y)) * j;
	double tmp;
	if (j <= -1.4e+41) {
		tmp = t_2;
	} else if (j <= -2.8e-231) {
		tmp = t_1;
	} else if (j <= 1e-271) {
		tmp = (z * y) * x;
	} else if (j <= 1.65e+212) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((b * t) - (j * y)) * i
	t_2 = ((c * a) - (i * y)) * j
	tmp = 0
	if j <= -1.4e+41:
		tmp = t_2
	elif j <= -2.8e-231:
		tmp = t_1
	elif j <= 1e-271:
		tmp = (z * y) * x
	elif j <= 1.65e+212:
		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(b * t) - Float64(j * y)) * i)
	t_2 = Float64(Float64(Float64(c * a) - Float64(i * y)) * j)
	tmp = 0.0
	if (j <= -1.4e+41)
		tmp = t_2;
	elseif (j <= -2.8e-231)
		tmp = t_1;
	elseif (j <= 1e-271)
		tmp = Float64(Float64(z * y) * x);
	elseif (j <= 1.65e+212)
		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 = ((b * t) - (j * y)) * i;
	t_2 = ((c * a) - (i * y)) * j;
	tmp = 0.0;
	if (j <= -1.4e+41)
		tmp = t_2;
	elseif (j <= -2.8e-231)
		tmp = t_1;
	elseif (j <= 1e-271)
		tmp = (z * y) * x;
	elseif (j <= 1.65e+212)
		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[(b * t), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -1.4e+41], t$95$2, If[LessEqual[j, -2.8e-231], t$95$1, If[LessEqual[j, 1e-271], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 1.65e+212], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(b \cdot t - j \cdot y\right) \cdot i\\
t_2 := \left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{if}\;j \leq -1.4 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;j \leq -2.8 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;j \leq 1.65 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -1.4e41 or 1.65e212 < j

    1. Initial program 70.9%

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

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

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

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      3. *-commutativeN/A

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

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

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      6. lift-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      7. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      8. lower-*.f6465.0

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
    4. Applied rewrites65.0%

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

    if -1.4e41 < j < -2.7999999999999999e-231 or 9.99999999999999963e-272 < j < 1.65e212

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(j \cdot y\right)\right) - -1 \cdot \left(b \cdot t\right)\right) \cdot i \]
      3. mul-1-negN/A

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

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

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(b \cdot t\right)\right)\right) \cdot i \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(b\right)\right) \cdot t\right) \cdot i \]
      7. fp-cancel-sign-sub-invN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right) \cdot i \]
      8. +-commutativeN/A

        \[\leadsto \left(b \cdot t + -1 \cdot \left(j \cdot y\right)\right) \cdot i \]
      9. mul-1-negN/A

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

        \[\leadsto \left(b \cdot t + \left(\mathsf{neg}\left(j\right)\right) \cdot y\right) \cdot i \]
      11. cancel-sign-sub-invN/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      12. lower--.f64N/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      13. lift-*.f64N/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      14. lift-*.f6438.1

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
    7. Applied rewrites38.1%

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

    if -2.7999999999999999e-231 < j < 9.99999999999999963e-272

    1. Initial program 69.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6449.8

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites49.8%

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

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

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

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

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

Alternative 18: 42.0% accurate, 1.7× speedup?

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

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

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

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -4 \cdot 10^{+257}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -3.6 \cdot 10^{+61}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

\mathbf{elif}\;x \leq 4.1 \cdot 10^{+144}:\\
\;\;\;\;\left(b \cdot t - j \cdot y\right) \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.00000000000000012e257 or 4.10000000000000001e144 < x

    1. Initial program 70.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6471.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites71.2%

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

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

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

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

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

    if -4.00000000000000012e257 < x < -3.6000000000000001e61

    1. Initial program 75.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6459.7

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites59.7%

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

      \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      2. mul-1-negN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      4. lower-neg.f6434.5

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

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

    if -3.6000000000000001e61 < x < 4.10000000000000001e144

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(j \cdot y\right)\right) - -1 \cdot \left(b \cdot t\right)\right) \cdot i \]
      3. mul-1-negN/A

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

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

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(b \cdot t\right)\right)\right) \cdot i \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(b\right)\right) \cdot t\right) \cdot i \]
      7. fp-cancel-sign-sub-invN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right) \cdot i \]
      8. +-commutativeN/A

        \[\leadsto \left(b \cdot t + -1 \cdot \left(j \cdot y\right)\right) \cdot i \]
      9. mul-1-negN/A

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

        \[\leadsto \left(b \cdot t + \left(\mathsf{neg}\left(j\right)\right) \cdot y\right) \cdot i \]
      11. cancel-sign-sub-invN/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      12. lower--.f64N/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      13. lift-*.f64N/A

        \[\leadsto \left(b \cdot t - j \cdot y\right) \cdot i \]
      14. lift-*.f6444.3

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

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

Alternative 19: 30.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;x \leq -4 \cdot 10^{+257}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -6.2 \cdot 10^{-15}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-241}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{+89}:\\ \;\;\;\;\left(i \cdot b\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= x -4e+257)
     t_1
     (if (<= x -6.2e-15)
       (* (* (- a) t) x)
       (if (<= x -1.32e-241)
         (* (* (- i) j) y)
         (if (<= x 4.8e+89) (* (* i b) t) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (x <= -4e+257) {
		tmp = t_1;
	} else if (x <= -6.2e-15) {
		tmp = (-a * t) * x;
	} else if (x <= -1.32e-241) {
		tmp = (-i * j) * y;
	} else if (x <= 4.8e+89) {
		tmp = (i * b) * t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -4 \cdot 10^{+257}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -6.2 \cdot 10^{-15}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

\mathbf{elif}\;x \leq -1.32 \cdot 10^{-241}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\

\mathbf{elif}\;x \leq 4.8 \cdot 10^{+89}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.00000000000000012e257 or 4.80000000000000009e89 < x

    1. Initial program 70.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6467.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites67.2%

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

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

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

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

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

    if -4.00000000000000012e257 < x < -6.1999999999999998e-15

    1. Initial program 76.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6454.4

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites54.4%

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

      \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      2. mul-1-negN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      4. lower-neg.f6430.8

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

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

    if -6.1999999999999998e-15 < x < -1.31999999999999993e-241

    1. Initial program 72.8%

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

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

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

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      3. *-commutativeN/A

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

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

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      6. lift-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      7. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      8. lower-*.f6447.8

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
    4. Applied rewrites47.8%

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

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

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

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

        \[\leadsto \left(c \cdot j + -1 \cdot \frac{i \cdot \left(j \cdot y\right)}{a}\right) \cdot a \]
      4. *-commutativeN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(j, c, \frac{-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)}{a}\right) \cdot a \]
      8. associate-*r*N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(j, c, \frac{\left(-i\right) \cdot \left(j \cdot y\right)}{a}\right) \cdot a \]
      12. lift-*.f6442.6

        \[\leadsto \mathsf{fma}\left(j, c, \frac{\left(-i\right) \cdot \left(j \cdot y\right)}{a}\right) \cdot a \]
    7. Applied rewrites42.6%

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      11. lift-neg.f64N/A

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
      12. lower-*.f6427.3

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

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

    if -1.31999999999999993e-241 < x < 4.80000000000000009e89

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) - \left(-1 \cdot b\right) \cdot i\right) \cdot t \]
      3. mul-1-negN/A

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

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + b \cdot i\right) \cdot t \]
      5. lower-*.f64N/A

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + b \cdot i\right) \cdot t \]
      7. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(b \cdot i\right) \cdot t \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot t \]
      2. lift-*.f6426.6

        \[\leadsto \left(i \cdot b\right) \cdot t \]
    10. Applied rewrites26.6%

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

Alternative 20: 30.1% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-241}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{+89}:\\ \;\;\;\;\left(i \cdot b\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= x -4.5e-16)
     t_1
     (if (<= x -1.32e-241)
       (* (* (- i) j) y)
       (if (<= x 4.8e+89) (* (* i b) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (x <= -4.5e-16) {
		tmp = t_1;
	} else if (x <= -1.32e-241) {
		tmp = (-i * j) * y;
	} else if (x <= 4.8e+89) {
		tmp = (i * b) * t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1.32 \cdot 10^{-241}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\

\mathbf{elif}\;x \leq 4.8 \cdot 10^{+89}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.5000000000000002e-16 or 4.80000000000000009e89 < x

    1. Initial program 73.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6460.7

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites60.7%

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

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

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

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

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

    if -4.5000000000000002e-16 < x < -1.31999999999999993e-241

    1. Initial program 72.8%

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

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

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

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      3. *-commutativeN/A

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

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

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      6. lift-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      7. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      8. lower-*.f6447.7

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

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

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

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

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

        \[\leadsto \left(c \cdot j + -1 \cdot \frac{i \cdot \left(j \cdot y\right)}{a}\right) \cdot a \]
      4. *-commutativeN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(j, c, \frac{-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)}{a}\right) \cdot a \]
      8. associate-*r*N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(j, c, \frac{\left(-i\right) \cdot \left(j \cdot y\right)}{a}\right) \cdot a \]
      12. lift-*.f6442.5

        \[\leadsto \mathsf{fma}\left(j, c, \frac{\left(-i\right) \cdot \left(j \cdot y\right)}{a}\right) \cdot a \]
    7. Applied rewrites42.5%

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      11. lift-neg.f64N/A

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
      12. lower-*.f6427.2

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

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

    if -1.31999999999999993e-241 < x < 4.80000000000000009e89

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) - \left(-1 \cdot b\right) \cdot i\right) \cdot t \]
      3. mul-1-negN/A

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

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + b \cdot i\right) \cdot t \]
      5. lower-*.f64N/A

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + b \cdot i\right) \cdot t \]
      7. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \left(b \cdot i\right) \cdot t \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot t \]
      2. lift-*.f6426.6

        \[\leadsto \left(i \cdot b\right) \cdot t \]
    10. Applied rewrites26.6%

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

Alternative 21: 30.0% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;x \leq -1.2 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-199}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{+89}:\\ \;\;\;\;\left(i \cdot b\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= x -1.2e-5)
     t_1
     (if (<= x -1.05e-199)
       (* (* c a) j)
       (if (<= x 4.8e+89) (* (* i b) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (x <= -1.2e-5) {
		tmp = t_1;
	} else if (x <= -1.05e-199) {
		tmp = (c * a) * j;
	} else if (x <= 4.8e+89) {
		tmp = (i * b) * t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1.05 \cdot 10^{-199}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\

\mathbf{elif}\;x \leq 4.8 \cdot 10^{+89}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.2e-5 or 4.80000000000000009e89 < x

    1. Initial program 73.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. lift--.f64N/A

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6460.9

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites60.9%

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

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

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

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

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

    if -1.2e-5 < x < -1.05000000000000001e-199

    1. Initial program 74.0%

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

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

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

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      3. *-commutativeN/A

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

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

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      6. lift-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      7. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      8. lower-*.f6447.2

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
    4. Applied rewrites47.2%

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

      \[\leadsto \left(a \cdot c\right) \cdot j \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot a\right) \cdot j \]
      2. lift-*.f6427.2

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    7. Applied rewrites27.2%

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

    if -1.05000000000000001e-199 < x < 4.80000000000000009e89

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) - \left(-1 \cdot b\right) \cdot i\right) \cdot t \]
      3. mul-1-negN/A

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

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + b \cdot i\right) \cdot t \]
      5. lower-*.f64N/A

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + b \cdot i\right) \cdot t \]
      7. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t \]
      11. lift-*.f6435.2

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

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

      \[\leadsto \left(b \cdot i\right) \cdot t \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot t \]
      2. lift-*.f6427.2

        \[\leadsto \left(i \cdot b\right) \cdot t \]
    10. Applied rewrites27.2%

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

Alternative 22: 29.9% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;c \leq 1.16 \cdot 10^{+86}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.4499999999999999e-64 or 1.15999999999999999e86 < c

    1. Initial program 65.7%

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

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

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

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      3. *-commutativeN/A

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

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

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      6. lift-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      7. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      8. lower-*.f6444.8

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
    4. Applied rewrites44.8%

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

      \[\leadsto \left(a \cdot c\right) \cdot j \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot a\right) \cdot j \]
      2. lift-*.f6433.9

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    7. Applied rewrites33.9%

      \[\leadsto \left(c \cdot a\right) \cdot j \]

    if -1.4499999999999999e-64 < c < 1.15999999999999999e86

    1. Initial program 80.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in t around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot t\right) \cdot \color{blue}{\left(a \cdot x - b \cdot i\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \left(\color{blue}{a \cdot x} - b \cdot i\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \color{blue}{\left(a \cdot x - b \cdot i\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-t\right) \cdot \left(\color{blue}{a \cdot x} - b \cdot i\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x - \color{blue}{b \cdot i}\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x - i \cdot \color{blue}{b}\right) \]
      8. lower-*.f6445.8

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x - i \cdot \color{blue}{b}\right) \]
    4. Applied rewrites45.8%

      \[\leadsto \color{blue}{\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(i \cdot t\right) \cdot b \]
      2. lift-*.f64N/A

        \[\leadsto \left(i \cdot t\right) \cdot b \]
      3. lift-*.f6426.6

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Applied rewrites26.6%

      \[\leadsto \left(i \cdot t\right) \cdot \color{blue}{b} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 23: 29.9% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot c\right) \cdot a\\ \mathbf{if}\;c \leq -1.45 \cdot 10^{-64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 1.16 \cdot 10^{+86}:\\ \;\;\;\;\left(i \cdot t\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 (* (* j c) a)))
   (if (<= c -1.45e-64) t_1 (if (<= c 1.16e+86) (* (* i t) 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 = (j * c) * a;
	double tmp;
	if (c <= -1.45e-64) {
		tmp = t_1;
	} else if (c <= 1.16e+86) {
		tmp = (i * t) * 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 = (j * c) * a
    if (c <= (-1.45d-64)) then
        tmp = t_1
    else if (c <= 1.16d+86) then
        tmp = (i * t) * 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 = (j * c) * a;
	double tmp;
	if (c <= -1.45e-64) {
		tmp = t_1;
	} else if (c <= 1.16e+86) {
		tmp = (i * t) * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (j * c) * a
	tmp = 0
	if c <= -1.45e-64:
		tmp = t_1
	elif c <= 1.16e+86:
		tmp = (i * t) * b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(j * c) * a)
	tmp = 0.0
	if (c <= -1.45e-64)
		tmp = t_1;
	elseif (c <= 1.16e+86)
		tmp = Float64(Float64(i * t) * b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (j * c) * a;
	tmp = 0.0;
	if (c <= -1.45e-64)
		tmp = t_1;
	elseif (c <= 1.16e+86)
		tmp = (i * t) * 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[(j * c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[c, -1.45e-64], t$95$1, If[LessEqual[c, 1.16e+86], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot a\\
\mathbf{if}\;c \leq -1.45 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 1.16 \cdot 10^{+86}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.4499999999999999e-64 or 1.15999999999999999e86 < c

    1. Initial program 65.7%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(a \cdot c - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot \color{blue}{j} \]
      2. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      3. *-commutativeN/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      4. lower-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot \color{blue}{j} \]
      5. lift--.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      6. lift-*.f64N/A

        \[\leadsto \left(c \cdot a - y \cdot i\right) \cdot j \]
      7. *-commutativeN/A

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
      8. lower-*.f6444.8

        \[\leadsto \left(c \cdot a - i \cdot y\right) \cdot j \]
    4. Applied rewrites44.8%

      \[\leadsto \color{blue}{\left(c \cdot a - i \cdot y\right) \cdot j} \]
    5. Taylor expanded in y around 0

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot j\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot j\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      4. lift-*.f6433.7

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    7. Applied rewrites33.7%

      \[\leadsto \left(j \cdot c\right) \cdot \color{blue}{a} \]

    if -1.4499999999999999e-64 < c < 1.15999999999999999e86

    1. Initial program 80.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in t around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot t\right) \cdot \color{blue}{\left(a \cdot x - b \cdot i\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \left(\color{blue}{a \cdot x} - b \cdot i\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \color{blue}{\left(a \cdot x - b \cdot i\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-t\right) \cdot \left(\color{blue}{a \cdot x} - b \cdot i\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x - \color{blue}{b \cdot i}\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x - i \cdot \color{blue}{b}\right) \]
      8. lower-*.f6445.8

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x - i \cdot \color{blue}{b}\right) \]
    4. Applied rewrites45.8%

      \[\leadsto \color{blue}{\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(i \cdot t\right) \cdot b \]
      2. lift-*.f64N/A

        \[\leadsto \left(i \cdot t\right) \cdot b \]
      3. lift-*.f6426.6

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Applied rewrites26.6%

      \[\leadsto \left(i \cdot t\right) \cdot \color{blue}{b} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 24: 23.6% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \left(i \cdot t\right) \cdot b \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* (* i t) b))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (i * t) * b;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = (i * t) * b
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (i * t) * b;
}
def code(x, y, z, t, a, b, c, i, j):
	return (i * t) * b
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(i * t) * b)
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = (i * t) * b;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]
\begin{array}{l}

\\
\left(i \cdot t\right) \cdot b
\end{array}
Derivation
  1. Initial program 73.3%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
  2. Taylor expanded in t around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
  3. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(-1 \cdot t\right) \cdot \color{blue}{\left(a \cdot x - b \cdot i\right)} \]
    2. mul-1-negN/A

      \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \left(\color{blue}{a \cdot x} - b \cdot i\right) \]
    3. lower-*.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \color{blue}{\left(a \cdot x - b \cdot i\right)} \]
    4. lower-neg.f64N/A

      \[\leadsto \left(-t\right) \cdot \left(\color{blue}{a \cdot x} - b \cdot i\right) \]
    5. lower--.f64N/A

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x - \color{blue}{b \cdot i}\right) \]
    6. lower-*.f64N/A

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right) \]
    7. *-commutativeN/A

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x - i \cdot \color{blue}{b}\right) \]
    8. lower-*.f6440.3

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x - i \cdot \color{blue}{b}\right) \]
  4. Applied rewrites40.3%

    \[\leadsto \color{blue}{\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)} \]
  5. Taylor expanded in x around 0

    \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    2. lift-*.f64N/A

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    3. lift-*.f6423.6

      \[\leadsto \left(i \cdot t\right) \cdot b \]
  7. Applied rewrites23.6%

    \[\leadsto \left(i \cdot t\right) \cdot \color{blue}{b} \]
  8. Add Preprocessing

Alternative 25: 23.5% accurate, 5.9× speedup?

\[\begin{array}{l} \\ i \cdot \left(b \cdot t\right) \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* i (* b t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return i * (b * t);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = i * (b * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return i * (b * t);
}
def code(x, y, z, t, a, b, c, i, j):
	return i * (b * t)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(i * Float64(b * t))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = i * (b * t);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
i \cdot \left(b \cdot t\right)
\end{array}
Derivation
  1. Initial program 73.3%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
  2. Taylor expanded in t around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
  3. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(-1 \cdot t\right) \cdot \color{blue}{\left(a \cdot x - b \cdot i\right)} \]
    2. mul-1-negN/A

      \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \left(\color{blue}{a \cdot x} - b \cdot i\right) \]
    3. lower-*.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \color{blue}{\left(a \cdot x - b \cdot i\right)} \]
    4. lower-neg.f64N/A

      \[\leadsto \left(-t\right) \cdot \left(\color{blue}{a \cdot x} - b \cdot i\right) \]
    5. lower--.f64N/A

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x - \color{blue}{b \cdot i}\right) \]
    6. lower-*.f64N/A

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right) \]
    7. *-commutativeN/A

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x - i \cdot \color{blue}{b}\right) \]
    8. lower-*.f6440.3

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x - i \cdot \color{blue}{b}\right) \]
  4. Applied rewrites40.3%

    \[\leadsto \color{blue}{\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)} \]
  5. Taylor expanded in x around 0

    \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    2. lift-*.f64N/A

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    3. lift-*.f6423.6

      \[\leadsto \left(i \cdot t\right) \cdot b \]
  7. Applied rewrites23.6%

    \[\leadsto \left(i \cdot t\right) \cdot \color{blue}{b} \]
  8. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    2. lift-*.f64N/A

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    3. associate-*l*N/A

      \[\leadsto i \cdot \left(t \cdot \color{blue}{b}\right) \]
    4. *-commutativeN/A

      \[\leadsto i \cdot \left(b \cdot t\right) \]
    5. lower-*.f64N/A

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
    6. lift-*.f6423.5

      \[\leadsto i \cdot \left(b \cdot t\right) \]
  9. Applied rewrites23.5%

    \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2025115 
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))