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

Percentage Accurate: 74.3% → 83.2%
Time: 8.9s
Alternatives: 18
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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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: 74.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 83.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\ \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 (- t) x (* j c)) a))))
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(-t, x, (j * c)) * a;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a);
	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[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $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(-t, x, j \cdot c\right) \cdot a\\


\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 89.2%

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

    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. Add Preprocessing
    3. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-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-*.f6454.7

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

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

Alternative 2: 61.3% accurate, 0.9× 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 -2.9 \cdot 10^{+108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-86}:\\ \;\;\;\;\left(-c\right) \cdot \left(\mathsf{fma}\left(t, \frac{x}{c}, -j\right) \cdot a\right) - \left(c \cdot z\right) \cdot b\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{-226}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+185}:\\ \;\;\;\;\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}:\\ \;\;\;\;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 -2.9e+108)
     t_1
     (if (<= b -2.9e-86)
       (- (* (- c) (* (fma t (/ x c) (- j)) a)) (* (* c z) b))
       (if (<= b -1.2e-226)
         (+ (* (* z y) x) (* j (- (* c a) (* y i))))
         (if (<= b 2.3e+185)
           (- (fma (fma (- a) t (* z y)) x (* (* j c) a)) (* (* c b) z))
           t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(i, t, (-c * z)) * b;
	double tmp;
	if (b <= -2.9e+108) {
		tmp = t_1;
	} else if (b <= -2.9e-86) {
		tmp = (-c * (fma(t, (x / c), -j) * a)) - ((c * z) * b);
	} else if (b <= -1.2e-226) {
		tmp = ((z * y) * x) + (j * ((c * a) - (y * i)));
	} else if (b <= 2.3e+185) {
		tmp = fma(fma(-a, t, (z * y)), x, ((j * c) * a)) - ((c * b) * z);
	} 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 <= -2.9e+108)
		tmp = t_1;
	elseif (b <= -2.9e-86)
		tmp = Float64(Float64(Float64(-c) * Float64(fma(t, Float64(x / c), Float64(-j)) * a)) - Float64(Float64(c * z) * b));
	elseif (b <= -1.2e-226)
		tmp = Float64(Float64(Float64(z * y) * x) + Float64(j * Float64(Float64(c * a) - Float64(y * i))));
	elseif (b <= 2.3e+185)
		tmp = Float64(fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(j * c) * a)) - Float64(Float64(c * b) * z));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.9e+108], t$95$1, If[LessEqual[b, -2.9e-86], N[(N[((-c) * N[(N[(t * N[(x / c), $MachinePrecision] + (-j)), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.2e-226], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+185], 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], 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 -2.9 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+185}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.90000000000000007e108 or 2.3000000000000001e185 < b

    1. Initial program 77.2%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. 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.f6483.6

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

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

    if -2.90000000000000007e108 < b < -2.8999999999999999e-86

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - t \cdot i\right) \cdot \color{blue}{b} \]
    5. Applied rewrites55.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-c\right) \cdot \mathsf{fma}\left(-a, j, \frac{\left(t \cdot x\right) \cdot a}{c}\right) - \mathsf{fma}\left(-i, t, c \cdot z\right) \cdot b \]
      12. lift-*.f6457.6

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

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

      \[\leadsto \left(-c\right) \cdot \mathsf{fma}\left(-a, j, \frac{\left(t \cdot x\right) \cdot a}{c}\right) - \left(c \cdot z\right) \cdot b \]
    10. Step-by-step derivation
      1. lift-*.f6451.7

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-c\right) \cdot \left(\mathsf{fma}\left(t, \frac{x}{c}, \mathsf{neg}\left(j\right)\right) \cdot a\right) - \left(c \cdot z\right) \cdot b \]
      8. lower-neg.f6456.2

        \[\leadsto \left(-c\right) \cdot \left(\mathsf{fma}\left(t, \frac{x}{c}, -j\right) \cdot a\right) - \left(c \cdot z\right) \cdot b \]
    14. Applied rewrites56.2%

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

    if -2.8999999999999999e-86 < b < -1.2e-226

    1. Initial program 89.3%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
    4. 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-*.f6482.9

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

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

    if -1.2e-226 < b < 2.3000000000000001e185

    1. Initial program 67.9%

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

      \[\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} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 3: 61.8% accurate, 0.9× 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 -2.45 \cdot 10^{+92}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-17}:\\ \;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a - \left(c \cdot z\right) \cdot b\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{-226}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+185}:\\ \;\;\;\;\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}:\\ \;\;\;\;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 -2.45e+92)
     t_1
     (if (<= b -3e-17)
       (- (* (fma (- t) x (* j c)) a) (* (* c z) b))
       (if (<= b -1.2e-226)
         (+ (* (* z y) x) (* j (- (* c a) (* y i))))
         (if (<= b 2.3e+185)
           (- (fma (fma (- a) t (* z y)) x (* (* j c) a)) (* (* c b) z))
           t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = fma(i, t, (-c * z)) * b;
	double tmp;
	if (b <= -2.45e+92) {
		tmp = t_1;
	} else if (b <= -3e-17) {
		tmp = (fma(-t, x, (j * c)) * a) - ((c * z) * b);
	} else if (b <= -1.2e-226) {
		tmp = ((z * y) * x) + (j * ((c * a) - (y * i)));
	} else if (b <= 2.3e+185) {
		tmp = fma(fma(-a, t, (z * y)), x, ((j * c) * a)) - ((c * b) * z);
	} 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 <= -2.45e+92)
		tmp = t_1;
	elseif (b <= -3e-17)
		tmp = Float64(Float64(fma(Float64(-t), x, Float64(j * c)) * a) - Float64(Float64(c * z) * b));
	elseif (b <= -1.2e-226)
		tmp = Float64(Float64(Float64(z * y) * x) + Float64(j * Float64(Float64(c * a) - Float64(y * i))));
	elseif (b <= 2.3e+185)
		tmp = Float64(fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(j * c) * a)) - Float64(Float64(c * b) * z));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.45e+92], t$95$1, If[LessEqual[b, -3e-17], N[(N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] - N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.2e-226], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+185], 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], 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 -2.45 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+185}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.4500000000000001e92 or 2.3000000000000001e185 < b

    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-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.f6482.9

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

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

    if -2.4500000000000001e92 < b < -3.00000000000000006e-17

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - t \cdot i\right) \cdot \color{blue}{b} \]
    5. Applied rewrites61.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-c\right) \cdot \mathsf{fma}\left(-a, j, \frac{\left(t \cdot x\right) \cdot a}{c}\right) - \mathsf{fma}\left(-i, t, c \cdot z\right) \cdot b \]
      12. lift-*.f6461.0

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

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

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

        \[\leadsto \left(-c\right) \cdot \mathsf{fma}\left(-a, j, \frac{\left(t \cdot x\right) \cdot a}{c}\right) - \left(c \cdot z\right) \cdot b \]
    11. Applied rewrites53.8%

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

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

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

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

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

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

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

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

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

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

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

    if -3.00000000000000006e-17 < b < -1.2e-226

    1. Initial program 80.7%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
    4. Step-by-step derivation
      1. *-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-*.f6470.5

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

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

    if -1.2e-226 < b < 2.3000000000000001e185

    1. Initial program 67.9%

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

      \[\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} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 4: 58.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot z\right) \cdot b\\ t_2 := \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\ \mathbf{if}\;b \leq -2.45 \cdot 10^{+92}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-17}:\\ \;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a - t\_1\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-183}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+185}:\\ \;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - 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 (* (* c z) b)) (t_2 (* (fma i t (* (- c) z)) b)))
   (if (<= b -2.45e+92)
     t_2
     (if (<= b -3e-17)
       (- (* (fma (- t) x (* j c)) a) t_1)
       (if (<= b 1.7e-183)
         (+ (* (* z y) x) (* j (- (* c a) (* y i))))
         (if (<= b 2.3e+185)
           (- (fma (- a) (* t x) (* (* j c) a)) 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 = (c * z) * b;
	double t_2 = fma(i, t, (-c * z)) * b;
	double tmp;
	if (b <= -2.45e+92) {
		tmp = t_2;
	} else if (b <= -3e-17) {
		tmp = (fma(-t, x, (j * c)) * a) - t_1;
	} else if (b <= 1.7e-183) {
		tmp = ((z * y) * x) + (j * ((c * a) - (y * i)));
	} else if (b <= 2.3e+185) {
		tmp = fma(-a, (t * x), ((j * c) * a)) - t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * z) * b)
	t_2 = Float64(fma(i, t, Float64(Float64(-c) * z)) * b)
	tmp = 0.0
	if (b <= -2.45e+92)
		tmp = t_2;
	elseif (b <= -3e-17)
		tmp = Float64(Float64(fma(Float64(-t), x, Float64(j * c)) * a) - t_1);
	elseif (b <= 1.7e-183)
		tmp = Float64(Float64(Float64(z * y) * x) + Float64(j * Float64(Float64(c * a) - Float64(y * i))));
	elseif (b <= 2.3e+185)
		tmp = Float64(fma(Float64(-a), Float64(t * x), Float64(Float64(j * c) * a)) - t_1);
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.45e+92], t$95$2, If[LessEqual[b, -3e-17], N[(N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[b, 1.7e-183], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+185], N[(N[((-a) * N[(t * x), $MachinePrecision] + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+185}:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.4500000000000001e92 or 2.3000000000000001e185 < b

    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-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.f6482.9

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

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

    if -2.4500000000000001e92 < b < -3.00000000000000006e-17

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - t \cdot i\right) \cdot \color{blue}{b} \]
    5. Applied rewrites61.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-c\right) \cdot \mathsf{fma}\left(-a, j, \frac{\left(t \cdot x\right) \cdot a}{c}\right) - \mathsf{fma}\left(-i, t, c \cdot z\right) \cdot b \]
      12. lift-*.f6461.0

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

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

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

        \[\leadsto \left(-c\right) \cdot \mathsf{fma}\left(-a, j, \frac{\left(t \cdot x\right) \cdot a}{c}\right) - \left(c \cdot z\right) \cdot b \]
    11. Applied rewrites53.8%

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

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

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

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

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

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

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

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

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

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

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

    if -3.00000000000000006e-17 < b < 1.70000000000000007e-183

    1. Initial program 67.7%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
    4. Step-by-step derivation
      1. *-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-*.f6465.7

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

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

    if 1.70000000000000007e-183 < b < 2.3000000000000001e185

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - t \cdot i\right) \cdot \color{blue}{b} \]
    5. Applied rewrites71.3%

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

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

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

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

Alternative 5: 66.7% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.2e75 or 2.4999999999999998e130 < y

    1. Initial program 61.0%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-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-*.f6472.2

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

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

    if -7.2e75 < y < 1.7e-34

    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. Add Preprocessing
    3. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7e-34 < y < 2.4999999999999998e130

    1. Initial program 88.4%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
    4. Step-by-step derivation
      1. *-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-*.f6471.8

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

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

Alternative 6: 58.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a - \left(c \cdot z\right) \cdot b\\ t_2 := \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\ \mathbf{if}\;b \leq -2.45 \cdot 10^{+92}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-184}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+185}:\\ \;\;\;\;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 (- t) x (* j c)) a) (* (* c z) b)))
        (t_2 (* (fma i t (* (- c) z)) b)))
   (if (<= b -2.45e+92)
     t_2
     (if (<= b -3e-17)
       t_1
       (if (<= b 5e-184)
         (+ (* (* z y) x) (* j (- (* c a) (* y i))))
         (if (<= b 2.3e+185) 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(-t, x, (j * c)) * a) - ((c * z) * b);
	double t_2 = fma(i, t, (-c * z)) * b;
	double tmp;
	if (b <= -2.45e+92) {
		tmp = t_2;
	} else if (b <= -3e-17) {
		tmp = t_1;
	} else if (b <= 5e-184) {
		tmp = ((z * y) * x) + (j * ((c * a) - (y * i)));
	} else if (b <= 2.3e+185) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(fma(Float64(-t), x, Float64(j * c)) * a) - Float64(Float64(c * z) * b))
	t_2 = Float64(fma(i, t, Float64(Float64(-c) * z)) * b)
	tmp = 0.0
	if (b <= -2.45e+92)
		tmp = t_2;
	elseif (b <= -3e-17)
		tmp = t_1;
	elseif (b <= 5e-184)
		tmp = Float64(Float64(Float64(z * y) * x) + Float64(j * Float64(Float64(c * a) - Float64(y * i))));
	elseif (b <= 2.3e+185)
		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[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] - N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.45e+92], t$95$2, If[LessEqual[b, -3e-17], t$95$1, If[LessEqual[b, 5e-184], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e+185], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -3 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.4500000000000001e92 or 2.3000000000000001e185 < b

    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-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.f6482.9

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

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

    if -2.4500000000000001e92 < b < -3.00000000000000006e-17 or 5.00000000000000003e-184 < b < 2.3000000000000001e185

    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. Add Preprocessing
    3. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-c\right) \cdot \mathsf{fma}\left(-a, j, \frac{\left(t \cdot x\right) \cdot a}{c}\right) - \left(c \cdot z\right) \cdot b \]
    10. Step-by-step derivation
      1. lift-*.f6456.4

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a - \left(c \cdot z\right) \cdot b \]
      8. lift-*.f6459.6

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

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

    if -3.00000000000000006e-17 < b < 5.00000000000000003e-184

    1. Initial program 67.7%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
    4. Step-by-step derivation
      1. *-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-*.f6465.7

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

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

