Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 74.5% → 82.5%
Time: 14.5s
Alternatives: 20
Speedup: 0.5×

Specification

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

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

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 20 alternatives:

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

Initial Program: 74.5% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(j, -i, x \cdot z\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 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0

    1. Initial program 91.1%

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

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

    1. Initial program 0.0%

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

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

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

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

Alternative 2: 51.0% accurate, 1.1× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 7 \cdot 10^{-191}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.89999999999999992e79 or 2.09999999999999991e65 < b

    1. Initial program 61.7%

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

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

        \[\leadsto b \cdot \color{blue}{\left(a \cdot i + \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) + a \cdot i\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(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      5. sub-negN/A

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

    if -2.89999999999999992e79 < b < -1.50000000000000004e-127

    1. Initial program 72.6%

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

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

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

    if -1.50000000000000004e-127 < b < -2.1499999999999999e-272

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6466.9

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

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

    if -2.1499999999999999e-272 < b < 7.00000000000000013e-191

    1. Initial program 77.2%

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

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

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

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{t \cdot a}\right) \]
      5. *-lowering-*.f6457.9

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{t \cdot a}\right) \]
    5. Simplified57.9%

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

    if 7.00000000000000013e-191 < b < 2.09999999999999991e65

    1. Initial program 76.5%

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{a \cdot \left(t \cdot x\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. *-lowering-*.f6461.7

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\left(\color{blue}{\left(j \cdot y\right) \cdot i} + a \cdot \left(t \cdot x\right)\right)\right) \]
      6. associate-*l*N/A

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(j, i \cdot y, \color{blue}{\left(t \cdot x\right) \cdot a}\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(j, i \cdot y, \color{blue}{t \cdot \left(a \cdot x\right)}\right)\right) \]
      14. *-lowering-*.f6463.2

        \[\leadsto -\mathsf{fma}\left(j, i \cdot y, t \cdot \color{blue}{\left(a \cdot x\right)}\right) \]
    8. Simplified63.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+79}:\\ \;\;\;\;b \cdot \mathsf{fma}\left(c, -z, a \cdot i\right)\\ \mathbf{elif}\;b \leq -1.5 \cdot 10^{-127}:\\ \;\;\;\;y \cdot \mathsf{fma}\left(j, -i, x \cdot z\right)\\ \mathbf{elif}\;b \leq -2.15 \cdot 10^{-272}:\\ \;\;\;\;j \cdot \mathsf{fma}\left(c, t, -y \cdot i\right)\\ \mathbf{elif}\;b \leq 7 \cdot 10^{-191}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+65}:\\ \;\;\;\;-\mathsf{fma}\left(j, y \cdot i, t \cdot \left(x \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \mathsf{fma}\left(c, -z, a \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 64.2% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 65.7%

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{a \cdot \left(t \cdot x\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. *-lowering-*.f6464.5

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

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

    if -4.00000000000000036e25 < j < 0.23499999999999999

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6478.2

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

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

    if 0.23499999999999999 < j

    1. Initial program 72.6%

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

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

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

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

Alternative 4: 61.7% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.70000000000000009e80 or 6.6e62 < b

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{z \cdot y}, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), i \cdot a\right)\right) \]
      2. *-lowering-*.f6478.1

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

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

    if -4.70000000000000009e80 < b < 6.6e62

    1. Initial program 75.3%

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{a \cdot \left(t \cdot x\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. *-lowering-*.f6461.9

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

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

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

Alternative 5: 57.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.18 \cdot 10^{+47}:\\
\;\;\;\;j \cdot \mathsf{fma}\left(c, t, -y \cdot i\right)\\

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

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


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

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6463.6

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

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

    if -1.18e47 < j < 0.154999999999999999

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{z \cdot y}, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), i \cdot a\right)\right) \]
      2. *-lowering-*.f6466.7

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

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

    if 0.154999999999999999 < j

    1. Initial program 72.6%

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

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

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

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

