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

Percentage Accurate: 73.6% → 82.6%
Time: 7.8s
Alternatives: 31
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 31 alternatives:

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

Initial Program: 73.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 82.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(-i\right) \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(j, y, \left(-b\right) \cdot t\right)}{c}, c, -c \cdot \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(-a, t, z \cdot y\right)}{c}, x, j \cdot a\right) - b \cdot z}{i}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1
         (+
          (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
          (* j (- (* c a) (* y i))))))
   (if (<= t_1 INFINITY)
     t_1
     (*
      (- i)
      (fma
       (/ (fma j y (* (- b) t)) c)
       c
       (-
        (*
         c
         (/ (- (fma (/ (fma (- a) t (* z y)) c) x (* j a)) (* b z)) i))))))))
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 = -i * fma((fma(j, y, (-b * t)) / c), c, -(c * ((fma((fma(-a, t, (z * y)) / c), x, (j * a)) - (b * z)) / i)));
	}
	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(Float64(-i) * fma(Float64(fma(j, y, Float64(Float64(-b) * t)) / c), c, Float64(-Float64(c * Float64(Float64(fma(Float64(fma(Float64(-a), t, Float64(z * y)) / c), x, Float64(j * a)) - Float64(b * z)) / i)))));
	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[((-i) * N[(N[(N[(j * y + N[((-b) * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * c + (-N[(c * N[(N[(N[(N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * x + N[(j * a), $MachinePrecision]), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $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}:\\
\;\;\;\;\left(-i\right) \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(j, y, \left(-b\right) \cdot t\right)}{c}, c, -c \cdot \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(-a, t, z \cdot y\right)}{c}, x, j \cdot a\right) - b \cdot z}{i}\right)\\


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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.1% 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(j, a, \left(-b\right) \cdot z\right) \cdot c\\ \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 j a (* (- b) z)) c))))
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(j, a, (-b * z)) * c;
	}
	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(j, a, Float64(Float64(-b) * z)) * c);
	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[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $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(j, a, \left(-b\right) \cdot z\right) \cdot c\\


\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.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) \]

    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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

Alternative 3: 23.0% accurate, 0.8× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\


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

    1. Initial program 87.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-*.f6442.3

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

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6423.3

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z\right) \]
      5. associate-*r*N/A

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6424.1

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    9. Applied rewrites24.1%

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

    if -1.0000000000000001e241 < (+.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 68.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 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-*.f6438.4

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

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6422.6

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

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

Alternative 4: 63.7% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.35e-145 or 1.9000000000000001e133 < x

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(z, x, \frac{\left(-a\right) \cdot \left(t \cdot x\right)}{y}\right) \cdot y - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      12. lower-*.f6464.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e-145 < x < 1.9000000000000001e133

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c + j \cdot \left(c \cdot a - y \cdot i\right) \]
      6. lower-*.f6460.9

        \[\leadsto \left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c + j \cdot \left(c \cdot a - y \cdot i\right) \]
    7. Applied rewrites60.9%

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

Alternative 5: 51.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.6e157 or 1.3e-62 < t

    1. Initial program 66.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(-1 \cdot i + \frac{a \cdot x}{b}\right) \cdot b\right) \]
      3. +-commutativeN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, \mathsf{neg}\left(i\right)\right) \cdot b\right) \]
      8. lift-neg.f6460.0

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

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

    if -1.6e157 < t < -1.10000000000000003e-75

    1. Initial program 75.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 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-*.f6439.0

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

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

    if -1.10000000000000003e-75 < t < -4.5000000000000002e-301

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000002e-301 < t < 2.1500000000000001e-147

    1. Initial program 78.1%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      7. lower-neg.f6447.9

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

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

    if 2.1500000000000001e-147 < t < 1.3e-62

    1. Initial program 83.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 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. *-commutativeN/A

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

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

Alternative 6: 59.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+149}:\\
\;\;\;\;\left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-171}:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right) + t\_1\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{+38}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.40000000000000012e149

    1. Initial program 60.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(-1 \cdot i + \frac{a \cdot x}{b}\right) \cdot b\right) \]
      3. +-commutativeN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, \mathsf{neg}\left(i\right)\right) \cdot b\right) \]
      8. lift-neg.f6469.2

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

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

    if -2.40000000000000012e149 < t < 3.9999999999999999e-171

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(z, x, \frac{\left(-a\right) \cdot \left(t \cdot x\right)}{y}\right) \cdot y - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      12. lower-*.f6475.4

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

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

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

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

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

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

        \[\leadsto \left(-b\right) \cdot \left(\color{blue}{c} \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lift-*.f6455.3

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

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

    if 3.9999999999999999e-171 < t < 1.24999999999999992e38

    1. Initial program 81.2%

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

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

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

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

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

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

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

    if 1.24999999999999992e38 < t

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(c \cdot t\right) \cdot \left(-1 \cdot \frac{a \cdot x}{c} - \color{blue}{-1} \cdot \frac{b \cdot i}{c}\right) \]
      4. distribute-lft-out--N/A

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

        \[\leadsto \left(c \cdot t\right) \cdot \left(-1 \cdot \left(\frac{a \cdot x}{c} - \color{blue}{\frac{b \cdot i}{c}}\right)\right) \]
      6. sub-divN/A

        \[\leadsto \left(c \cdot t\right) \cdot \left(-1 \cdot \frac{a \cdot x - b \cdot i}{c}\right) \]
      7. lower-/.f64N/A

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

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

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

        \[\leadsto \left(c \cdot t\right) \cdot \left(-1 \cdot \frac{a \cdot x + -1 \cdot \left(b \cdot i\right)}{c}\right) \]
      11. lower-fma.f64N/A

        \[\leadsto \left(c \cdot t\right) \cdot \left(-1 \cdot \frac{\mathsf{fma}\left(a, x, -1 \cdot \left(b \cdot i\right)\right)}{c}\right) \]
      12. associate-*r*N/A

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

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

        \[\leadsto \left(c \cdot t\right) \cdot \left(-1 \cdot \frac{\mathsf{fma}\left(a, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right)}{c}\right) \]
      15. lift-neg.f6462.8

        \[\leadsto \left(c \cdot t\right) \cdot \left(-1 \cdot \frac{\mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)}{c}\right) \]
    9. Applied rewrites62.8%

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

