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

Percentage Accurate: 73.8% → 85.9%
Time: 22.4s
Alternatives: 25
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
  (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    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 25 alternatives:

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

Initial Program: 73.8% 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)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    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: 85.9% accurate, 0.4× speedup?

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

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


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

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

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

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

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

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

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

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

Alternative 2: 83.8% 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(t \cdot i - z \cdot c\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(c, -b, x \cdot y\right), i \cdot \left(t \cdot b - y \cdot j\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1
         (+
          (+ (* x (- (* y z) (* t a))) (* b (- (* t i) (* z c))))
          (* j (- (* a c) (* y i))))))
   (if (<= t_1 INFINITY)
     t_1
     (fma z (fma c (- b) (* x y)) (* i (- (* t b) (* y j)))))))
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 * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i)));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = fma(z, fma(c, -b, (x * y)), (i * ((t * b) - (y * j))));
	}
	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(t * i) - Float64(z * c)))) + Float64(j * Float64(Float64(a * c) - Float64(y * i))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = fma(z, fma(c, Float64(-b), Float64(x * y)), Float64(i * Float64(Float64(t * b) - Float64(y * j))));
	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[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(c * (-b) + N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(i * N[(N[(t * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \left(\mathsf{neg}\left(\color{blue}{c \cdot b}\right)\right) + x \cdot y, i \cdot \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(z, c \cdot \color{blue}{\left(-1 \cdot b\right)} + x \cdot y, i \cdot \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right)\right) \]
      12. accelerator-lowering-fma.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(c, \mathsf{neg}\left(b\right), x \cdot y\right), i \cdot \color{blue}{\left(b \cdot t + -1 \cdot \left(j \cdot y\right)\right)}\right) \]
    7. Simplified64.0%

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

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

Alternative 3: 79.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 93.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 i around 0

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \left(\mathsf{neg}\left(\color{blue}{c \cdot b}\right)\right) + x \cdot y, i \cdot \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(z, c \cdot \color{blue}{\left(-1 \cdot b\right)} + x \cdot y, i \cdot \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right)\right) \]
      12. accelerator-lowering-fma.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(c, \mathsf{neg}\left(b\right), x \cdot y\right), i \cdot \color{blue}{\left(b \cdot t + -1 \cdot \left(j \cdot y\right)\right)}\right) \]
    7. Simplified64.0%

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

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