Alternative 6: 49.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -9500000:\\
\;\;\;\;j \cdot \mathsf{fma}\left(c, t, -y \cdot i\right)\\

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

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

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


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

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6462.8

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

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

    if -9.5e6 < j < -1.1e-255

    1. Initial program 77.7%

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

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

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

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

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

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

    if -1.1e-255 < j < 0.115000000000000005

    1. Initial program 66.6%

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

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

        \[\leadsto b \cdot \color{blue}{\left(a \cdot i + \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) + a \cdot i\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(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      5. sub-negN/A

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

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

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right) \]
      18. *-lowering-*.f6464.6

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

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

    if 0.115000000000000005 < j

    1. Initial program 72.6%

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

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

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

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

Alternative 7: 43.5% accurate, 1.6× speedup?

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

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

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

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

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


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

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot \mathsf{fma}\left(j, t, b \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right) \]
      10. neg-lowering-neg.f6453.8

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

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

    if -5.29999999999999986e57 < j < -7.50000000000000052e-259

    1. Initial program 76.0%

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

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

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

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

        \[\leadsto a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(t \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 a \cdot \left(\color{blue}{t \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 a \cdot \left(t \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 a \cdot \left(t \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 a \cdot \left(t \cdot \left(-1 \cdot x\right) + \color{blue}{b \cdot i}\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

    if -7.50000000000000052e-259 < j < 2.3499999999999999e141

    1. Initial program 68.5%

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

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

        \[\leadsto b \cdot \color{blue}{\left(a \cdot i + \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) + a \cdot i\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(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      5. sub-negN/A

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

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

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right) \]
      18. *-lowering-*.f6460.5

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

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

    if 2.3499999999999999e141 < j

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6467.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 42.0% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -5.4000000000000002e141 or 5.40000000000000034e137 < j

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6466.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4000000000000002e141 < j < -2.2999999999999999e-255

    1. Initial program 76.6%

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

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

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

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

        \[\leadsto a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(t \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 a \cdot \left(\color{blue}{t \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 a \cdot \left(t \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 a \cdot \left(t \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 a \cdot \left(t \cdot \left(-1 \cdot x\right) + \color{blue}{b \cdot i}\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

    if -2.2999999999999999e-255 < j < 5.40000000000000034e137

    1. Initial program 68.5%

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

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

        \[\leadsto b \cdot \color{blue}{\left(a \cdot i + \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) + a \cdot i\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(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      5. sub-negN/A

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

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

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right) \]
      18. *-lowering-*.f6460.5

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

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

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

Alternative 9: 52.1% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.45000000000000005e75 or 6.20000000000000038e93 < b

    1. Initial program 60.1%

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

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

        \[\leadsto b \cdot \color{blue}{\left(a \cdot i + \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) + a \cdot i\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(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      5. sub-negN/A

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(a \cdot i\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(a \cdot i\right)\right)\right)\right)\right)} \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

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

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

        \[\leadsto b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right) \]
      18. *-lowering-*.f6476.6

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

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

    if -2.45000000000000005e75 < b < 6.20000000000000038e93

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6451.4

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

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

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

Alternative 10: 45.1% accurate, 2.0× speedup?

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

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

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

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


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

    1. Initial program 60.9%

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

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

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

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

        \[\leadsto a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(t \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 a \cdot \left(\color{blue}{t \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 a \cdot \left(t \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 a \cdot \left(t \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 a \cdot \left(t \cdot \left(-1 \cdot x\right) + \color{blue}{b \cdot i}\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

    if -9.99999999999999945e65 < t < 1.5499999999999999e-21

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

    if 1.5499999999999999e-21 < t

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 41.2% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.6999999999999999e141 or 0.220000000000000001 < j

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6999999999999999e141 < j < 0.220000000000000001

    1. Initial program 71.3%

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

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

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

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

        \[\leadsto a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(t \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 a \cdot \left(\color{blue}{t \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 a \cdot \left(t \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 a \cdot \left(t \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 a \cdot \left(t \cdot \left(-1 \cdot x\right) + \color{blue}{b \cdot i}\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

Alternative 12: 29.3% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(b \cdot i\right)\\ \mathbf{if}\;i \leq -7.8 \cdot 10^{+155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq -4.5 \cdot 10^{+56}:\\ \;\;\;\;j \cdot \left(t \cdot c\right)\\ \mathbf{elif}\;i \leq 1.1 \cdot 10^{-57}:\\ \;\;\;\;x \cdot \left(y \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 (* b i))))
   (if (<= i -7.8e+155)
     t_1
     (if (<= i -4.5e+56)
       (* j (* t c))
       (if (<= i 1.1e-57) (* x (* y 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 * (b * i);
	double tmp;
	if (i <= -7.8e+155) {
		tmp = t_1;
	} else if (i <= -4.5e+56) {
		tmp = j * (t * c);
	} else if (i <= 1.1e-57) {
		tmp = x * (y * z);
	} 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 * (b * i)
    if (i <= (-7.8d+155)) then
        tmp = t_1
    else if (i <= (-4.5d+56)) then
        tmp = j * (t * c)
    else if (i <= 1.1d-57) then
        tmp = x * (y * z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = a * (b * i);
	double tmp;
	if (i <= -7.8e+155) {
		tmp = t_1;
	} else if (i <= -4.5e+56) {
		tmp = j * (t * c);
	} else if (i <= 1.1e-57) {
		tmp = x * (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = a * (b * i)
	tmp = 0
	if i <= -7.8e+155:
		tmp = t_1
	elif i <= -4.5e+56:
		tmp = j * (t * c)
	elif i <= 1.1e-57:
		tmp = x * (y * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(a * Float64(b * i))
	tmp = 0.0
	if (i <= -7.8e+155)
		tmp = t_1;
	elseif (i <= -4.5e+56)
		tmp = Float64(j * Float64(t * c));
	elseif (i <= 1.1e-57)
		tmp = Float64(x * Float64(y * z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = a * (b * i);
	tmp = 0.0;
	if (i <= -7.8e+155)
		tmp = t_1;
	elseif (i <= -4.5e+56)
		tmp = j * (t * c);
	elseif (i <= 1.1e-57)
		tmp = x * (y * z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -7.8e+155], t$95$1, If[LessEqual[i, -4.5e+56], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.1e-57], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot i\right)\\
\mathbf{if}\;i \leq -7.8 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq -4.5 \cdot 10^{+56}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\

\mathbf{elif}\;i \leq 1.1 \cdot 10^{-57}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -7.7999999999999996e155 or 1.09999999999999999e-57 < i

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6458.7

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified41.3%

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

    if -7.7999999999999996e155 < i < -4.5000000000000003e56

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot \mathsf{fma}\left(j, t, b \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right) \]
      10. neg-lowering-neg.f6453.5

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

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

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

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

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

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

        \[\leadsto \color{blue}{j \cdot \left(c \cdot t\right)} \]
      5. *-lowering-*.f6449.4

        \[\leadsto j \cdot \color{blue}{\left(c \cdot t\right)} \]
    8. Simplified49.4%

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

    if -4.5000000000000003e56 < i < 1.09999999999999999e-57

    1. Initial program 74.8%

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

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

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

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{t \cdot a}\right) \]
      5. *-lowering-*.f6453.4

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

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

      \[\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-*.f6434.4

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

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

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

Alternative 13: 30.2% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;j \leq 0.14:\\
\;\;\;\;i \cdot \left(a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -2.6500000000000001e124 or 0.14000000000000001 < j

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6466.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6500000000000001e124 < j < 0.14000000000000001

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6474.0

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified32.3%

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

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

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

        \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot i} \]
      4. *-lowering-*.f6435.6

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot i \]
    10. Applied egg-rr35.6%

      \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -2.65 \cdot 10^{+124}:\\ \;\;\;\;y \cdot \left(i \cdot \left(-j\right)\right)\\ \mathbf{elif}\;j \leq 0.14:\\ \;\;\;\;i \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(i \cdot \left(-j\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 30.0% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;j \leq 0.23:\\
\;\;\;\;i \cdot \left(a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -3.19999999999999986e128 or 0.23000000000000001 < j

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6466.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999986e128 < j < 0.23000000000000001

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6474.0

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified32.3%

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

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

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

        \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot i} \]
      4. *-lowering-*.f6435.6

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot i \]
    10. Applied egg-rr35.6%

      \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -3.2 \cdot 10^{+128}:\\ \;\;\;\;\left(-i\right) \cdot \left(y \cdot j\right)\\ \mathbf{elif}\;j \leq 0.23:\\ \;\;\;\;i \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-i\right) \cdot \left(y \cdot j\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 29.5% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;j \leq 0.21:\\
\;\;\;\;i \cdot \left(a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.40000000000000005e126 or 0.209999999999999992 < j

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto j \cdot \mathsf{fma}\left(c, t, y \cdot \color{blue}{\left(\mathsf{neg}\left(i\right)\right)}\right) \]
      9. neg-lowering-neg.f6466.0

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

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

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

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

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

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

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

    if -1.40000000000000005e126 < j < 0.209999999999999992

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6474.0

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified32.3%

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

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

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

        \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot i} \]
      4. *-lowering-*.f6435.6

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot i \]
    10. Applied egg-rr35.6%

      \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.4 \cdot 10^{+126}:\\ \;\;\;\;-j \cdot \left(y \cdot i\right)\\ \mathbf{elif}\;j \leq 0.21:\\ \;\;\;\;i \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-j \cdot \left(y \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 30.3% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -20:\\ \;\;\;\;i \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;i \leq 1.15 \cdot 10^{-57}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot i\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= i -20.0)
   (* i (* a b))
   (if (<= i 1.15e-57) (* y (* x z)) (* a (* b i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (i <= -20.0) {
		tmp = i * (a * b);
	} else if (i <= 1.15e-57) {
		tmp = y * (x * z);
	} else {
		tmp = a * (b * i);
	}
	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 (i <= (-20.0d0)) then
        tmp = i * (a * b)
    else if (i <= 1.15d-57) then
        tmp = y * (x * z)
    else
        tmp = a * (b * i)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (i <= -20.0) {
		tmp = i * (a * b);
	} else if (i <= 1.15e-57) {
		tmp = y * (x * z);
	} else {
		tmp = a * (b * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if i <= -20.0:
		tmp = i * (a * b)
	elif i <= 1.15e-57:
		tmp = y * (x * z)
	else:
		tmp = a * (b * i)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (i <= -20.0)
		tmp = Float64(i * Float64(a * b));
	elseif (i <= 1.15e-57)
		tmp = Float64(y * Float64(x * z));
	else
		tmp = Float64(a * Float64(b * i));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (i <= -20.0)
		tmp = i * (a * b);
	elseif (i <= 1.15e-57)
		tmp = y * (x * z);
	else
		tmp = a * (b * i);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -20.0], N[(i * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.15e-57], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -20:\\
\;\;\;\;i \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;i \leq 1.15 \cdot 10^{-57}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\

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


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

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6460.6

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified32.1%

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

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

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

        \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot i} \]
      4. *-lowering-*.f6437.7

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot i \]
    10. Applied egg-rr37.7%

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

    if -20 < i < 1.15e-57

    1. Initial program 79.5%

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

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

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

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{t \cdot a}\right) \]
      5. *-lowering-*.f6453.9

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{t \cdot a}\right) \]
    5. Simplified53.9%

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

      \[\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-*.f6435.7

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

      \[\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-*.f6436.6

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

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

    if 1.15e-57 < i

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6457.7

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified43.3%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification39.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -20:\\ \;\;\;\;i \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;i \leq 1.15 \cdot 10^{-57}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 30.0% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -5 \cdot 10^{+17}:\\ \;\;\;\;i \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;i \leq 2.25 \cdot 10^{-57}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot i\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= i -5e+17)
   (* i (* a b))
   (if (<= i 2.25e-57) (* x (* y z)) (* a (* b i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (i <= -5e+17) {
		tmp = i * (a * b);
	} else if (i <= 2.25e-57) {
		tmp = x * (y * z);
	} else {
		tmp = a * (b * i);
	}
	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 (i <= (-5d+17)) then
        tmp = i * (a * b)
    else if (i <= 2.25d-57) then
        tmp = x * (y * z)
    else
        tmp = a * (b * i)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (i <= -5e+17) {
		tmp = i * (a * b);
	} else if (i <= 2.25e-57) {
		tmp = x * (y * z);
	} else {
		tmp = a * (b * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if i <= -5e+17:
		tmp = i * (a * b)
	elif i <= 2.25e-57:
		tmp = x * (y * z)
	else:
		tmp = a * (b * i)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (i <= -5e+17)
		tmp = Float64(i * Float64(a * b));
	elseif (i <= 2.25e-57)
		tmp = Float64(x * Float64(y * z));
	else
		tmp = Float64(a * Float64(b * i));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (i <= -5e+17)
		tmp = i * (a * b);
	elseif (i <= 2.25e-57)
		tmp = x * (y * z);
	else
		tmp = a * (b * i);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -5e+17], N[(i * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.25e-57], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -5 \cdot 10^{+17}:\\
\;\;\;\;i \cdot \left(a \cdot b\right)\\

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

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


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

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6461.1

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified31.1%

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

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

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

        \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot i} \]
      4. *-lowering-*.f6437.1

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot i \]
    10. Applied egg-rr37.1%

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

    if -5e17 < i < 2.24999999999999986e-57

    1. Initial program 77.4%

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

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

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

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{t \cdot a}\right) \]
      5. *-lowering-*.f6453.8

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

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

      \[\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.4

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

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

    if 2.24999999999999986e-57 < i

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6457.7

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified43.3%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification38.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -5 \cdot 10^{+17}:\\ \;\;\;\;i \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;i \leq 2.25 \cdot 10^{-57}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 29.3% accurate, 2.6× speedup?

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

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

\mathbf{elif}\;c \leq 2.9 \cdot 10^{-47}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.5499999999999999e141 or 2.9e-47 < c

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(j \cdot c\right)} \cdot t \]
      3. associate-*r*N/A

        \[\leadsto \color{blue}{j \cdot \left(c \cdot t\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(c \cdot t\right)} \]
      5. *-lowering-*.f6442.0

        \[\leadsto j \cdot \color{blue}{\left(c \cdot t\right)} \]
    8. Simplified42.0%

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t\right)} \]

    if -2.5499999999999999e141 < c < 2.9e-47

    1. Initial program 73.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) + \left(\mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, y \cdot z - a \cdot t, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{y \cdot z - a \cdot t}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{y \cdot z} - a \cdot t, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - \color{blue}{t \cdot a}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - \color{blue}{t \cdot a}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \color{blue}{b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right)}\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right)}\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right)}\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right)}\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(a \cdot i\right)\right)\right)}\right)\right)\right) \]
      12. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(\left(\mathsf{neg}\left(c \cdot z\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)}\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(\color{blue}{c \cdot \left(\mathsf{neg}\left(z\right)\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot z\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(c \cdot \left(-1 \cdot z\right) + \color{blue}{a \cdot i}\right)\right) \]
      16. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot z, a \cdot i\right)}\right) \]
      17. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot i\right)\right) \]
      18. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot i\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6466.0

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, -z, \color{blue}{i \cdot a}\right)\right) \]
    5. Simplified66.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, -z, i \cdot a\right)\right)} \]
    6. Taylor expanded in i around inf

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
      2. *-lowering-*.f6432.7

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified32.7%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.55 \cdot 10^{+141}:\\ \;\;\;\;j \cdot \left(t \cdot c\right)\\ \mathbf{elif}\;c \leq 2.9 \cdot 10^{-47}:\\ \;\;\;\;a \cdot \left(b \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(t \cdot c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 28.8% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(b \cdot i\right)\\ \mathbf{if}\;a \leq -2.05 \cdot 10^{-36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.56 \cdot 10^{-34}:\\ \;\;\;\;c \cdot \left(t \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 (* a (* b i))))
   (if (<= a -2.05e-36) t_1 (if (<= a 1.56e-34) (* c (* t 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 * (b * i);
	double tmp;
	if (a <= -2.05e-36) {
		tmp = t_1;
	} else if (a <= 1.56e-34) {
		tmp = c * (t * 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 = a * (b * i)
    if (a <= (-2.05d-36)) then
        tmp = t_1
    else if (a <= 1.56d-34) then
        tmp = c * (t * 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 = a * (b * i);
	double tmp;
	if (a <= -2.05e-36) {
		tmp = t_1;
	} else if (a <= 1.56e-34) {
		tmp = c * (t * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = a * (b * i)
	tmp = 0
	if a <= -2.05e-36:
		tmp = t_1
	elif a <= 1.56e-34:
		tmp = c * (t * j)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(a * Float64(b * i))
	tmp = 0.0
	if (a <= -2.05e-36)
		tmp = t_1;
	elseif (a <= 1.56e-34)
		tmp = Float64(c * Float64(t * j));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = a * (b * i);
	tmp = 0.0;
	if (a <= -2.05e-36)
		tmp = t_1;
	elseif (a <= 1.56e-34)
		tmp = c * (t * 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[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.05e-36], t$95$1, If[LessEqual[a, 1.56e-34], N[(c * N[(t * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot i\right)\\
\mathbf{if}\;a \leq -2.05 \cdot 10^{-36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.56 \cdot 10^{-34}:\\
\;\;\;\;c \cdot \left(t \cdot j\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.05000000000000006e-36 or 1.55999999999999992e-34 < a

    1. Initial program 61.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing
    3. Taylor expanded in j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) + \left(\mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, y \cdot z - a \cdot t, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{y \cdot z - a \cdot t}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{y \cdot z} - a \cdot t, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - \color{blue}{t \cdot a}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - \color{blue}{t \cdot a}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \color{blue}{b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right)}\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right)}\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right)}\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right)}\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(a \cdot i\right)\right)\right)}\right)\right)\right) \]
      12. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(\left(\mathsf{neg}\left(c \cdot z\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)}\right) \]
      13. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(\color{blue}{c \cdot \left(\mathsf{neg}\left(z\right)\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot z\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)\right) \]
      15. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(c \cdot \left(-1 \cdot z\right) + \color{blue}{a \cdot i}\right)\right) \]
      16. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot z, a \cdot i\right)}\right) \]
      17. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot i\right)\right) \]
      18. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot i\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
      20. *-lowering-*.f6466.6

        \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, -z, \color{blue}{i \cdot a}\right)\right) \]
    5. Simplified66.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, -z, i \cdot a\right)\right)} \]
    6. Taylor expanded in i around inf

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
      2. *-lowering-*.f6442.5

        \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    8. Simplified42.5%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]

    if -2.05000000000000006e-36 < a < 1.55999999999999992e-34

    1. Initial program 79.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Add Preprocessing
    3. Taylor expanded in c around inf

      \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(j \cdot t - b \cdot z\right)} \]
      2. sub-negN/A

        \[\leadsto c \cdot \color{blue}{\left(j \cdot t + \left(\mathsf{neg}\left(b \cdot z\right)\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto c \cdot \left(j \cdot t + \color{blue}{-1 \cdot \left(b \cdot z\right)}\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto c \cdot \color{blue}{\mathsf{fma}\left(j, t, -1 \cdot \left(b \cdot z\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto c \cdot \mathsf{fma}\left(j, t, \color{blue}{\mathsf{neg}\left(b \cdot z\right)}\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto c \cdot \mathsf{fma}\left(j, t, \color{blue}{b \cdot \left(\mathsf{neg}\left(z\right)\right)}\right) \]
      7. mul-1-negN/A

        \[\leadsto c \cdot \mathsf{fma}\left(j, t, b \cdot \color{blue}{\left(-1 \cdot z\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(j, t, \color{blue}{b \cdot \left(-1 \cdot z\right)}\right) \]
      9. mul-1-negN/A

        \[\leadsto c \cdot \mathsf{fma}\left(j, t, b \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right) \]
      10. neg-lowering-neg.f6448.5

        \[\leadsto c \cdot \mathsf{fma}\left(j, t, b \cdot \color{blue}{\left(-z\right)}\right) \]
    5. Simplified48.5%

      \[\leadsto \color{blue}{c \cdot \mathsf{fma}\left(j, t, b \cdot \left(-z\right)\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto c \cdot \color{blue}{\left(t \cdot j\right)} \]
      2. *-lowering-*.f6426.4

        \[\leadsto c \cdot \color{blue}{\left(t \cdot j\right)} \]
    8. Simplified26.4%

      \[\leadsto c \cdot \color{blue}{\left(t \cdot j\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 22.1% accurate, 5.5× speedup?

\[\begin{array}{l} \\ a \cdot \left(b \cdot i\right) \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* a (* b i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return a * (b * i);
}
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 * (b * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return a * (b * i);
}
def code(x, y, z, t, a, b, c, i, j):
	return a * (b * i)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(a * Float64(b * i))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = a * (b * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
a \cdot \left(b \cdot i\right)
\end{array}
Derivation
  1. Initial program 69.8%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
  2. Add Preprocessing
  3. Taylor expanded in j around 0

    \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
  4. Step-by-step derivation
    1. sub-negN/A

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) + \left(\mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right)} \]
    2. accelerator-lowering-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y \cdot z - a \cdot t, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right)} \]
    3. --lowering--.f64N/A

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{y \cdot z - a \cdot t}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{y \cdot z} - a \cdot t, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - \color{blue}{t \cdot a}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - \color{blue}{t \cdot a}, \mathsf{neg}\left(b \cdot \left(c \cdot z - a \cdot i\right)\right)\right) \]
    7. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \color{blue}{b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right)}\right) \]
    8. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right)}\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right)}\right) \]
    10. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right)}\right) \]
    11. sub-negN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(a \cdot i\right)\right)\right)}\right)\right)\right) \]
    12. distribute-neg-inN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\left(\left(\mathsf{neg}\left(c \cdot z\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)}\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(\color{blue}{c \cdot \left(\mathsf{neg}\left(z\right)\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)\right) \]
    14. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(c \cdot \color{blue}{\left(-1 \cdot z\right)} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a \cdot i\right)\right)\right)\right)\right)\right) \]
    15. remove-double-negN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \left(c \cdot \left(-1 \cdot z\right) + \color{blue}{a \cdot i}\right)\right) \]
    16. accelerator-lowering-fma.f64N/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot z, a \cdot i\right)}\right) \]
    17. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot i\right)\right) \]
    18. neg-lowering-neg.f64N/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(z\right)}, a \cdot i\right)\right) \]
    19. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, \mathsf{neg}\left(z\right), \color{blue}{i \cdot a}\right)\right) \]
    20. *-lowering-*.f6462.8

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, -z, \color{blue}{i \cdot a}\right)\right) \]
  5. Simplified62.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, y \cdot z - t \cdot a, b \cdot \mathsf{fma}\left(c, -z, i \cdot a\right)\right)} \]
  6. Taylor expanded in i around inf

    \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
  7. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
    2. *-lowering-*.f6427.1

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  8. Simplified27.1%

    \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} \]
  9. Add Preprocessing