Alternative 7: 53.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\ t_2 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\ t_3 := \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-b\right) \cdot t\right)\\ \mathbf{if}\;i \leq -1.95 \cdot 10^{+61}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;i \leq -7 \cdot 10^{-236}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;i \leq -6 \cdot 10^{-286}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 7.4 \cdot 10^{-231}:\\ \;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{elif}\;i \leq 6.5 \cdot 10^{-145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 3.2 \cdot 10^{+18}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (fma (- a) t (* z y)) x))
        (t_2 (* (fma (- t) x (* j c)) a))
        (t_3 (* (- i) (fma j y (* (- b) t)))))
   (if (<= i -1.95e+61)
     t_3
     (if (<= i -7e-236)
       t_2
       (if (<= i -6e-286)
         t_1
         (if (<= i 7.4e-231)
           (* (fma j a (* (- b) z)) c)
           (if (<= i 6.5e-145) t_1 (if (<= i 3.2e+18) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(-a, t, (z * y)) * x;
	double t_2 = fma(-t, x, (j * c)) * a;
	double t_3 = -i * fma(j, y, (-b * t));
	double tmp;
	if (i <= -1.95e+61) {
		tmp = t_3;
	} else if (i <= -7e-236) {
		tmp = t_2;
	} else if (i <= -6e-286) {
		tmp = t_1;
	} else if (i <= 7.4e-231) {
		tmp = fma(j, a, (-b * z)) * c;
	} else if (i <= 6.5e-145) {
		tmp = t_1;
	} else if (i <= 3.2e+18) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x)
	t_2 = Float64(fma(Float64(-t), x, Float64(j * c)) * a)
	t_3 = Float64(Float64(-i) * fma(j, y, Float64(Float64(-b) * t)))
	tmp = 0.0
	if (i <= -1.95e+61)
		tmp = t_3;
	elseif (i <= -7e-236)
		tmp = t_2;
	elseif (i <= -6e-286)
		tmp = t_1;
	elseif (i <= 7.4e-231)
		tmp = Float64(fma(j, a, Float64(Float64(-b) * z)) * c);
	elseif (i <= 6.5e-145)
		tmp = t_1;
	elseif (i <= 3.2e+18)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$3 = N[((-i) * N[(j * y + N[((-b) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.95e+61], t$95$3, If[LessEqual[i, -7e-236], t$95$2, If[LessEqual[i, -6e-286], t$95$1, If[LessEqual[i, 7.4e-231], N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[i, 6.5e-145], t$95$1, If[LessEqual[i, 3.2e+18], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;i \leq -7 \cdot 10^{-236}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;i \leq -6 \cdot 10^{-286}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;i \leq 6.5 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq 3.2 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -1.94999999999999994e61 or 3.2e18 < i

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

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

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(b\right)\right) \cdot t\right) \]
      8. lower-neg.f6463.0

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

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

    if -1.94999999999999994e61 < i < -6.99999999999999988e-236 or 6.5000000000000002e-145 < i < 3.2e18

    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 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.6

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

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

    if -6.99999999999999988e-236 < i < -6.0000000000000001e-286 or 7.39999999999999986e-231 < i < 6.5000000000000002e-145

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000001e-286 < i < 7.39999999999999986e-231

    1. Initial program 81.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 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. fp-cancel-sub-sign-invN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      7. lower-neg.f6450.3

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

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

Alternative 8: 67.7% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -9.5000000000000003e63 or 1.25000000000000011e55 < i

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

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

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(b\right)\right) \cdot t\right) \]
      8. lower-neg.f6464.6

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

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

    if -9.5000000000000003e63 < i < 1.25000000000000011e55

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 64.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -3.5 \cdot 10^{+99}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right)\\

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

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


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

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right) \]
      4. lower-*.f6466.8

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right) \]
    4. Applied rewrites66.8%

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

    if -3.4999999999999998e99 < j < 1.1e175

    1. Initial program 74.2%

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

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

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

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

    if 1.1e175 < j

    1. Initial program 71.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 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. *-commutativeN/A

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

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

Alternative 10: 51.7% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 8 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.6e157 or 8e14 < t

    1. Initial program 64.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

    if -1.6e157 < t < -1.10000000000000003e-75

    1. Initial program 75.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 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-*.f6439.0

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

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

    if -1.10000000000000003e-75 < t < -4.5000000000000002e-301 or 4.0999999999999998e-150 < t < 8e14

    1. Initial program 81.8%

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

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

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

    if -4.5000000000000002e-301 < t < 4.0999999999999998e-150

    1. Initial program 78.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 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. fp-cancel-sub-sign-invN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      7. lower-neg.f6448.1

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

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

Alternative 11: 59.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+149}:\\
\;\;\;\;\left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-171}:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right) + t\_1\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.40000000000000012e149

    1. Initial program 60.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(-1 \cdot i + \frac{a \cdot x}{b}\right) \cdot b\right) \]
      3. +-commutativeN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, \mathsf{neg}\left(i\right)\right) \cdot b\right) \]
      8. lift-neg.f6469.2

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

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

    if -2.40000000000000012e149 < t < 3.9999999999999999e-171

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(z, x, \frac{\left(-a\right) \cdot \left(t \cdot x\right)}{y}\right) \cdot y - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      12. lower-*.f6475.4

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

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

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

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

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

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

        \[\leadsto \left(-b\right) \cdot \left(\color{blue}{c} \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lift-*.f6455.3

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

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

    if 3.9999999999999999e-171 < t < 1.45000000000000003e38

    1. Initial program 81.2%

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

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

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

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

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

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

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

    if 1.45000000000000003e38 < t

    1. Initial program 65.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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

Alternative 12: 59.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+149}:\\
\;\;\;\;\left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\

\mathbf{elif}\;t \leq 4.1 \cdot 10^{-171}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_1\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.50000000000000002e149

    1. Initial program 60.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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(-1 \cdot i + \frac{a \cdot x}{b}\right) \cdot b\right) \]
      3. +-commutativeN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, \mathsf{neg}\left(i\right)\right) \cdot b\right) \]
      8. lift-neg.f6469.2

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

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

    if -1.50000000000000002e149 < t < 4.1e-171

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

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

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

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

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

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

        \[\leadsto \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      6. lower-*.f6455.4

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

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

    if 4.1e-171 < t < 1.45000000000000003e38

    1. Initial program 81.2%

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

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

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

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

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

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

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

    if 1.45000000000000003e38 < t

    1. Initial program 65.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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

Alternative 13: 43.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;c \leq -7 \cdot 10^{-161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

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

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

\mathbf{elif}\;c \leq 6.4 \cdot 10^{-40}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.4e-117 or 6.40000000000000004e-40 < c

    1. Initial program 69.5%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      7. lower-neg.f6452.7

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

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

    if -1.4e-117 < c < -7.00000000000000039e-161

    1. Initial program 81.5%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      4. distribute-lft-neg-outN/A

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(a \cdot t\right)\right) \cdot x \]
      8. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      10. lift-neg.f6431.7

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

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

    if -7.00000000000000039e-161 < c < -1.79999999999999992e-254

    1. Initial program 81.3%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6430.3

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

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

    if -1.79999999999999992e-254 < c < 1.9999999999999999e-280

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-280 < c < 6.40000000000000004e-40

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