Alternative 4: 71.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.8000000000000002e-24 or 2.4e118 < a

    1. Initial program 55.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 i around 0

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, t, \color{blue}{-1 \cdot \left(c \cdot j + \frac{z \cdot \left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)}{a}\right)}\right) \cdot \left(\mathsf{neg}\left(a\right)\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(x, t, \color{blue}{\mathsf{neg}\left(\left(c \cdot j + \frac{z \cdot \left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)}{a}\right)\right)}\right) \cdot \left(\mathsf{neg}\left(a\right)\right) \]
      3. accelerator-lowering-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(x, t, \mathsf{neg}\left(\mathsf{fma}\left(c, j, \frac{z \cdot \left(\color{blue}{\left(\mathsf{neg}\left(b \cdot c\right)\right)} + x \cdot y\right)}{a}\right)\right)\right) \cdot \left(\mathsf{neg}\left(a\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(x, t, \mathsf{neg}\left(\mathsf{fma}\left(c, j, \frac{z \cdot \left(b \cdot \color{blue}{\left(-1 \cdot c\right)} + x \cdot y\right)}{a}\right)\right)\right) \cdot \left(\mathsf{neg}\left(a\right)\right) \]
      9. accelerator-lowering-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(x, t, \mathsf{neg}\left(\mathsf{fma}\left(c, j, \frac{z \cdot \mathsf{fma}\left(b, \mathsf{neg}\left(c\right), \color{blue}{y \cdot x}\right)}{a}\right)\right)\right) \cdot \left(\mathsf{neg}\left(a\right)\right) \]
      13. *-lowering-*.f6477.9

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

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

    if -9.8000000000000002e-24 < a < 2.4e118

    1. Initial program 79.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 i around 0

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \left(\mathsf{neg}\left(\color{blue}{c \cdot b}\right)\right) + x \cdot y, i \cdot \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(z, c \cdot \color{blue}{\left(-1 \cdot b\right)} + x \cdot y, i \cdot \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right)\right) \]
      12. accelerator-lowering-fma.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(c, \mathsf{neg}\left(b\right), x \cdot y\right), i \cdot \color{blue}{\left(b \cdot t + -1 \cdot \left(j \cdot y\right)\right)}\right) \]
    7. Simplified81.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.8 \cdot 10^{-24}:\\ \;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(x, t, -\mathsf{fma}\left(c, j, \frac{z \cdot \mathsf{fma}\left(b, -c, x \cdot y\right)}{a}\right)\right)\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(c, -b, x \cdot y\right), i \cdot \left(t \cdot b - y \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(x, t, -\mathsf{fma}\left(c, j, \frac{z \cdot \mathsf{fma}\left(b, -c, x \cdot y\right)}{a}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 59.6% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.2e5 or 1.02000000000000005e121 < t

    1. Initial program 56.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 t around inf

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} + \left(\mathsf{neg}\left(-1 \cdot \left(b \cdot i\right)\right)\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto t \cdot \left(a \cdot \left(-1 \cdot x\right) + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(b \cdot i\right)\right)}\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto t \cdot \left(a \cdot \left(-1 \cdot x\right) + \color{blue}{b \cdot i}\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(a, \mathsf{neg}\left(x\right), \color{blue}{i \cdot b}\right) \]
      12. *-lowering-*.f6471.4

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

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

    if -5.2e5 < t < -1.1000000000000001e-171

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot \color{blue}{\left(\mathsf{neg}\left(b \cdot z\right)\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
      8. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto c \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      12. neg-lowering-neg.f6467.7

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

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

    if -1.1000000000000001e-171 < t < 1.02000000000000005e121

    1. Initial program 75.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}{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 \color{blue}{\left(y \cdot z\right) \cdot x} + j \cdot \left(c \cdot a - y \cdot i\right) \]
      2. associate-*r*N/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -520000:\\ \;\;\;\;t \cdot \mathsf{fma}\left(a, -x, b \cdot i\right)\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-171}:\\ \;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right) - c \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+121}:\\ \;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right) + y \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(a, -x, b \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 68.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+96}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{-1}{x \cdot t - c \cdot j}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.0999999999999999e96

    1. Initial program 44.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 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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6465.6

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

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

    if -1.0999999999999999e96 < a < 1.20000000000000005e162

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \left(\mathsf{neg}\left(\color{blue}{c \cdot b}\right)\right) + x \cdot y, i \cdot \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(z, c \cdot \color{blue}{\left(-1 \cdot b\right)} + x \cdot y, i \cdot \left(-1 \cdot \left(j \cdot y\right) + b \cdot t\right)\right) \]
      12. accelerator-lowering-fma.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(c, \mathsf{neg}\left(b\right), x \cdot y\right), i \cdot \color{blue}{\left(b \cdot t + -1 \cdot \left(j \cdot y\right)\right)}\right) \]
    7. Simplified78.9%

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

    if 1.20000000000000005e162 < a

    1. Initial program 59.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 i around 0

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

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot \left(x \cdot t + \left(\mathsf{neg}\left(\left(c \cdot j + \frac{z \cdot \left(c \cdot \left(\mathsf{neg}\left(b\right)\right) + x \cdot y\right) + i \cdot \left(b \cdot t - j \cdot y\right)}{a}\right)\right)\right)\right)} \]
      2. flip-+N/A

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

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

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

      \[\leadsto \frac{\mathsf{neg}\left(a\right)}{\color{blue}{\frac{1}{t \cdot x - c \cdot j}}} \]
    10. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(a\right)}{\color{blue}{\frac{1}{t \cdot x - c \cdot j}}} \]
      2. --lowering--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(a\right)}{\frac{1}{\color{blue}{t \cdot x - c \cdot j}}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(a\right)}{\frac{1}{\color{blue}{t \cdot x} - c \cdot j}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\mathsf{neg}\left(a\right)}{\frac{1}{t \cdot x - \color{blue}{j \cdot c}}} \]
      5. *-lowering-*.f6478.6

        \[\leadsto \frac{-a}{\frac{1}{t \cdot x - \color{blue}{j \cdot c}}} \]
    11. Simplified78.6%

      \[\leadsto \frac{-a}{\color{blue}{\frac{1}{t \cdot x - j \cdot c}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification76.4%

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

Alternative 7: 53.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\
\mathbf{if}\;a \leq -5.8 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.79999999999999949e136 or 7.6000000000000005e161 < a

    1. Initial program 52.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 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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6474.0

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

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

    if -5.79999999999999949e136 < a < -7.5999999999999993e-74

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(i \cdot b\right)} + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. *-lowering-*.f6458.9

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

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

    if -7.5999999999999993e-74 < a < -1.1499999999999999e-249

    1. Initial program 79.3%

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\color{blue}{z \cdot x} + -1 \cdot \left(i \cdot j\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto y \cdot \mathsf{fma}\left(z, x, \mathsf{neg}\left(\color{blue}{j \cdot i}\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

        \[\leadsto y \cdot \mathsf{fma}\left(z, x, j \cdot \color{blue}{\left(-1 \cdot i\right)}\right) \]
      9. *-lowering-*.f64N/A

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

        \[\leadsto y \cdot \mathsf{fma}\left(z, x, j \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      11. neg-lowering-neg.f6470.6

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

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

    if -1.1499999999999999e-249 < a < 3.59999999999999976e-54

    1. Initial program 80.0%

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

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

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

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

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

        \[\leadsto b \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot z\right)\right)} + i \cdot t\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot z\right)} + i \cdot t\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, i \cdot t\right) \]
      7. neg-lowering-neg.f64N/A

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{t \cdot i}\right) \]
      9. *-lowering-*.f6465.7

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

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

    if 3.59999999999999976e-54 < a < 7.6000000000000005e161

    1. Initial program 64.0%

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

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

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

        \[\leadsto y \cdot \left(\color{blue}{j \cdot \left(-1 \cdot i\right)} + x \cdot z\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(j, -1 \cdot i, x \cdot z\right)} \]
      5. neg-mul-1N/A

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

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

        \[\leadsto y \cdot \mathsf{fma}\left(j, \mathsf{neg}\left(i\right), \color{blue}{z \cdot x}\right) \]
      8. *-lowering-*.f6456.3

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+136}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{-74}:\\ \;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right) + t \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-249}:\\ \;\;\;\;y \cdot \mathsf{fma}\left(z, x, -i \cdot j\right)\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-54}:\\ \;\;\;\;b \cdot \mathsf{fma}\left(c, -z, t \cdot i\right)\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+161}:\\ \;\;\;\;y \cdot \mathsf{fma}\left(j, -i, x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 41.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-179}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-238}:\\
\;\;\;\;-y \cdot \left(i \cdot j\right)\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{-9}:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{elif}\;a \leq 8.6 \cdot 10^{+125}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.20000000000000009e-61 or 8.60000000000000071e125 < a

    1. Initial program 59.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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6459.7

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

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

    if -2.20000000000000009e-61 < a < -1.80000000000000004e-179

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6460.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6460.5

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified60.5%

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

    if -1.80000000000000004e-179 < a < -1.64999999999999985e-238

    1. Initial program 82.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 i around inf

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6468.6

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

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \color{blue}{\left(\mathsf{neg}\left(i \cdot y\right)\right)} \]
      9. *-commutativeN/A

        \[\leadsto j \cdot \left(\mathsf{neg}\left(\color{blue}{y \cdot i}\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto j \cdot \left(y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      14. neg-lowering-neg.f6442.6

        \[\leadsto j \cdot \left(y \cdot \color{blue}{\left(-i\right)}\right) \]
    8. Simplified42.6%

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

        \[\leadsto j \cdot \color{blue}{\left(\left(\mathsf{neg}\left(i\right)\right) \cdot y\right)} \]
      2. associate-*r*N/A

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

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

        \[\leadsto \color{blue}{\left(j \cdot \left(\mathsf{neg}\left(i\right)\right)\right)} \cdot y \]
      5. neg-lowering-neg.f6451.0

        \[\leadsto \left(j \cdot \color{blue}{\left(-i\right)}\right) \cdot y \]
    10. Applied egg-rr51.0%

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

    if -1.64999999999999985e-238 < a < 8.5e-9

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6456.6

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

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

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6440.5

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    8. Simplified40.5%

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

    if 8.5e-9 < a < 8.60000000000000071e125

    1. Initial program 65.0%

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6442.2

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6436.6

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified36.6%

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

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

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot y} \]
      3. *-lowering-*.f6447.8

        \[\leadsto \color{blue}{\left(x \cdot z\right)} \cdot y \]
    10. Applied egg-rr47.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{-61}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-179}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-238}:\\ \;\;\;\;-y \cdot \left(i \cdot j\right)\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-9}:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+125}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.0% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -30 or 2.1000000000000002e121 < t

    1. Initial program 56.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 t around inf

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} + \left(\mathsf{neg}\left(-1 \cdot \left(b \cdot i\right)\right)\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto t \cdot \left(a \cdot \left(-1 \cdot x\right) + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(b \cdot i\right)\right)}\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto t \cdot \left(a \cdot \left(-1 \cdot x\right) + \color{blue}{b \cdot i}\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(a, \mathsf{neg}\left(x\right), \color{blue}{i \cdot b}\right) \]
      12. *-lowering-*.f6471.4

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

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

    if -30 < t < 2.1000000000000002e121

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \left(\mathsf{neg}\left(\color{blue}{y \cdot i}\right)\right) + c \cdot \mathsf{fma}\left(b, \mathsf{neg}\left(z\right), j \cdot a\right) \]
      10. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto j \cdot \left(y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) + c \cdot \mathsf{fma}\left(b, \mathsf{neg}\left(z\right), j \cdot a\right) \]
      14. neg-lowering-neg.f6464.1

        \[\leadsto j \cdot \left(y \cdot \color{blue}{\left(-i\right)}\right) + c \cdot \mathsf{fma}\left(b, -z, j \cdot a\right) \]
    7. Simplified64.1%

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

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