Alternative 7: 58.2% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+35}:\\
\;\;\;\;\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 y < -2.0499999999999999e76 or 6.39999999999999965e35 < y

    1. Initial program 66.9%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. 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-*.f6469.9

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

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

    if -2.0499999999999999e76 < y < 2.8e-105

    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. Add Preprocessing
    3. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - t \cdot i\right) \cdot \color{blue}{b} \]
    5. Applied rewrites71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-c\right) \cdot \mathsf{fma}\left(-a, j, \frac{\left(t \cdot x\right) \cdot a}{c}\right) - \left(c \cdot z\right) \cdot b \]
    11. Applied rewrites60.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a - \left(c \cdot z\right) \cdot b \]
      8. lift-*.f6461.6

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

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

    if 2.8e-105 < y < 6.39999999999999965e35

    1. Initial program 75.2%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. 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.f6465.5

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.19999999999999998e90 or 1.05e38 < b

    1. Initial program 76.8%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. 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.f6472.9

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

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

    if -3.19999999999999998e90 < b < -8.60000000000000054e-203

    1. Initial program 71.2%

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

      \[\leadsto \color{blue}{j \cdot \left(a \cdot c - i \cdot y\right)} \]
    4. 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-*.f6451.5

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

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

    if -8.60000000000000054e-203 < b < -1.2e-285

    1. Initial program 77.6%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right)} \]
    4. Step-by-step derivation
      1. *-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-*.f6469.5

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

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

    if -1.2e-285 < b < 1.05e38

    1. Initial program 62.2%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-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-*.f6455.2

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

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