Alternative 14: 42.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -1.95 \cdot 10^{-154}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\

\mathbf{elif}\;b \leq 2.1 \cdot 10^{-256}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\

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

\mathbf{elif}\;b \leq 6 \cdot 10^{-60}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.20000000000000014e43 or 6.00000000000000038e-60 < b

    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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6457.6

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

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

    if -3.20000000000000014e43 < b < -1.95000000000000016e-154

    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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

    if -1.95000000000000016e-154 < b < 2.10000000000000003e-256

    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 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. *-commutativeN/A

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, y, c \cdot a\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 2.10000000000000003e-256 < b < 2.24999999999999993e-156

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6427.1

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z\right) \]
      5. associate-*r*N/A

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6427.3

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    9. Applied rewrites27.3%

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

    if 2.24999999999999993e-156 < b < 6.00000000000000038e-60

    1. Initial program 74.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-*.f6444.1

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. lower-*.f6423.9

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

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

Alternative 15: 52.1% accurate, 1.3× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.6499999999999999e69

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

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

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

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

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

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

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

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

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

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

    if -1.6499999999999999e69 < z < -9.99999999999999961e-261

    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 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. *-commutativeN/A

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
      16. lift-*.f6444.2

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

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

    if -9.99999999999999961e-261 < z < 4.2e17

    1. Initial program 81.8%

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

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

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

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

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

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

    if 4.2e17 < z

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\frac{x \cdot y}{c} - b\right) \cdot z\right) \cdot c \]
      3. lower--.f64N/A

        \[\leadsto \left(\left(\frac{x \cdot y}{c} - b\right) \cdot z\right) \cdot c \]
      4. lower-/.f64N/A

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

        \[\leadsto \left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c \]
      6. lift-*.f6459.6

        \[\leadsto \left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c \]
    9. Applied rewrites59.6%

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

Alternative 16: 60.4% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+149}:\\
\;\;\;\;\left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.50000000000000002e149

    1. Initial program 60.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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(-1 \cdot i + \frac{a \cdot x}{b}\right) \cdot b\right) \]
      3. +-commutativeN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, \mathsf{neg}\left(i\right)\right) \cdot b\right) \]
      8. lift-neg.f6469.2

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

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

    if -1.50000000000000002e149 < t < 1.45000000000000003e38

    1. Initial program 79.3%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right) \]
      4. lower-*.f6457.2

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right) \]
    4. Applied rewrites57.2%

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

    if 1.45000000000000003e38 < t

    1. Initial program 65.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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

Alternative 17: 51.7% accurate, 1.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2e22 or 2.9000000000000001e131 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e22 < x < -4.8e-157

    1. Initial program 75.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 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. fp-cancel-sub-sign-invN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      7. lower-neg.f6440.8

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

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

    if -4.8e-157 < x < 8.2e-144

    1. Initial program 69.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. *-commutativeN/A

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

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

    if 8.2e-144 < x < 2.9000000000000001e131

    1. Initial program 77.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-*.f6438.7

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

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

Alternative 18: 29.9% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-123}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -2e+22)
   (* (- t) (* a x))
   (if (<= x -9.5e-123)
     (* (* (- c) z) b)
     (if (<= x 4.8e-170)
       (* (* c a) j)
       (if (<= x 9.5e+63) (* (- i) (* j y)) (* (* y x) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2e+22) {
		tmp = -t * (a * x);
	} else if (x <= -9.5e-123) {
		tmp = (-c * z) * b;
	} else if (x <= 4.8e-170) {
		tmp = (c * a) * j;
	} else if (x <= 9.5e+63) {
		tmp = -i * (j * y);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\

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

\mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2e22

    1. Initial program 72.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

    if -2e22 < x < -9.5000000000000002e-123

    1. Initial program 76.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000002e-123 < x < 4.7999999999999999e-170

    1. Initial program 69.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. *-commutativeN/A

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
      16. lift-*.f6448.6

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, y, c \cdot a\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-*.f6428.4

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    7. Applied rewrites28.4%

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

    if 4.7999999999999999e-170 < x < 9.5000000000000003e63

    1. Initial program 76.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-*.f6437.4

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. lower-*.f6423.1

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

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

    if 9.5000000000000003e63 < x

    1. Initial program 75.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-*.f6446.8

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

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6435.9

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z\right) \]
      5. associate-*r*N/A

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6436.5

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

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

Alternative 19: 30.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\ \;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-123}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -2e+22)
   (* (* (- t) x) a)
   (if (<= x -9.5e-123)
     (* (* (- c) z) b)
     (if (<= x 4.8e-170)
       (* (* c a) j)
       (if (<= x 9.5e+63) (* (- i) (* j y)) (* (* y x) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2e+22) {
		tmp = (-t * x) * a;
	} else if (x <= -9.5e-123) {
		tmp = (-c * z) * b;
	} else if (x <= 4.8e-170) {
		tmp = (c * a) * j;
	} else if (x <= 9.5e+63) {
		tmp = -i * (j * y);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\

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

\mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2e22

    1. Initial program 72.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-*.f6446.2

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

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(t\right)\right) \cdot x\right) \cdot a \]
      4. lift-neg.f6436.2

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

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

    if -2e22 < x < -9.5000000000000002e-123

    1. Initial program 76.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000002e-123 < x < 4.7999999999999999e-170

    1. Initial program 69.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. *-commutativeN/A

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
      16. lift-*.f6448.6

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, y, c \cdot a\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-*.f6428.4

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    7. Applied rewrites28.4%

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

    if 4.7999999999999999e-170 < x < 9.5000000000000003e63

    1. Initial program 76.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-*.f6437.4

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. lower-*.f6423.1

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

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

    if 9.5000000000000003e63 < x

    1. Initial program 75.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-*.f6446.8

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

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6435.9

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z\right) \]
      5. associate-*r*N/A

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6436.5

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

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