Alternative 10: 59.1% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5000000000000001e-40 or 1.6499999999999999e121 < t

    1. Initial program 57.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 t around inf

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} + \left(\mathsf{neg}\left(-1 \cdot \left(b \cdot i\right)\right)\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto t \cdot \left(a \cdot \left(-1 \cdot x\right) + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(b \cdot i\right)\right)}\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto t \cdot \left(a \cdot \left(-1 \cdot x\right) + \color{blue}{b \cdot i}\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(a, \mathsf{neg}\left(x\right), \color{blue}{i \cdot b}\right) \]
      12. *-lowering-*.f6468.9

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

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

    if -4.5000000000000001e-40 < t < 1.6499999999999999e121

    1. Initial program 78.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 \color{blue}{\left(y \cdot z\right) \cdot x} + j \cdot \left(c \cdot a - y \cdot i\right) \]
      2. associate-*r*N/A

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

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

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

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

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

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

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

Alternative 11: 51.2% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\
\mathbf{if}\;a \leq -4.8 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{-137}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.80000000000000009e92 or 1.90000000000000003e132 < a

    1. Initial program 51.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 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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6469.1

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

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

    if -4.80000000000000009e92 < a < -8.59999999999999947e-64

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

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

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

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

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

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

        \[\leadsto c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(b \cdot z\right)\right)} + a \cdot j\right) \]
      6. distribute-rgt-neg-inN/A

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

        \[\leadsto c \cdot \left(b \cdot \color{blue}{\left(-1 \cdot z\right)} + a \cdot j\right) \]
      8. accelerator-lowering-fma.f64N/A

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

        \[\leadsto c \cdot \mathsf{fma}\left(b, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot j\right) \]
      10. neg-lowering-neg.f64N/A

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

        \[\leadsto c \cdot \mathsf{fma}\left(b, \mathsf{neg}\left(z\right), \color{blue}{j \cdot a}\right) \]
      12. *-lowering-*.f6456.0

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

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

    if -8.59999999999999947e-64 < a < -5.7999999999999997e-137

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6478.0

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6478.2

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified78.2%

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

    if -5.7999999999999997e-137 < a < 1.90000000000000003e132

    1. Initial program 76.1%

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

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

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

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

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

        \[\leadsto b \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot z\right)\right)} + i \cdot t\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot z\right)} + i \cdot t\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, i \cdot t\right) \]
      7. neg-lowering-neg.f64N/A

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{t \cdot i}\right) \]
      9. *-lowering-*.f6456.3

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+92}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-64}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(b, -z, a \cdot j\right)\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-137}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+132}:\\ \;\;\;\;b \cdot \mathsf{fma}\left(c, -z, t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 29.9% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{-6}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq 260000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+81}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+202}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -3.3e-6)
   (* y (* x z))
   (if (<= x 260000000.0)
     (* i (* t b))
     (if (<= x 4e+81)
       (* c (* a j))
       (if (<= x 1.15e+202) (* t (* x (- a))) (* x (* y z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -3.3e-6) {
		tmp = y * (x * z);
	} else if (x <= 260000000.0) {
		tmp = i * (t * b);
	} else if (x <= 4e+81) {
		tmp = c * (a * j);
	} else if (x <= 1.15e+202) {
		tmp = t * (x * -a);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-3.3d-6)) then
        tmp = y * (x * z)
    else if (x <= 260000000.0d0) then
        tmp = i * (t * b)
    else if (x <= 4d+81) then
        tmp = c * (a * j)
    else if (x <= 1.15d+202) then
        tmp = t * (x * -a)
    else
        tmp = x * (y * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -3.3e-6) {
		tmp = y * (x * z);
	} else if (x <= 260000000.0) {
		tmp = i * (t * b);
	} else if (x <= 4e+81) {
		tmp = c * (a * j);
	} else if (x <= 1.15e+202) {
		tmp = t * (x * -a);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -3.3e-6:
		tmp = y * (x * z)
	elif x <= 260000000.0:
		tmp = i * (t * b)
	elif x <= 4e+81:
		tmp = c * (a * j)
	elif x <= 1.15e+202:
		tmp = t * (x * -a)
	else:
		tmp = x * (y * z)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -3.3e-6)
		tmp = Float64(y * Float64(x * z));
	elseif (x <= 260000000.0)
		tmp = Float64(i * Float64(t * b));
	elseif (x <= 4e+81)
		tmp = Float64(c * Float64(a * j));
	elseif (x <= 1.15e+202)
		tmp = Float64(t * Float64(x * Float64(-a)));
	else
		tmp = Float64(x * Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -3.3e-6)
		tmp = y * (x * z);
	elseif (x <= 260000000.0)
		tmp = i * (t * b);
	elseif (x <= 4e+81)
		tmp = c * (a * j);
	elseif (x <= 1.15e+202)
		tmp = t * (x * -a);
	else
		tmp = x * (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -3.3e-6], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 260000000.0], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e+81], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+202], N[(t * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-6}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\

\mathbf{elif}\;x \leq 260000000:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{elif}\;x \leq 4 \cdot 10^{+81}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

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

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


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

    1. Initial program 63.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. *-lowering-*.f64N/A

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6459.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6436.1

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified36.1%

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

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

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot y} \]
      3. *-lowering-*.f6442.0

        \[\leadsto \color{blue}{\left(x \cdot z\right)} \cdot y \]
    10. Applied egg-rr42.0%

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

    if -3.30000000000000017e-6 < x < 2.6e8

    1. Initial program 66.0%

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6458.0

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

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

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6435.5

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    8. Simplified35.5%

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

    if 2.6e8 < x < 3.99999999999999969e81

    1. Initial program 84.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 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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6447.0

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

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

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

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

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

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      5. *-lowering-*.f6446.8

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j\right)} \]
    8. Simplified46.8%

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

    if 3.99999999999999969e81 < x < 1.15e202

    1. Initial program 76.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 i around 0

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(b \cdot i + -1 \cdot \left(a \cdot x\right)\right)} \]
      3. accelerator-lowering-fma.f64N/A

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

        \[\leadsto t \cdot \mathsf{fma}\left(b, i, \color{blue}{\mathsf{neg}\left(a \cdot x\right)}\right) \]
      5. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(b, i, a \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      9. neg-lowering-neg.f6458.4

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

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

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

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

        \[\leadsto t \cdot \left(\mathsf{neg}\left(\color{blue}{x \cdot a}\right)\right) \]
      3. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto t \cdot \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
      7. neg-lowering-neg.f6449.0

        \[\leadsto t \cdot \left(x \cdot \color{blue}{\left(-a\right)}\right) \]
    10. Simplified49.0%

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

    if 1.15e202 < x

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6484.4

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6472.6

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified72.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{-6}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq 260000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+81}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+202}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 30.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-6}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq 1350000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+81}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+201}:\\ \;\;\;\;a \cdot \left(t \cdot \left(-x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -4.5e-6)
   (* y (* x z))
   (if (<= x 1350000000.0)
     (* i (* t b))
     (if (<= x 2.6e+81)
       (* c (* a j))
       (if (<= x 5e+201) (* a (* t (- x))) (* x (* y z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -4.5e-6) {
		tmp = y * (x * z);
	} else if (x <= 1350000000.0) {
		tmp = i * (t * b);
	} else if (x <= 2.6e+81) {
		tmp = c * (a * j);
	} else if (x <= 5e+201) {
		tmp = a * (t * -x);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-4.5d-6)) then
        tmp = y * (x * z)
    else if (x <= 1350000000.0d0) then
        tmp = i * (t * b)
    else if (x <= 2.6d+81) then
        tmp = c * (a * j)
    else if (x <= 5d+201) then
        tmp = a * (t * -x)
    else
        tmp = x * (y * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -4.5e-6) {
		tmp = y * (x * z);
	} else if (x <= 1350000000.0) {
		tmp = i * (t * b);
	} else if (x <= 2.6e+81) {
		tmp = c * (a * j);
	} else if (x <= 5e+201) {
		tmp = a * (t * -x);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -4.5e-6:
		tmp = y * (x * z)
	elif x <= 1350000000.0:
		tmp = i * (t * b)
	elif x <= 2.6e+81:
		tmp = c * (a * j)
	elif x <= 5e+201:
		tmp = a * (t * -x)
	else:
		tmp = x * (y * z)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -4.5e-6)
		tmp = Float64(y * Float64(x * z));
	elseif (x <= 1350000000.0)
		tmp = Float64(i * Float64(t * b));
	elseif (x <= 2.6e+81)
		tmp = Float64(c * Float64(a * j));
	elseif (x <= 5e+201)
		tmp = Float64(a * Float64(t * Float64(-x)));
	else
		tmp = Float64(x * Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -4.5e-6)
		tmp = y * (x * z);
	elseif (x <= 1350000000.0)
		tmp = i * (t * b);
	elseif (x <= 2.6e+81)
		tmp = c * (a * j);
	elseif (x <= 5e+201)
		tmp = a * (t * -x);
	else
		tmp = x * (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -4.5e-6], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1350000000.0], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+81], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+201], N[(a * N[(t * (-x)), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-6}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\

\mathbf{elif}\;x \leq 1350000000:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{elif}\;x \leq 2.6 \cdot 10^{+81}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

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

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


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

    1. Initial program 63.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. *-lowering-*.f64N/A

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6459.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6436.1

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified36.1%

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

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

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot y} \]
      3. *-lowering-*.f6442.0

        \[\leadsto \color{blue}{\left(x \cdot z\right)} \cdot y \]
    10. Applied egg-rr42.0%

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

    if -4.50000000000000011e-6 < x < 1.35e9

    1. Initial program 66.0%

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6458.0

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

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

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6435.5

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    8. Simplified35.5%

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

    if 1.35e9 < x < 2.59999999999999992e81

    1. Initial program 84.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 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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6447.0

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

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

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

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

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

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      5. *-lowering-*.f6446.8

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j\right)} \]
    8. Simplified46.8%

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

    if 2.59999999999999992e81 < x < 4.9999999999999995e201

    1. Initial program 76.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 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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6467.6

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

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

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

        \[\leadsto \color{blue}{\mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right)} \]
      2. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(\mathsf{neg}\left(t \cdot x\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto a \cdot \left(\mathsf{neg}\left(\color{blue}{x \cdot t}\right)\right) \]
      7. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \left(x \cdot \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right) \]
      11. neg-lowering-neg.f6448.6

        \[\leadsto a \cdot \left(x \cdot \color{blue}{\left(-t\right)}\right) \]
    8. Simplified48.6%

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

    if 4.9999999999999995e201 < x

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6484.4

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6472.6

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified72.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-6}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq 1350000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+81}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+201}:\\ \;\;\;\;a \cdot \left(t \cdot \left(-x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 52.7% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.1999999999999999e27 or 4.29999999999999982e132 < x

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6468.2

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

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

    if -2.1999999999999999e27 < x < 10

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6458.2

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

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

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(t, b, \color{blue}{j \cdot \left(\mathsf{neg}\left(y\right)\right)}\right) \]
      5. neg-lowering-neg.f6458.3

        \[\leadsto i \cdot \mathsf{fma}\left(t, b, j \cdot \color{blue}{\left(-y\right)}\right) \]
    7. Applied egg-rr58.3%

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

    if 10 < x < 4.29999999999999982e132

    1. Initial program 79.1%

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

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

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

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

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

        \[\leadsto c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(b \cdot z\right)\right)} + a \cdot j\right) \]
      6. distribute-rgt-neg-inN/A

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

        \[\leadsto c \cdot \left(b \cdot \color{blue}{\left(-1 \cdot z\right)} + a \cdot j\right) \]
      8. accelerator-lowering-fma.f64N/A

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

        \[\leadsto c \cdot \mathsf{fma}\left(b, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot j\right) \]
      10. neg-lowering-neg.f64N/A

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

        \[\leadsto c \cdot \mathsf{fma}\left(b, \mathsf{neg}\left(z\right), \color{blue}{j \cdot a}\right) \]
      12. *-lowering-*.f6466.9

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

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

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