Developer Target 1: 70.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1
         (+
          (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
          (/
           (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
           (+ (* c t) (* i y)))))
        (t_2
         (-
          (* x (- (* z y) (* a t)))
          (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
   (if (< t -8.120978919195912e-33)
     t_2
     (if (< t -4.712553818218485e-169)
       t_1
       (if (< t -7.633533346031584e-308)
         t_2
         (if (< t 1.0535888557455487e-139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	double tmp;
	if (t < -8.120978919195912e-33) {
		tmp = t_2;
	} else if (t < -4.712553818218485e-169) {
		tmp = t_1;
	} else if (t < -7.633533346031584e-308) {
		tmp = t_2;
	} else if (t < 1.0535888557455487e-139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
    t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
    if (t < (-8.120978919195912d-33)) then
        tmp = t_2
    else if (t < (-4.712553818218485d-169)) then
        tmp = t_1
    else if (t < (-7.633533346031584d-308)) then
        tmp = t_2
    else if (t < 1.0535888557455487d-139) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	double tmp;
	if (t < -8.120978919195912e-33) {
		tmp = t_2;
	} else if (t < -4.712553818218485e-169) {
		tmp = t_1;
	} else if (t < -7.633533346031584e-308) {
		tmp = t_2;
	} else if (t < 1.0535888557455487e-139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y)))
	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
	tmp = 0
	if t < -8.120978919195912e-33:
		tmp = t_2
	elif t < -4.712553818218485e-169:
		tmp = t_1
	elif t < -7.633533346031584e-308:
		tmp = t_2
	elif t < 1.0535888557455487e-139:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y))))
	t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j)))
	tmp = 0.0
	if (t < -8.120978919195912e-33)
		tmp = t_2;
	elseif (t < -4.712553818218485e-169)
		tmp = t_1;
	elseif (t < -7.633533346031584e-308)
		tmp = t_2;
	elseif (t < 1.0535888557455487e-139)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y)));
	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	tmp = 0.0;
	if (t < -8.120978919195912e-33)
		tmp = t_2;
	elseif (t < -4.712553818218485e-169)
		tmp = t_1;
	elseif (t < -7.633533346031584e-308)
		tmp = t_2;
	elseif (t < 1.0535888557455487e-139)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024199 
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))