Alternative 20: 29.7% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-123}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -2e+22)
   (* (* (- a) t) x)
   (if (<= x -9.5e-123)
     (* (* (- c) z) b)
     (if (<= x 4.8e-170)
       (* (* c a) j)
       (if (<= x 9.5e+63) (* (- i) (* j y)) (* (* y x) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2e+22) {
		tmp = (-a * t) * x;
	} else if (x <= -9.5e-123) {
		tmp = (-c * z) * b;
	} else if (x <= 4.8e-170) {
		tmp = (c * a) * j;
	} else if (x <= 9.5e+63) {
		tmp = -i * (j * y);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

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

\mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2e22

    1. Initial program 72.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      4. distribute-lft-neg-outN/A

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(a \cdot t\right)\right) \cdot x \]
      8. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      10. lift-neg.f6435.2

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

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

    if -2e22 < x < -9.5000000000000002e-123

    1. Initial program 76.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 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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000002e-123 < x < 4.7999999999999999e-170

    1. Initial program 69.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. *-commutativeN/A

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
      16. lift-*.f6448.6

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, y, c \cdot a\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-*.f6428.4

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    7. Applied rewrites28.4%

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

    if 4.7999999999999999e-170 < x < 9.5000000000000003e63

    1. Initial program 76.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-*.f6437.4

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. lower-*.f6423.1

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

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

    if 9.5000000000000003e63 < x

    1. Initial program 75.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-*.f6446.8

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

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6435.9

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z\right) \]
      5. associate-*r*N/A

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6436.5

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

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