Alternative 15: 52.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.45 \cdot 10^{-20}:\\
\;\;\;\;i \cdot \mathsf{fma}\left(t, b, y \cdot \left(-j\right)\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -1.45e-20

    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 inf

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6469.7

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

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

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(t, b, \color{blue}{j \cdot \left(\mathsf{neg}\left(y\right)\right)}\right) \]
      5. neg-lowering-neg.f6469.8

        \[\leadsto i \cdot \mathsf{fma}\left(t, b, j \cdot \color{blue}{\left(-y\right)}\right) \]
    7. Applied egg-rr69.8%

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

    if -1.45e-20 < i < -3.30000000000000001e-163

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

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6459.2

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

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

    if -3.30000000000000001e-163 < i < 6.6999999999999995e102

    1. Initial program 74.0%

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

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

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

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

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

        \[\leadsto c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(b \cdot z\right)\right)} + a \cdot j\right) \]
      6. distribute-rgt-neg-inN/A

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

        \[\leadsto c \cdot \left(b \cdot \color{blue}{\left(-1 \cdot z\right)} + a \cdot j\right) \]
      8. accelerator-lowering-fma.f64N/A

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

        \[\leadsto c \cdot \mathsf{fma}\left(b, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot j\right) \]
      10. neg-lowering-neg.f64N/A

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

        \[\leadsto c \cdot \mathsf{fma}\left(b, \mathsf{neg}\left(z\right), \color{blue}{j \cdot a}\right) \]
      12. *-lowering-*.f6453.4

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

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

    if 6.6999999999999995e102 < i

    1. Initial program 61.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 i around inf

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6465.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.45 \cdot 10^{-20}:\\ \;\;\;\;i \cdot \mathsf{fma}\left(t, b, y \cdot \left(-j\right)\right)\\ \mathbf{elif}\;i \leq -3.3 \cdot 10^{-163}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;i \leq 6.7 \cdot 10^{+102}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(b, -z, a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \mathsf{fma}\left(j, -y, t \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 52.3% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -1.20000000000000011e-19 or 1.24000000000000003e101 < i

    1. Initial program 65.3%

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6468.1

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

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

    if -1.20000000000000011e-19 < i < -3.30000000000000001e-163

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

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6459.2

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

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

    if -3.30000000000000001e-163 < i < 1.24000000000000003e101

    1. Initial program 74.0%

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

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

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

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

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

        \[\leadsto c \cdot \left(\color{blue}{\left(\mathsf{neg}\left(b \cdot z\right)\right)} + a \cdot j\right) \]
      6. distribute-rgt-neg-inN/A

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

        \[\leadsto c \cdot \left(b \cdot \color{blue}{\left(-1 \cdot z\right)} + a \cdot j\right) \]
      8. accelerator-lowering-fma.f64N/A

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

        \[\leadsto c \cdot \mathsf{fma}\left(b, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot j\right) \]
      10. neg-lowering-neg.f64N/A

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

        \[\leadsto c \cdot \mathsf{fma}\left(b, \mathsf{neg}\left(z\right), \color{blue}{j \cdot a}\right) \]
      12. *-lowering-*.f6453.4

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.2 \cdot 10^{-19}:\\ \;\;\;\;i \cdot \mathsf{fma}\left(j, -y, t \cdot b\right)\\ \mathbf{elif}\;i \leq -3.3 \cdot 10^{-163}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;i \leq 1.24 \cdot 10^{+101}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(b, -z, a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \mathsf{fma}\left(j, -y, t \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 52.6% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.39999999999999986e-17 or 3.1999999999999997e132 < a

    1. Initial program 56.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 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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6463.7

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

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

    if -2.39999999999999986e-17 < a < 3.1999999999999997e132

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

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

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

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

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

        \[\leadsto b \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot z\right)\right)} + i \cdot t\right) \]
      3. distribute-rgt-neg-inN/A

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

        \[\leadsto b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot z\right)} + i \cdot t\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, i \cdot t\right) \]
      7. neg-lowering-neg.f64N/A

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{t \cdot i}\right) \]
      9. *-lowering-*.f6453.5

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

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