Alternative 9: 41.7% accurate, 1.4× 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 -9 \cdot 10^{-20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -3.7 \cdot 10^{-179}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{-297}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{+36}:\\ \;\;\;\;\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 i t (* (- c) z)) b)))
   (if (<= b -9e-20)
     t_1
     (if (<= b -3.7e-179)
       (* (- i) (* j y))
       (if (<= b 2.25e-297)
         (* (* z x) y)
         (if (<= b 7.2e+36) (* (- 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(i, t, (-c * z)) * b;
	double tmp;
	if (b <= -9e-20) {
		tmp = t_1;
	} else if (b <= -3.7e-179) {
		tmp = -i * (j * y);
	} else if (b <= 2.25e-297) {
		tmp = (z * x) * y;
	} else if (b <= 7.2e+36) {
		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(i, t, Float64(Float64(-c) * z)) * b)
	tmp = 0.0
	if (b <= -9e-20)
		tmp = t_1;
	elseif (b <= -3.7e-179)
		tmp = Float64(Float64(-i) * Float64(j * y));
	elseif (b <= 2.25e-297)
		tmp = Float64(Float64(z * x) * y);
	elseif (b <= 7.2e+36)
		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[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -9e-20], t$95$1, If[LessEqual[b, -3.7e-179], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.25e-297], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 7.2e+36], N[((-t) * N[(a * x), $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 -9 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.0000000000000003e-20 or 7.1999999999999995e36 < b

    1. Initial program 73.7%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. 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.f6465.5

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

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

    if -9.0000000000000003e-20 < b < -3.6999999999999999e-179

    1. Initial program 74.9%

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

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - b \cdot t\right)\right)} \]
    4. 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.f6448.4

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

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

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

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

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

    if -3.6999999999999999e-179 < b < 2.24999999999999988e-297

    1. Initial program 74.4%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. 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-*.f6459.3

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

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

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

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

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

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

    if 2.24999999999999988e-297 < b < 7.1999999999999995e36

    1. Initial program 64.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
    4. 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.f6444.7

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

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

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

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

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

Alternative 10: 51.7% accurate, 1.6× 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^{+90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -8.6 \cdot 10^{-203}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{elif}\;b \leq 10^{+38}:\\ \;\;\;\;\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 i t (* (- c) z)) b)))
   (if (<= b -3.2e+90)
     t_1
     (if (<= b -8.6e-203)
       (* (fma (- i) y (* c a)) j)
       (if (<= b 1e+38) (* (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(i, t, (-c * z)) * b;
	double tmp;
	if (b <= -3.2e+90) {
		tmp = t_1;
	} else if (b <= -8.6e-203) {
		tmp = fma(-i, y, (c * a)) * j;
	} else if (b <= 1e+38) {
		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(i, t, Float64(Float64(-c) * z)) * b)
	tmp = 0.0
	if (b <= -3.2e+90)
		tmp = t_1;
	elseif (b <= -8.6e-203)
		tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j);
	elseif (b <= 1e+38)
		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[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -3.2e+90], t$95$1, If[LessEqual[b, -8.6e-203], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[b, 1e+38], 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(i, t, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 10^{+38}:\\
\;\;\;\;\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 b < -3.19999999999999998e90 or 9.99999999999999977e37 < b

    1. Initial program 76.8%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. 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.f6472.9

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

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

    if -3.19999999999999998e90 < b < -8.60000000000000054e-203

    1. Initial program 71.2%

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

      \[\leadsto \color{blue}{j \cdot \left(a \cdot c - i \cdot y\right)} \]
    4. 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-*.f6451.5

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

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

    if -8.60000000000000054e-203 < b < 9.99999999999999977e37

    1. Initial program 66.1%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right)} \]
    4. 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-*.f6454.1

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

      \[\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 11: 52.0% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+35}:\\
\;\;\;\;\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 y < -1.4500000000000001e116 or 6.39999999999999965e35 < y

    1. Initial program 69.2%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-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-*.f6471.2

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

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

    if -1.4500000000000001e116 < y < -7.50000000000000034e-237

    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. Add Preprocessing
    3. Taylor expanded in c around inf

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

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

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

    if -7.50000000000000034e-237 < y < 6.39999999999999965e35

    1. Initial program 73.0%

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

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

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

      \[\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 12: 51.8% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -70000000 \lor \neg \left(b \leq 10^{+38}\right):\\
\;\;\;\;\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7e7 or 9.99999999999999977e37 < b

    1. Initial program 75.0%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-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.f6468.5

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

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

    if -7e7 < b < 9.99999999999999977e37

    1. Initial program 68.8%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right)} \]
    4. 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-*.f6449.0

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

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

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

Alternative 13: 45.8% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -1.65 \cdot 10^{+63} \lor \neg \left(j \leq 2.25 \cdot 10^{-39}\right):\\ \;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= j -1.65e+63) (not (<= j 2.25e-39)))
   (* (fma j a (* (- b) z)) c)
   (* (fma i t (* (- c) z)) b)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((j <= -1.65e+63) || !(j <= 2.25e-39)) {
		tmp = fma(j, a, (-b * z)) * c;
	} else {
		tmp = fma(i, t, (-c * z)) * b;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((j <= -1.65e+63) || !(j <= 2.25e-39))
		tmp = Float64(fma(j, a, Float64(Float64(-b) * z)) * c);
	else
		tmp = Float64(fma(i, t, Float64(Float64(-c) * z)) * b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[j, -1.65e+63], N[Not[LessEqual[j, 2.25e-39]], $MachinePrecision]], N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.65 \cdot 10^{+63} \lor \neg \left(j \leq 2.25 \cdot 10^{-39}\right):\\
\;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.6500000000000001e63 or 2.25e-39 < j

    1. Initial program 68.9%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    4. 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.f6453.2

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

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

    if -1.6500000000000001e63 < j < 2.25e-39

    1. Initial program 74.2%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. 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.f6451.7

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

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

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

Alternative 14: 28.8% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -9.5 \cdot 10^{+159}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;c \leq -3.05 \cdot 10^{-298}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;c \leq 3.1 \cdot 10^{-105}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= c -9.5e+159)
   (* (* (- c) z) b)
   (if (<= c -3.05e-298)
     (* (* (- a) t) x)
     (if (<= c 3.1e-105) (* (* i t) b) (* (* 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 (c <= -9.5e+159) {
		tmp = (-c * z) * b;
	} else if (c <= -3.05e-298) {
		tmp = (-a * t) * x;
	} else if (c <= 3.1e-105) {
		tmp = (i * t) * b;
	} else {
		tmp = (c * a) * j;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -9.5 \cdot 10^{+159}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\

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

\mathbf{elif}\;c \leq 3.1 \cdot 10^{-105}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -9.5000000000000003e159

    1. Initial program 58.9%

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(c \cdot z\right)\right) \cdot b \]
    7. 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.f6471.3

        \[\leadsto \left(\left(-c\right) \cdot z\right) \cdot b \]
    8. Applied rewrites71.3%

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

    if -9.5000000000000003e159 < c < -3.05000000000000006e-298

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - t \cdot i\right) \cdot \color{blue}{b} \]
    5. Applied rewrites60.9%

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

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    7. 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. mul-1-negN/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      5. associate-*r*N/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. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      8. mul-1-negN/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.f6438.4

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

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

    if -3.05000000000000006e-298 < c < 3.10000000000000014e-105

    1. Initial program 82.1%

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

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

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

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

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Step-by-step derivation
      1. lift-*.f6433.9

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    8. Applied rewrites33.9%

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

    if 3.10000000000000014e-105 < c

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - t \cdot i\right) \cdot \color{blue}{b} \]
    5. Applied rewrites60.8%

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

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

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

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

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      4. lift-*.f6432.0

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    8. Applied rewrites32.0%

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

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

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

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

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

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

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

        \[\leadsto \left(c \cdot a\right) \cdot j \]
      8. lower-*.f6434.2

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    10. Applied rewrites34.2%

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