Alternative 21: 51.8% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.35e153 or 2100 < a

    1. Initial program 64.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-*.f6465.2

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

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

    if -1.35e153 < a < 5.4000000000000001e-214

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites43.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]

    if 5.4000000000000001e-214 < a < 2100

    1. Initial program 81.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(i \cdot t + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6444.0

        \[\leadsto \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites44.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 22: 51.1% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{if}\;c \leq -2.2 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 9 \cdot 10^{-280}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{-35}:\\ \;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (fma j a (* (- b) z)) c)))
   (if (<= c -2.2e+142)
     t_1
     (if (<= c 9e-280)
       (* (fma (- i) j (* z x)) y)
       (if (<= c 1.3e-35) (* (fma (- a) t (* z y)) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(j, a, (-b * z)) * c;
	double tmp;
	if (c <= -2.2e+142) {
		tmp = t_1;
	} else if (c <= 9e-280) {
		tmp = fma(-i, j, (z * x)) * y;
	} else if (c <= 1.3e-35) {
		tmp = fma(-a, t, (z * y)) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(j, a, Float64(Float64(-b) * z)) * c)
	tmp = 0.0
	if (c <= -2.2e+142)
		tmp = t_1;
	elseif (c <= 9e-280)
		tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y);
	elseif (c <= 1.3e-35)
		tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -2.2e+142], t$95$1, If[LessEqual[c, 9e-280], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, 1.3e-35], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -2.2 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 9 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\

\mathbf{elif}\;c \leq 1.3 \cdot 10^{-35}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.19999999999999987e142 or 1.30000000000000002e-35 < c

    1. Initial program 66.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 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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot j + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      7. lower-neg.f6460.8

        \[\leadsto \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites60.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c} \]

    if -2.19999999999999987e142 < c < 8.9999999999999991e-280

    1. Initial program 78.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-*.f6443.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites43.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]

    if 8.9999999999999991e-280 < c < 1.30000000000000002e-35

    1. Initial program 79.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot \color{blue}{x} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot \color{blue}{x} \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(y \cdot z + \left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(y \cdot z + -1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x \]
      9. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t + y \cdot z\right) \cdot x \]
      10. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x \]
      11. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right) \cdot x \]
      12. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t, y \cdot z\right) \cdot x \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
      14. lower-*.f6446.9

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    4. Applied rewrites46.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 23: 43.4% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{if}\;c \leq -3.2 \cdot 10^{-141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{-280}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{elif}\;c \leq 6.4 \cdot 10^{-40}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (fma j a (* (- b) z)) c)))
   (if (<= c -3.2e-141)
     t_1
     (if (<= c 1.5e-280)
       (* (fma y x (* (- b) c)) z)
       (if (<= c 6.4e-40) (* (- t) (* a x)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(j, a, (-b * z)) * c;
	double tmp;
	if (c <= -3.2e-141) {
		tmp = t_1;
	} else if (c <= 1.5e-280) {
		tmp = fma(y, x, (-b * c)) * z;
	} else if (c <= 6.4e-40) {
		tmp = -t * (a * x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(j, a, Float64(Float64(-b) * z)) * c)
	tmp = 0.0
	if (c <= -3.2e-141)
		tmp = t_1;
	elseif (c <= 1.5e-280)
		tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z);
	elseif (c <= 6.4e-40)
		tmp = Float64(Float64(-t) * Float64(a * x));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -3.2e-141], t$95$1, If[LessEqual[c, 1.5e-280], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 6.4e-40], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -3.2 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 1.5 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\

\mathbf{elif}\;c \leq 6.4 \cdot 10^{-40}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.2000000000000001e-141 or 6.40000000000000004e-40 < c

    1. Initial program 69.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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot j + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      7. lower-neg.f6451.8

        \[\leadsto \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites51.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c} \]

    if -3.2000000000000001e-141 < c < 1.49999999999999994e-280

    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 z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(x \cdot y + \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x + \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      7. lower-neg.f6432.2

        \[\leadsto \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z \]
    4. Applied rewrites32.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z} \]

    if 1.49999999999999994e-280 < c < 6.40000000000000004e-40

    1. Initial program 79.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x + \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot i}\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, \color{blue}{x}, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      8. lower-neg.f6446.4

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right) \]
    4. Applied rewrites46.4%

      \[\leadsto \color{blue}{\left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(-t\right) \cdot \left(a \cdot \color{blue}{x}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6426.0

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
    7. Applied rewrites26.0%

      \[\leadsto \left(-t\right) \cdot \left(a \cdot \color{blue}{x}\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 24: 30.4% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -76000000000000:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;j \leq 3.7 \cdot 10^{-305}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;j \leq 9 \cdot 10^{-232}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \mathbf{elif}\;j \leq 1.25 \cdot 10^{-43}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= j -76000000000000.0)
   (* (* c a) j)
   (if (<= j 3.7e-305)
     (* (* z y) x)
     (if (<= j 9e-232)
       (* (* i t) b)
       (if (<= j 1.25e-43) (* (* y x) z) (* (* j c) a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -76000000000000.0) {
		tmp = (c * a) * j;
	} else if (j <= 3.7e-305) {
		tmp = (z * y) * x;
	} else if (j <= 9e-232) {
		tmp = (i * t) * b;
	} else if (j <= 1.25e-43) {
		tmp = (y * x) * z;
	} else {
		tmp = (j * c) * a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (j <= (-76000000000000.0d0)) then
        tmp = (c * a) * j
    else if (j <= 3.7d-305) then
        tmp = (z * y) * x
    else if (j <= 9d-232) then
        tmp = (i * t) * b
    else if (j <= 1.25d-43) then
        tmp = (y * x) * z
    else
        tmp = (j * c) * a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -76000000000000.0) {
		tmp = (c * a) * j;
	} else if (j <= 3.7e-305) {
		tmp = (z * y) * x;
	} else if (j <= 9e-232) {
		tmp = (i * t) * b;
	} else if (j <= 1.25e-43) {
		tmp = (y * x) * z;
	} else {
		tmp = (j * c) * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if j <= -76000000000000.0:
		tmp = (c * a) * j
	elif j <= 3.7e-305:
		tmp = (z * y) * x
	elif j <= 9e-232:
		tmp = (i * t) * b
	elif j <= 1.25e-43:
		tmp = (y * x) * z
	else:
		tmp = (j * c) * a
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (j <= -76000000000000.0)
		tmp = Float64(Float64(c * a) * j);
	elseif (j <= 3.7e-305)
		tmp = Float64(Float64(z * y) * x);
	elseif (j <= 9e-232)
		tmp = Float64(Float64(i * t) * b);
	elseif (j <= 1.25e-43)
		tmp = Float64(Float64(y * x) * z);
	else
		tmp = Float64(Float64(j * c) * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -76000000000000.0)
		tmp = (c * a) * j;
	elseif (j <= 3.7e-305)
		tmp = (z * y) * x;
	elseif (j <= 9e-232)
		tmp = (i * t) * b;
	elseif (j <= 1.25e-43)
		tmp = (y * x) * z;
	else
		tmp = (j * c) * a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -76000000000000.0], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[j, 3.7e-305], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 9e-232], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[j, 1.25e-43], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -76000000000000:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\

\mathbf{elif}\;j \leq 3.7 \cdot 10^{-305}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;j \leq 9 \cdot 10^{-232}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

\mathbf{elif}\;j \leq 1.25 \cdot 10^{-43}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\

\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if j < -7.6e13

    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 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. *-commutativeN/A

        \[\leadsto \left(a \cdot c - y \cdot i\right) \cdot j \]
      6. *-commutativeN/A

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot c + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      8. mul-1-negN/A

        \[\leadsto \left(a \cdot c + \left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      9. associate-*r*N/A

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right) \cdot j \]
      11. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot y + a \cdot c\right) \cdot j \]
      13. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), y, a \cdot c\right) \cdot j \]
      14. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, y, a \cdot c\right) \cdot j \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
      16. lift-*.f6459.2

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
    4. Applied rewrites59.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, y, c \cdot a\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.7

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    7. Applied rewrites33.7%

      \[\leadsto \left(c \cdot a\right) \cdot j \]

    if -7.6e13 < j < 3.69999999999999977e-305

    1. Initial program 73.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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-*.f6432.3

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites32.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6425.5

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites25.5%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]

    if 3.69999999999999977e-305 < j < 8.99999999999999933e-232

    1. Initial program 70.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 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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(i \cdot t + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6449.1

        \[\leadsto \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites49.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b} \]
    5. Taylor expanded in z around 0

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    6. Step-by-step derivation
      1. lift-*.f6431.0

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Applied rewrites31.0%

      \[\leadsto \left(i \cdot t\right) \cdot b \]

    if 8.99999999999999933e-232 < j < 1.25000000000000005e-43

    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 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-*.f6435.4

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites35.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6428.0

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites28.0%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      2. lift-*.f64N/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto x \cdot \left(z \cdot \color{blue}{y}\right) \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \left(y \cdot z\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      6. lower-*.f64N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      7. *-commutativeN/A

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6428.3

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    9. Applied rewrites28.3%

      \[\leadsto \left(y \cdot x\right) \cdot z \]

    if 1.25000000000000005e-43 < j

    1. Initial program 74.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-*.f6445.8

        \[\leadsto \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a \]
    4. Applied rewrites45.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a} \]
    5. Taylor expanded in x around 0

      \[\leadsto \left(c \cdot j\right) \cdot a \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      2. lift-*.f6433.3

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    7. Applied rewrites33.3%

      \[\leadsto \left(j \cdot c\right) \cdot a \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 25: 30.0% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{-172}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -2e+22)
   (* (* (- a) t) x)
   (if (<= x 1.02e-172)
     (* (* j c) a)
     (if (<= x 9.5e+63) (* (- i) (* j y)) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2e+22) {
		tmp = (-a * t) * x;
	} else if (x <= 1.02e-172) {
		tmp = (j * c) * a;
	} else if (x <= 9.5e+63) {
		tmp = -i * (j * y);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-2d+22)) then
        tmp = (-a * t) * x
    else if (x <= 1.02d-172) then
        tmp = (j * c) * a
    else if (x <= 9.5d+63) then
        tmp = -i * (j * y)
    else
        tmp = (y * x) * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2e+22) {
		tmp = (-a * t) * x;
	} else if (x <= 1.02e-172) {
		tmp = (j * c) * a;
	} else if (x <= 9.5e+63) {
		tmp = -i * (j * y);
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -2e+22:
		tmp = (-a * t) * x
	elif x <= 1.02e-172:
		tmp = (j * c) * a
	elif x <= 9.5e+63:
		tmp = -i * (j * y)
	else:
		tmp = (y * x) * z
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -2e+22)
		tmp = Float64(Float64(Float64(-a) * t) * x);
	elseif (x <= 1.02e-172)
		tmp = Float64(Float64(j * c) * a);
	elseif (x <= 9.5e+63)
		tmp = Float64(Float64(-i) * Float64(j * y));
	else
		tmp = Float64(Float64(y * x) * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -2e+22)
		tmp = (-a * t) * x;
	elseif (x <= 1.02e-172)
		tmp = (j * c) * a;
	elseif (x <= 9.5e+63)
		tmp = -i * (j * y);
	else
		tmp = (y * x) * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+22], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 1.02e-172], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 9.5e+63], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