Alternative 18: 52.4% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;a \leq 5.6 \cdot 10^{+131}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.45000000000000006e-17 or 5.6000000000000001e131 < a

    1. Initial program 56.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 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. *-lowering-*.f64N/A

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6463.7

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

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

    if -2.45000000000000006e-17 < a < 5.6000000000000001e131

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

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

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto b \cdot \color{blue}{\left(\left(\mathsf{neg}\left(c \cdot z\right)\right) + i \cdot t\right)} \]
      3. remove-double-negN/A

        \[\leadsto b \cdot \left(\left(\mathsf{neg}\left(c \cdot z\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(i \cdot t\right)\right)\right)\right)}\right) \]
      4. distribute-neg-inN/A

        \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z + \left(\mathsf{neg}\left(i \cdot t\right)\right)\right)\right)\right)} \]
      5. sub-negN/A

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

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

        \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      8. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      9. sub-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(i \cdot t\right)\right)\right)}\right)\right) \]
      10. distribute-neg-inN/A

        \[\leadsto b \cdot \color{blue}{\left(\left(\mathsf{neg}\left(c \cdot z\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(i \cdot t\right)\right)\right)\right)\right)} \]
      11. remove-double-negN/A

        \[\leadsto b \cdot \left(\left(\mathsf{neg}\left(c \cdot z\right)\right) + \color{blue}{i \cdot t}\right) \]
      12. +-commutativeN/A

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right)} \]
      13. sub-negN/A

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

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

        \[\leadsto b \cdot \left(\color{blue}{i \cdot t} - c \cdot z\right) \]
      16. *-lowering-*.f6452.8

        \[\leadsto b \cdot \left(i \cdot t - \color{blue}{c \cdot z}\right) \]
    5. Simplified52.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{-17}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+131}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 29.0% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-7}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq 130000000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 5.7 \cdot 10^{+187}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -2.7e-7)
   (* y (* x z))
   (if (<= x 130000000000.0)
     (* i (* t b))
     (if (<= x 5.7e+187) (* c (* a j)) (* x (* y z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2.7e-7) {
		tmp = y * (x * z);
	} else if (x <= 130000000000.0) {
		tmp = i * (t * b);
	} else if (x <= 5.7e+187) {
		tmp = c * (a * j);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-2.7d-7)) then
        tmp = y * (x * z)
    else if (x <= 130000000000.0d0) then
        tmp = i * (t * b)
    else if (x <= 5.7d+187) then
        tmp = c * (a * j)
    else
        tmp = x * (y * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -2.7e-7) {
		tmp = y * (x * z);
	} else if (x <= 130000000000.0) {
		tmp = i * (t * b);
	} else if (x <= 5.7e+187) {
		tmp = c * (a * j);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -2.7e-7:
		tmp = y * (x * z)
	elif x <= 130000000000.0:
		tmp = i * (t * b)
	elif x <= 5.7e+187:
		tmp = c * (a * j)
	else:
		tmp = x * (y * z)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -2.7e-7)
		tmp = Float64(y * Float64(x * z));
	elseif (x <= 130000000000.0)
		tmp = Float64(i * Float64(t * b));
	elseif (x <= 5.7e+187)
		tmp = Float64(c * Float64(a * j));
	else
		tmp = Float64(x * Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -2.7e-7)
		tmp = y * (x * z);
	elseif (x <= 130000000000.0)
		tmp = i * (t * b);
	elseif (x <= 5.7e+187)
		tmp = c * (a * j);
	else
		tmp = x * (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2.7e-7], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 130000000000.0], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.7e+187], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\