Alternative 15: 28.4% accurate, 2.1× speedup?

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

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

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

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

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

\mathbf{elif}\;c \leq 3.1 \cdot 10^{-105}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.09999999999999995e197 or 3.10000000000000014e-105 < c

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      4. lift-*.f6433.1

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    8. Applied rewrites33.1%

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

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

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

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

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

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

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

        \[\leadsto \left(c \cdot a\right) \cdot j \]
      8. lower-*.f6438.8

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

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

    if -1.09999999999999995e197 < c < -3.05000000000000006e-298

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - t \cdot i\right) \cdot \color{blue}{b} \]
    5. Applied rewrites59.6%

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

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    7. 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. mul-1-negN/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      5. associate-*r*N/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. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      8. mul-1-negN/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.f6438.8

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

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

    if -3.05000000000000006e-298 < c < 3.10000000000000014e-105

    1. Initial program 82.1%

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

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

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

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

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Step-by-step derivation
      1. lift-*.f6433.9

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    8. Applied rewrites33.9%

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

Alternative 16: 28.9% accurate, 2.6× speedup?

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

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if ((j <= (-1.65d+63)) .or. (.not. (j <= 2.6d-36))) then
        tmp = (c * a) * j
    else
        tmp = (i * t) * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((j <= -1.65e+63) || !(j <= 2.6e-36)) {
		tmp = (c * a) * j;
	} else {
		tmp = (i * t) * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if (j <= -1.65e+63) or not (j <= 2.6e-36):
		tmp = (c * a) * j
	else:
		tmp = (i * t) * b
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((j <= -1.65e+63) || !(j <= 2.6e-36))
		tmp = Float64(Float64(c * a) * j);
	else
		tmp = Float64(Float64(i * t) * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if ((j <= -1.65e+63) || ~((j <= 2.6e-36)))
		tmp = (c * a) * j;
	else
		tmp = (i * t) * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[j, -1.65e+63], N[Not[LessEqual[j, 2.6e-36]], $MachinePrecision]], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.65 \cdot 10^{+63} \lor \neg \left(j \leq 2.6 \cdot 10^{-36}\right):\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.6500000000000001e63 or 2.6e-36 < j

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      4. lift-*.f6435.9

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    8. Applied rewrites35.9%

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

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

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

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

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

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

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

        \[\leadsto \left(c \cdot a\right) \cdot j \]
      8. lower-*.f6439.2

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    10. Applied rewrites39.2%

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

    if -1.6500000000000001e63 < j < 2.6e-36

    1. Initial program 74.2%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. 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.f6451.7

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

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

      \[\leadsto \left(i \cdot t\right) \cdot b \]
    7. Step-by-step derivation
      1. lift-*.f6431.8

        \[\leadsto \left(i \cdot t\right) \cdot b \]
    8. Applied rewrites31.8%

      \[\leadsto \left(i \cdot t\right) \cdot b \]
  3. Recombined 2 regimes into one program.
  4. Final simplification35.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.65 \cdot 10^{+63} \lor \neg \left(j \leq 2.6 \cdot 10^{-36}\right):\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 29.4% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+25} \lor \neg \left(y \leq 6.5 \cdot 10^{-27}\right):\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= y -4e+25) (not (<= y 6.5e-27))) (* (* z y) x) (* (* 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 ((y <= -4e+25) || !(y <= 6.5e-27)) {
		tmp = (z * y) * x;
	} else {
		tmp = (c * a) * j;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if ((y <= (-4d+25)) .or. (.not. (y <= 6.5d-27))) then
        tmp = (z * y) * x
    else
        tmp = (c * a) * j
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((y <= -4e+25) || !(y <= 6.5e-27)) {
		tmp = (z * y) * x;
	} else {
		tmp = (c * a) * j;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if (y <= -4e+25) or not (y <= 6.5e-27):
		tmp = (z * y) * x
	else:
		tmp = (c * a) * j
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((y <= -4e+25) || !(y <= 6.5e-27))
		tmp = Float64(Float64(z * y) * x);
	else
		tmp = Float64(Float64(c * a) * j);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if ((y <= -4e+25) || ~((y <= 6.5e-27)))
		tmp = (z * y) * x;
	else
		tmp = (c * a) * j;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[y, -4e+25], N[Not[LessEqual[y, 6.5e-27]], $MachinePrecision]], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+25} \lor \neg \left(y \leq 6.5 \cdot 10^{-27}\right):\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.00000000000000036e25 or 6.50000000000000025e-27 < y

    1. Initial program 68.5%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-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-*.f6461.3

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    8. Applied rewrites35.4%

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

    if -4.00000000000000036e25 < y < 6.50000000000000025e-27

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      4. lift-*.f6426.7

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

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

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

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

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

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

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

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

        \[\leadsto \left(c \cdot a\right) \cdot j \]
      8. lower-*.f6430.8

        \[\leadsto \left(c \cdot a\right) \cdot j \]
    10. Applied rewrites30.8%

      \[\leadsto \left(c \cdot a\right) \cdot j \]
  3. Recombined 2 regimes into one program.
  4. Final simplification32.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+25} \lor \neg \left(y \leq 6.5 \cdot 10^{-27}\right):\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot a\right) \cdot j\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 21.9% accurate, 5.5× speedup?

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

\\
\left(z \cdot y\right) \cdot x
\end{array}
Derivation
  1. Initial program 71.8%

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

    \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
  4. Step-by-step derivation
    1. *-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.5

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

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

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

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

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

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

      \[\leadsto \left(z \cdot y\right) \cdot x \]
  8. Applied rewrites20.8%

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

Developer Target 1: 60.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 2025064 
(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)))))