\mathbf{elif}\;x \leq 1.02 \cdot 10^{-172}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2e22

    1. Initial program 72.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 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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x + \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot i}\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, \color{blue}{x}, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      8. lower-neg.f6447.1

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right) \]
    4. Applied rewrites47.1%

      \[\leadsto \color{blue}{\left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot \color{blue}{x}\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \left(\mathsf{neg}\left(a \cdot t\right)\right) \cdot x \]
      5. mul-1-negN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      6. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      7. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a \cdot t\right)\right) \cdot x \]
      8. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      9. lower-*.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      10. lift-neg.f6435.2

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    7. Applied rewrites35.2%

      \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot \color{blue}{x} \]

    if -2e22 < x < 1.02e-172

    1. Initial program 71.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 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-*.f6433.5

        \[\leadsto \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a \]
    4. Applied rewrites33.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a} \]
    5. Taylor expanded in x around 0

      \[\leadsto \left(c \cdot j\right) \cdot a \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      2. lift-*.f6427.0

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    7. Applied rewrites27.0%

      \[\leadsto \left(j \cdot c\right) \cdot a \]

    if 1.02e-172 < x < 9.5000000000000003e63

    1. Initial program 76.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-*.f6437.4

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites37.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around 0

      \[\leadsto -1 \cdot \color{blue}{\left(i \cdot \left(j \cdot y\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \left(j \cdot \color{blue}{y}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \left(j \cdot \color{blue}{y}\right) \]
      3. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(j \cdot y\right) \]
      4. lift-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. lower-*.f6423.1

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
    7. Applied rewrites23.1%

      \[\leadsto \left(-i\right) \cdot \color{blue}{\left(j \cdot y\right)} \]

    if 9.5000000000000003e63 < x

    1. Initial program 75.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-*.f6446.8

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites46.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6435.9

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites35.9%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      2. lift-*.f64N/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto x \cdot \left(z \cdot \color{blue}{y}\right) \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \left(y \cdot z\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      6. lower-*.f64N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      7. *-commutativeN/A

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6436.5

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    9. Applied rewrites36.5%

      \[\leadsto \left(y \cdot x\right) \cdot z \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 26: 52.3% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{if}\;c \leq -7.8 \cdot 10^{+112}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{-35}:\\ \;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (fma j a (* (- b) z)) c)))
   (if (<= c -7.8e+112)
     t_1
     (if (<= c 1.3e-35) (* (fma (- a) t (* z y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(j, a, (-b * z)) * c;
	double tmp;
	if (c <= -7.8e+112) {
		tmp = t_1;
	} else if (c <= 1.3e-35) {
		tmp = fma(-a, t, (z * y)) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(j, a, Float64(Float64(-b) * z)) * c)
	tmp = 0.0
	if (c <= -7.8e+112)
		tmp = t_1;
	elseif (c <= 1.3e-35)
		tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -7.8e+112], t$95$1, If[LessEqual[c, 1.3e-35], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -7.8 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 1.3 \cdot 10^{-35}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -7.79999999999999937e112 or 1.30000000000000002e-35 < c

    1. Initial program 66.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 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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot j + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. *-commutativeN/A

        \[\leadsto \left(j \cdot a + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, a, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      7. lower-neg.f6460.2

        \[\leadsto \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites60.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c} \]

    if -7.79999999999999937e112 < c < 1.30000000000000002e-35

    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 x around inf

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot \color{blue}{x} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot \color{blue}{x} \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      5. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      6. mul-1-negN/A

        \[\leadsto \left(y \cdot z + \left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(y \cdot z + -1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right) + y \cdot z\right) \cdot x \]
      9. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t + y \cdot z\right) \cdot x \]
      10. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x \]
      11. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right) \cdot x \]
      12. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t, y \cdot z\right) \cdot x \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
      14. lower-*.f6446.4

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    4. Applied rewrites46.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 27: 28.9% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+69}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-260}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= z -1.4e+69)
   (* (* z x) y)
   (if (<= z -3.3e-260)
     (* (* c a) j)
     (if (<= z 1.05e-184) (* (* i t) b) (* (* z y) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (z <= -1.4e+69) {
		tmp = (z * x) * y;
	} else if (z <= -3.3e-260) {
		tmp = (c * a) * j;
	} else if (z <= 1.05e-184) {
		tmp = (i * t) * b;
	} else {
		tmp = (z * y) * x;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (z <= (-1.4d+69)) then
        tmp = (z * x) * y
    else if (z <= (-3.3d-260)) then
        tmp = (c * a) * j
    else if (z <= 1.05d-184) then
        tmp = (i * t) * b
    else
        tmp = (z * y) * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (z <= -1.4e+69) {
		tmp = (z * x) * y;
	} else if (z <= -3.3e-260) {
		tmp = (c * a) * j;
	} else if (z <= 1.05e-184) {
		tmp = (i * t) * b;
	} else {
		tmp = (z * y) * x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if z <= -1.4e+69:
		tmp = (z * x) * y
	elif z <= -3.3e-260:
		tmp = (c * a) * j
	elif z <= 1.05e-184:
		tmp = (i * t) * b
	else:
		tmp = (z * y) * x
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (z <= -1.4e+69)
		tmp = Float64(Float64(z * x) * y);
	elseif (z <= -3.3e-260)
		tmp = Float64(Float64(c * a) * j);
	elseif (z <= 1.05e-184)
		tmp = Float64(Float64(i * t) * b);
	else
		tmp = Float64(Float64(z * y) * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (z <= -1.4e+69)
		tmp = (z * x) * y;
	elseif (z <= -3.3e-260)
		tmp = (c * a) * j;
	elseif (z <= 1.05e-184)
		tmp = (i * t) * b;
	else
		tmp = (z * y) * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.4e+69], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -3.3e-260], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 1.05e-184], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+69}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-260}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.39999999999999991e69

    1. Initial program 62.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-*.f6447.2

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites47.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6437.6

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    7. Applied rewrites37.6%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -1.39999999999999991e69 < z < -3.2999999999999997e-260

    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 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. *-commutativeN/A

        \[\leadsto \left(a \cdot c - y \cdot i\right) \cdot j \]
      6. *-commutativeN/A

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot c + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      8. mul-1-negN/A

        \[\leadsto \left(a \cdot c + \left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      9. associate-*r*N/A

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right) \cdot j \]
      11. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot y + a \cdot c\right) \cdot j \]
      13. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), y, a \cdot c\right) \cdot j \]
      14. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, y, a \cdot c\right) \cdot j \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
      16. lift-*.f6444.2

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
    4. Applied rewrites44.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, y, c \cdot a\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-*.f6425.4

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    7. Applied rewrites25.4%

      \[\leadsto \left(c \cdot a\right) \cdot j \]

    if -3.2999999999999997e-260 < z < 1.0499999999999999e-184

    1. Initial program 83.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 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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(i \cdot t + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6429.9

        \[\leadsto \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites29.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b} \]
    5. Taylor expanded in z around 0

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    6. Step-by-step derivation
      1. lift-*.f6427.7

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Applied rewrites27.7%

      \[\leadsto \left(i \cdot t\right) \cdot b \]

    if 1.0499999999999999e-184 < z

    1. Initial program 71.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 y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6441.9

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites41.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6427.3

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites27.3%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 28: 30.1% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-88}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -2e+22)
   (* (* (- a) t) x)
   (if (<= x 2.1e-88) (* (* j c) a) (* (* y x) z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2e+22) {
		tmp = (-a * t) * x;
	} else if (x <= 2.1e-88) {
		tmp = (j * c) * a;
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-2d+22)) then
        tmp = (-a * t) * x
    else if (x <= 2.1d-88) then
        tmp = (j * c) * a
    else
        tmp = (y * x) * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2e+22) {
		tmp = (-a * t) * x;
	} else if (x <= 2.1e-88) {
		tmp = (j * c) * a;
	} else {
		tmp = (y * x) * z;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -2e+22:
		tmp = (-a * t) * x
	elif x <= 2.1e-88:
		tmp = (j * c) * a
	else:
		tmp = (y * x) * z
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -2e+22)
		tmp = Float64(Float64(Float64(-a) * t) * x);
	elseif (x <= 2.1e-88)
		tmp = Float64(Float64(j * c) * a);
	else
		tmp = Float64(Float64(y * x) * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -2e+22)
		tmp = (-a * t) * x;
	elseif (x <= 2.1e-88)
		tmp = (j * c) * a;
	else
		tmp = (y * x) * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+22], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 2.1e-88], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{-88}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2e22

    1. Initial program 72.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 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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x + \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot i}\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, \color{blue}{x}, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      7. lower-*.f64N/A

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      8. lower-neg.f6447.1

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right) \]
    4. Applied rewrites47.1%

      \[\leadsto \color{blue}{\left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot \color{blue}{x}\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \left(\mathsf{neg}\left(a \cdot t\right)\right) \cdot x \]
      5. mul-1-negN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      6. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      7. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a \cdot t\right)\right) \cdot x \]
      8. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      9. lower-*.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      10. lift-neg.f6435.2

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    7. Applied rewrites35.2%

      \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot \color{blue}{x} \]

    if -2e22 < x < 2.1e-88

    1. Initial program 72.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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-*.f6433.5

        \[\leadsto \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a \]
    4. Applied rewrites33.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a} \]
    5. Taylor expanded in x around 0

      \[\leadsto \left(c \cdot j\right) \cdot a \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      2. lift-*.f6427.2

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    7. Applied rewrites27.2%

      \[\leadsto \left(j \cdot c\right) \cdot a \]

    if 2.1e-88 < x

    1. Initial program 76.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-*.f6442.9

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites42.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6430.2

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites30.2%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      2. lift-*.f64N/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto x \cdot \left(z \cdot \color{blue}{y}\right) \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \left(y \cdot z\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      6. lower-*.f64N/A

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      7. *-commutativeN/A

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6430.5

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    9. Applied rewrites30.5%

      \[\leadsto \left(y \cdot x\right) \cdot z \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 29: 28.5% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-61}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= z -2.9e-61)
   (* (* z x) y)
   (if (<= z 1.05e-184) (* (* i t) b) (* (* z y) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (z <= -2.9e-61) {
		tmp = (z * x) * y;
	} else if (z <= 1.05e-184) {
		tmp = (i * t) * b;
	} else {
		tmp = (z * y) * x;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (z <= (-2.9d-61)) then
        tmp = (z * x) * y
    else if (z <= 1.05d-184) then
        tmp = (i * t) * b
    else
        tmp = (z * y) * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (z <= -2.9e-61) {
		tmp = (z * x) * y;
	} else if (z <= 1.05e-184) {
		tmp = (i * t) * b;
	} else {
		tmp = (z * y) * x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if z <= -2.9e-61:
		tmp = (z * x) * y
	elif z <= 1.05e-184:
		tmp = (i * t) * b
	else:
		tmp = (z * y) * x
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (z <= -2.9e-61)
		tmp = Float64(Float64(z * x) * y);
	elseif (z <= 1.05e-184)
		tmp = Float64(Float64(i * t) * b);
	else
		tmp = Float64(Float64(z * y) * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (z <= -2.9e-61)
		tmp = (z * x) * y;
	elseif (z <= 1.05e-184)
		tmp = (i * t) * b;
	else
		tmp = (z * y) * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -2.9e-61], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.05e-184], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-61}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.8999999999999999e-61

    1. Initial program 67.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6443.6

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites43.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot x\right) \cdot y \]
      2. lift-*.f6431.2

        \[\leadsto \left(z \cdot x\right) \cdot y \]
    7. Applied rewrites31.2%

      \[\leadsto \left(z \cdot x\right) \cdot y \]

    if -2.8999999999999999e-61 < z < 1.0499999999999999e-184

    1. Initial program 82.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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(i \cdot t + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6431.1

        \[\leadsto \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites31.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b} \]
    5. Taylor expanded in z around 0

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    6. Step-by-step derivation
      1. lift-*.f6427.5

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Applied rewrites27.5%

      \[\leadsto \left(i \cdot t\right) \cdot b \]

    if 1.0499999999999999e-184 < z

    1. Initial program 71.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 y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6441.9

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites41.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6427.3

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites27.3%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 30: 28.6% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\ \;\;\;\;\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 (* (* z y) x)))
   (if (<= z -2.9e-61) t_1 (if (<= z 1.05e-184) (* (* 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 = (z * y) * x;
	double tmp;
	if (z <= -2.9e-61) {
		tmp = t_1;
	} else if (z <= 1.05e-184) {
		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 = (z * y) * x
    if (z <= (-2.9d-61)) then
        tmp = t_1
    else if (z <= 1.05d-184) 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 = (z * y) * x;
	double tmp;
	if (z <= -2.9e-61) {
		tmp = t_1;
	} else if (z <= 1.05e-184) {
		tmp = (i * t) * b;
	} 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 z <= -2.9e-61:
		tmp = t_1
	elif z <= 1.05e-184:
		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(z * y) * x)
	tmp = 0.0
	if (z <= -2.9e-61)
		tmp = t_1;
	elseif (z <= 1.05e-184)
		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 = (z * y) * x;
	tmp = 0.0;
	if (z <= -2.9e-61)
		tmp = t_1;
	elseif (z <= 1.05e-184)
		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[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.9e-61], t$95$1, If[LessEqual[z, 1.05e-184], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8999999999999999e-61 or 1.0499999999999999e-184 < z

    1. Initial program 69.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 y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6442.6

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites42.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6429.1

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites29.1%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]

    if -2.8999999999999999e-61 < z < 1.0499999999999999e-184

    1. Initial program 82.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. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(i \cdot t + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(-1 \cdot c\right) \cdot z\right) \cdot b \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6431.1

        \[\leadsto \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites31.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b} \]
    5. Taylor expanded in z around 0

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    6. Step-by-step derivation
      1. lift-*.f6427.5

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Applied rewrites27.5%

      \[\leadsto \left(i \cdot t\right) \cdot b \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 31: 22.6% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \left(y \cdot x\right) \cdot z \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* (* y x) z))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (y * x) * z;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = (y * x) * z
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (y * x) * z;
}
def code(x, y, z, t, a, b, c, i, j):
	return (y * x) * z
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(y * x) * z)
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = (y * x) * z;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]
\begin{array}{l}