\mathbf{elif}\;x \leq 130000000000:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{elif}\;x \leq 5.7 \cdot 10^{+187}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.70000000000000009e-7

    1. Initial program 63.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. *-lowering-*.f64N/A

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6459.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6436.1

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified36.1%

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

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

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot y} \]
      3. *-lowering-*.f6442.0

        \[\leadsto \color{blue}{\left(x \cdot z\right)} \cdot y \]
    10. Applied egg-rr42.0%

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

    if -2.70000000000000009e-7 < x < 1.3e11

    1. Initial program 66.0%

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6458.0

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

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

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6435.5

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    8. Simplified35.5%

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

    if 1.3e11 < x < 5.7000000000000004e187

    1. Initial program 78.4%

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

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6455.7

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

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

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

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

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

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      5. *-lowering-*.f6437.0

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j\right)} \]
    8. Simplified37.0%

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

    if 5.7000000000000004e187 < x

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6478.4

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6464.5

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified64.5%

      \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification39.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-7}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq 130000000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 5.7 \cdot 10^{+187}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 29.2% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{-6}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq 15600000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 2.65 \cdot 10^{+187}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -4.2e-6)
   (* z (* x y))
   (if (<= x 15600000000.0)
     (* i (* t b))
     (if (<= x 2.65e+187) (* c (* a j)) (* x (* y z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -4.2e-6) {
		tmp = z * (x * y);
	} else if (x <= 15600000000.0) {
		tmp = i * (t * b);
	} else if (x <= 2.65e+187) {
		tmp = c * (a * j);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-4.2d-6)) then
        tmp = z * (x * y)
    else if (x <= 15600000000.0d0) then
        tmp = i * (t * b)
    else if (x <= 2.65d+187) then
        tmp = c * (a * j)
    else
        tmp = x * (y * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -4.2e-6) {
		tmp = z * (x * y);
	} else if (x <= 15600000000.0) {
		tmp = i * (t * b);
	} else if (x <= 2.65e+187) {
		tmp = c * (a * j);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -4.2e-6:
		tmp = z * (x * y)
	elif x <= 15600000000.0:
		tmp = i * (t * b)
	elif x <= 2.65e+187:
		tmp = c * (a * j)
	else:
		tmp = x * (y * z)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -4.2e-6)
		tmp = Float64(z * Float64(x * y));
	elseif (x <= 15600000000.0)
		tmp = Float64(i * Float64(t * b));
	elseif (x <= 2.65e+187)
		tmp = Float64(c * Float64(a * j));
	else
		tmp = Float64(x * Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -4.2e-6)
		tmp = z * (x * y);
	elseif (x <= 15600000000.0)
		tmp = i * (t * b);
	elseif (x <= 2.65e+187)
		tmp = c * (a * j);
	else
		tmp = x * (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -4.2e-6], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 15600000000.0], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.65e+187], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-6}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;x \leq 15600000000:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{elif}\;x \leq 2.65 \cdot 10^{+187}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.1999999999999996e-6

    1. Initial program 63.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. *-lowering-*.f64N/A

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6459.3

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(x \cdot y\right)} \]
      6. *-lowering-*.f6437.6

        \[\leadsto z \cdot \color{blue}{\left(x \cdot y\right)} \]
    8. Simplified37.6%

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

    if -4.1999999999999996e-6 < x < 1.56e10

    1. Initial program 66.0%

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

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

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

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

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

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

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

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6458.0

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

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

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6435.5

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    8. Simplified35.5%

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

    if 1.56e10 < x < 2.65000000000000017e187

    1. Initial program 78.4%

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

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

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

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6455.7

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

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

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

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

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

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      5. *-lowering-*.f6437.0

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j\right)} \]
    8. Simplified37.0%

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

    if 2.65000000000000017e187 < x

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6478.4

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6464.5

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified64.5%

      \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification38.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{-6}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq 15600000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 2.65 \cdot 10^{+187}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 28.9% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;x \leq 180000000000:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{elif}\;x \leq 6.1 \cdot 10^{+181}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.9999999999999996e-7 or 6.10000000000000001e181 < x

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

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

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

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

        \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{t \cdot a}\right)\right) + y \cdot z\right) \]
      5. distribute-rgt-neg-inN/A

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot a, y \cdot z\right)} \]
      8. mul-1-negN/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(a\right)}, y \cdot z\right) \]
      10. *-lowering-*.f6464.5

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      2. *-lowering-*.f6443.8

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified43.8%

      \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]

    if -7.9999999999999996e-7 < x < 1.8e11

    1. Initial program 66.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in i around inf

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto i \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto i \cdot \left(\color{blue}{j \cdot \left(\mathsf{neg}\left(y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto i \cdot \left(j \cdot \color{blue}{\left(-1 \cdot y\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{b \cdot t}\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto i \cdot \color{blue}{\mathsf{fma}\left(j, -1 \cdot y, b \cdot t\right)} \]
      9. mul-1-negN/A

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      10. neg-lowering-neg.f64N/A

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6458.0

        \[\leadsto i \cdot \mathsf{fma}\left(j, -y, \color{blue}{b \cdot t}\right) \]
    5. Simplified58.0%

      \[\leadsto \color{blue}{i \cdot \mathsf{fma}\left(j, -y, b \cdot t\right)} \]
    6. Taylor expanded in j around 0

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6435.5

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    8. Simplified35.5%

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]

    if 1.8e11 < x < 6.10000000000000001e181

    1. Initial program 78.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)}\right) \]
      7. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(-1 \cdot x\right)}\right) \]
      9. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6455.7

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-x\right)}\right) \]
    5. Simplified55.7%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto \color{blue}{a \cdot \left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(a \cdot c\right) \cdot j} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(c \cdot a\right)} \cdot j \]
      3. associate-*r*N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      5. *-lowering-*.f6437.0

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j\right)} \]
    8. Simplified37.0%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification38.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;x \leq 180000000000:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;x \leq 6.1 \cdot 10^{+181}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 31.0% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -3.2 \cdot 10^{+22}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;j \leq 2.3 \cdot 10^{+70}:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= j -3.2e+22)
   (* a (* c j))
   (if (<= j 2.3e+70) (* 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 (j <= -3.2e+22) {
		tmp = a * (c * j);
	} else if (j <= 2.3e+70) {
		tmp = i * (t * b);
	} else {
		tmp = c * (a * j);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    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 <= (-3.2d+22)) then
        tmp = a * (c * j)
    else if (j <= 2.3d+70) 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 (j <= -3.2e+22) {
		tmp = a * (c * j);
	} else if (j <= 2.3e+70) {
		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 j <= -3.2e+22:
		tmp = a * (c * j)
	elif j <= 2.3e+70:
		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 (j <= -3.2e+22)
		tmp = Float64(a * Float64(c * j));
	elseif (j <= 2.3e+70)
		tmp = Float64(i * Float64(t * b));
	else
		tmp = Float64(c * Float64(a * j));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -3.2e+22)
		tmp = a * (c * j);
	elseif (j <= 2.3e+70)
		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[j, -3.2e+22], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.3e+70], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -3.2 \cdot 10^{+22}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

\mathbf{elif}\;j \leq 2.3 \cdot 10^{+70}:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -3.2e22

    1. Initial program 76.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 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. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)}\right) \]
      7. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(-1 \cdot x\right)}\right) \]
      9. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6441.3

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-x\right)}\right) \]
    5. Simplified41.3%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6439.7

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    8. Simplified39.7%

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]

    if -3.2e22 < j < 2.29999999999999994e70

    1. Initial program 65.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 i around inf

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto i \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto i \cdot \left(\color{blue}{j \cdot \left(\mathsf{neg}\left(y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto i \cdot \left(j \cdot \color{blue}{\left(-1 \cdot y\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{b \cdot t}\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto i \cdot \color{blue}{\mathsf{fma}\left(j, -1 \cdot y, b \cdot t\right)} \]
      9. mul-1-negN/A

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      10. neg-lowering-neg.f64N/A

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6445.6

        \[\leadsto i \cdot \mathsf{fma}\left(j, -y, \color{blue}{b \cdot t}\right) \]
    5. Simplified45.6%

      \[\leadsto \color{blue}{i \cdot \mathsf{fma}\left(j, -y, b \cdot t\right)} \]
    6. Taylor expanded in j around 0

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6433.1

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]
    8. Simplified33.1%

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t\right)} \]

    if 2.29999999999999994e70 < j

    1. Initial program 71.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)}\right) \]
      7. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(-1 \cdot x\right)}\right) \]
      9. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6444.3

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-x\right)}\right) \]
    5. Simplified44.3%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto \color{blue}{a \cdot \left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(a \cdot c\right) \cdot j} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(c \cdot a\right)} \cdot j \]
      3. associate-*r*N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      5. *-lowering-*.f6438.2

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j\right)} \]
    8. Simplified38.2%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification35.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -3.2 \cdot 10^{+22}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;j \leq 2.3 \cdot 10^{+70}:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 30.7% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -2.1 \cdot 10^{+26}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;j \leq 1.05 \cdot 10^{+69}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= j -2.1e+26)
   (* a (* c j))
   (if (<= j 1.05e+69) (* b (* t i)) (* c (* a j)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -2.1e+26) {
		tmp = a * (c * j);
	} else if (j <= 1.05e+69) {
		tmp = b * (t * i);
	} else {
		tmp = c * (a * j);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (j <= (-2.1d+26)) then
        tmp = a * (c * j)
    else if (j <= 1.05d+69) then
        tmp = b * (t * i)
    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 (j <= -2.1e+26) {
		tmp = a * (c * j);
	} else if (j <= 1.05e+69) {
		tmp = b * (t * i);
	} else {
		tmp = c * (a * j);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if j <= -2.1e+26:
		tmp = a * (c * j)
	elif j <= 1.05e+69:
		tmp = b * (t * i)
	else:
		tmp = c * (a * j)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (j <= -2.1e+26)
		tmp = Float64(a * Float64(c * j));
	elseif (j <= 1.05e+69)
		tmp = Float64(b * Float64(t * i));
	else
		tmp = Float64(c * Float64(a * j));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -2.1e+26)
		tmp = a * (c * j);
	elseif (j <= 1.05e+69)
		tmp = b * (t * i);
	else
		tmp = c * (a * j);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -2.1e+26], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.05e+69], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.1 \cdot 10^{+26}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

\mathbf{elif}\;j \leq 1.05 \cdot 10^{+69}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -2.1000000000000001e26

    1. Initial program 76.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 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. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)}\right) \]
      7. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(-1 \cdot x\right)}\right) \]
      9. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6441.3

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-x\right)}\right) \]
    5. Simplified41.3%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6439.7

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    8. Simplified39.7%

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]

    if -2.1000000000000001e26 < j < 1.05000000000000008e69

    1. Initial program 65.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 i around inf

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto i \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto i \cdot \left(\color{blue}{j \cdot \left(\mathsf{neg}\left(y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto i \cdot \left(j \cdot \color{blue}{\left(-1 \cdot y\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{b \cdot t}\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto i \cdot \color{blue}{\mathsf{fma}\left(j, -1 \cdot y, b \cdot t\right)} \]
      9. mul-1-negN/A

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      10. neg-lowering-neg.f64N/A

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6445.6

        \[\leadsto i \cdot \mathsf{fma}\left(j, -y, \color{blue}{b \cdot t}\right) \]
    5. Simplified45.6%

      \[\leadsto \color{blue}{i \cdot \mathsf{fma}\left(j, -y, b \cdot t\right)} \]
    6. Taylor expanded in j around 0

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto b \cdot \color{blue}{\left(t \cdot i\right)} \]
      3. *-lowering-*.f6428.8

        \[\leadsto b \cdot \color{blue}{\left(t \cdot i\right)} \]
    8. Simplified28.8%

      \[\leadsto \color{blue}{b \cdot \left(t \cdot i\right)} \]

    if 1.05000000000000008e69 < j

    1. Initial program 71.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)}\right) \]
      7. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(-1 \cdot x\right)}\right) \]
      9. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6444.3

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-x\right)}\right) \]
    5. Simplified44.3%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto \color{blue}{a \cdot \left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(a \cdot c\right) \cdot j} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(c \cdot a\right)} \cdot j \]
      3. associate-*r*N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
      5. *-lowering-*.f6438.2

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j\right)} \]
    8. Simplified38.2%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 24: 30.6% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(c \cdot j\right)\\ \mathbf{if}\;j \leq -1.55 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 3.8 \cdot 10^{+66}:\\ \;\;\;\;b \cdot \left(t \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 (* a (* c j))))
   (if (<= j -1.55e+28) t_1 (if (<= j 3.8e+66) (* b (* t 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 = a * (c * j);
	double tmp;
	if (j <= -1.55e+28) {
		tmp = t_1;
	} else if (j <= 3.8e+66) {
		tmp = b * (t * i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    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 = a * (c * j)
    if (j <= (-1.55d+28)) then
        tmp = t_1
    else if (j <= 3.8d+66) then
        tmp = b * (t * i)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = a * (c * j);
	double tmp;
	if (j <= -1.55e+28) {
		tmp = t_1;
	} else if (j <= 3.8e+66) {
		tmp = b * (t * i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = a * (c * j)
	tmp = 0
	if j <= -1.55e+28:
		tmp = t_1
	elif j <= 3.8e+66:
		tmp = b * (t * i)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(a * Float64(c * j))
	tmp = 0.0
	if (j <= -1.55e+28)
		tmp = t_1;
	elseif (j <= 3.8e+66)
		tmp = Float64(b * Float64(t * i));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = a * (c * j);
	tmp = 0.0;
	if (j <= -1.55e+28)
		tmp = t_1;
	elseif (j <= 3.8e+66)
		tmp = b * (t * i);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.55e+28], t$95$1, If[LessEqual[j, 3.8e+66], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j\right)\\
\mathbf{if}\;j \leq -1.55 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 3.8 \cdot 10^{+66}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.55e28 or 3.8000000000000002e66 < j

    1. Initial program 73.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 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. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)}\right) \]
      7. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(-1 \cdot x\right)}\right) \]
      9. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      10. neg-lowering-neg.f6442.7

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-x\right)}\right) \]
    5. Simplified42.7%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6438.1

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    8. Simplified38.1%

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]

    if -1.55e28 < j < 3.8000000000000002e66

    1. Initial program 65.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 i around inf

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto i \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto i \cdot \left(\color{blue}{\left(\mathsf{neg}\left(j \cdot y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto i \cdot \left(\color{blue}{j \cdot \left(\mathsf{neg}\left(y\right)\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto i \cdot \left(j \cdot \color{blue}{\left(-1 \cdot y\right)} + \left(\mathsf{neg}\left(-1\right)\right) \cdot \left(b \cdot t\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{1} \cdot \left(b \cdot t\right)\right) \]
      7. *-lft-identityN/A

        \[\leadsto i \cdot \left(j \cdot \left(-1 \cdot y\right) + \color{blue}{b \cdot t}\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto i \cdot \color{blue}{\mathsf{fma}\left(j, -1 \cdot y, b \cdot t\right)} \]
      9. mul-1-negN/A

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      10. neg-lowering-neg.f64N/A

        \[\leadsto i \cdot \mathsf{fma}\left(j, \color{blue}{\mathsf{neg}\left(y\right)}, b \cdot t\right) \]
      11. *-lowering-*.f6445.6

        \[\leadsto i \cdot \mathsf{fma}\left(j, -y, \color{blue}{b \cdot t}\right) \]
    5. Simplified45.6%

      \[\leadsto \color{blue}{i \cdot \mathsf{fma}\left(j, -y, b \cdot t\right)} \]
    6. Taylor expanded in j around 0

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto b \cdot \color{blue}{\left(t \cdot i\right)} \]
      3. *-lowering-*.f6428.8

        \[\leadsto b \cdot \color{blue}{\left(t \cdot i\right)} \]
    8. Simplified28.8%

      \[\leadsto \color{blue}{b \cdot \left(t \cdot i\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 25: 22.7% accurate, 5.5× speedup?

\[\begin{array}{l} \\ a \cdot \left(c \cdot j\right) \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* a (* c j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return a * (c * j);
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = a * (c * j)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return a * (c * j);
}
def code(x, y, z, t, a, b, c, i, j):
	return a * (c * j)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(a * Float64(c * j))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = a * (c * j);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
a \cdot \left(c \cdot j\right)
\end{array}
Derivation
  1. Initial program 69.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. *-lowering-*.f64N/A

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    2. +-commutativeN/A

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
    3. *-commutativeN/A

      \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
    4. accelerator-lowering-fma.f64N/A

      \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
    5. mul-1-negN/A

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
    6. distribute-rgt-neg-inN/A

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)}\right) \]
    7. mul-1-negN/A

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{t \cdot \left(-1 \cdot x\right)}\right) \]
    9. mul-1-negN/A

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
    10. neg-lowering-neg.f6434.8

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, t \cdot \color{blue}{\left(-x\right)}\right) \]
  5. Simplified34.8%

    \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)} \]
  6. Taylor expanded in j around inf

    \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
  7. Step-by-step derivation
    1. *-lowering-*.f6420.0

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
  8. Simplified20.0%

    \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
  9. Add Preprocessing

Developer Target 1: 58.9% 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;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    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 2024205 
(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)))))