\\
\left(y \cdot x\right) \cdot z
\end{array}
Derivation
  1. Initial program 73.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 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-*.f6439.5

      \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
  4. Applied rewrites39.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
  5. Taylor expanded in x around inf

    \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(y \cdot z\right) \cdot x \]
    2. lower-*.f64N/A

      \[\leadsto \left(y \cdot z\right) \cdot x \]
    3. *-commutativeN/A

      \[\leadsto \left(z \cdot y\right) \cdot x \]
    4. lift-*.f6422.8

      \[\leadsto \left(z \cdot y\right) \cdot x \]
  7. Applied rewrites22.8%

    \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]
  8. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \left(z \cdot y\right) \cdot x \]
    2. lift-*.f64N/A

      \[\leadsto \left(z \cdot y\right) \cdot x \]
    3. *-commutativeN/A

      \[\leadsto x \cdot \left(z \cdot \color{blue}{y}\right) \]
    4. *-commutativeN/A

      \[\leadsto x \cdot \left(y \cdot z\right) \]
    5. associate-*r*N/A

      \[\leadsto \left(x \cdot y\right) \cdot z \]
    6. lower-*.f64N/A

      \[\leadsto \left(x \cdot y\right) \cdot z \]
    7. *-commutativeN/A

      \[\leadsto \left(y \cdot x\right) \cdot z \]
    8. lower-*.f6422.6

      \[\leadsto \left(y \cdot x\right) \cdot z \]
  9. Applied rewrites22.6%

    \[\leadsto \left(y \cdot x\right) \cdot z \]
  10. Add Preprocessing

Developer Target 1: 59.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\ \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\ \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* j (- (* c a) (* y i))))
        (t_2
         (+
          (-
           (* x (- (* y z) (* t a)))
           (/
            (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
            (+ (* c z) (* t i))))
          t_1)))
   (if (< x -1.469694296777705e-64)
     t_2
     (if (< x 3.2113527362226803e-147)
       (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = j * ((c * a) - (y * i));
	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
	double tmp;
	if (x < -1.469694296777705e-64) {
		tmp = t_2;
	} else if (x < 3.2113527362226803e-147) {
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = j * ((c * a) - (y * i))
    t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
    if (x < (-1.469694296777705d-64)) then
        tmp = t_2
    else if (x < 3.2113527362226803d-147) then
        tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = j * ((c * a) - (y * i));
	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
	double tmp;
	if (x < -1.469694296777705e-64) {
		tmp = t_2;
	} else if (x < 3.2113527362226803e-147) {
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = j * ((c * a) - (y * i))
	t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1
	tmp = 0
	if x < -1.469694296777705e-64:
		tmp = t_2
	elif x < 3.2113527362226803e-147:
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i)))
	t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1)
	tmp = 0.0
	if (x < -1.469694296777705e-64)
		tmp = t_2;
	elseif (x < 3.2113527362226803e-147)
		tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = j * ((c * a) - (y * i));
	t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1;
	tmp = 0.0;
	if (x < -1.469694296777705e-64)
		tmp = t_2;
	elseif (x < 3.2113527362226803e-147)
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025093 
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))