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

Percentage Accurate: 73.9% → 82.5%
Time: 35.6s
Alternatives: 21
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 73.9% accurate, 1.0× speedup?

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

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

Alternative 1: 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(t \cdot i - z \cdot c\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(t \cdot b - y \cdot j\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1
         (+
          (+ (* x (- (* y z) (* t a))) (* b (- (* t i) (* z c))))
          (* j (- (* a c) (* y i))))))
   (if (<= t_1 INFINITY) t_1 (* i (- (* t b) (* y j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) + (b * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i)));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = i * ((t * b) - (y * j));
	}
	return tmp;
}
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 * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i)));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = i * ((t * b) - (y * j));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((x * ((y * z) - (t * a))) + (b * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i)))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = i * ((t * b) - (y * j))
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + Float64(b * Float64(Float64(t * i) - Float64(z * c)))) + Float64(j * Float64(Float64(a * c) - Float64(y * i))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(i * Float64(Float64(t * b) - Float64(y * j)));
	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 * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i)));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = i * ((t * b) - (y * j));
	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[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(i * N[(N[(t * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 89.3%

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--52.9%

        \[\leadsto i \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y - b \cdot t\right)\right)} \]
      2. *-commutative52.9%

        \[\leadsto i \cdot \left(-1 \cdot \left(\color{blue}{y \cdot j} - b \cdot t\right)\right) \]
      3. *-commutative52.9%

        \[\leadsto i \cdot \left(-1 \cdot \left(y \cdot j - \color{blue}{t \cdot b}\right)\right) \]
    5. Simplified52.9%

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

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - b \cdot t\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg52.9%

        \[\leadsto \color{blue}{-i \cdot \left(j \cdot y - b \cdot t\right)} \]
      2. cancel-sign-sub-inv52.9%

        \[\leadsto -i \cdot \color{blue}{\left(j \cdot y + \left(-b\right) \cdot t\right)} \]
      3. *-commutative52.9%

        \[\leadsto -i \cdot \left(\color{blue}{y \cdot j} + \left(-b\right) \cdot t\right) \]
      4. *-commutative52.9%

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

        \[\leadsto -i \cdot \color{blue}{\mathsf{fma}\left(y, j, t \cdot \left(-b\right)\right)} \]
      6. distribute-rgt-neg-in52.9%

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

        \[\leadsto i \cdot \left(-\color{blue}{\left(y \cdot j + t \cdot \left(-b\right)\right)}\right) \]
      8. distribute-neg-out52.9%

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

        \[\leadsto i \cdot \color{blue}{\left(\left(-t \cdot \left(-b\right)\right) + \left(-y \cdot j\right)\right)} \]
      10. unsub-neg52.9%

        \[\leadsto i \cdot \color{blue}{\left(\left(-t \cdot \left(-b\right)\right) - y \cdot j\right)} \]
      11. distribute-rgt-neg-in52.9%

        \[\leadsto i \cdot \left(\color{blue}{t \cdot \left(-\left(-b\right)\right)} - y \cdot j\right) \]
      12. remove-double-neg52.9%

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

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

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

Alternative 2: 50.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b \cdot i - x \cdot a\right)\\ t_2 := c \cdot \left(a \cdot j - z \cdot b\right)\\ t_3 := z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{if}\;z \leq -2.15 \cdot 10^{-14}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{-191}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-238}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-258}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-235}:\\ \;\;\;\;b \cdot \left(t \cdot i\right) - a \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;z \leq 4.15 \cdot 10^{-134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* t (- (* b i) (* x a))))
        (t_2 (* c (- (* a j) (* z b))))
        (t_3 (* z (- (* x y) (* b c)))))
   (if (<= z -2.15e-14)
     t_3
     (if (<= z -1.08e-191)
       (* a (- (* c j) (* x t)))
       (if (<= z -3.4e-238)
         t_1
         (if (<= z -1.6e-258)
           t_2
           (if (<= z 1.5e-235)
             (- (* b (* t i)) (* a (* x t)))
             (if (<= z 4.15e-134)
               t_1
               (if (<= z 1.1e-45) t_2 (if (<= z 1.15e+27) t_1 t_3))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = t * ((b * i) - (x * a));
	double t_2 = c * ((a * j) - (z * b));
	double t_3 = z * ((x * y) - (b * c));
	double tmp;
	if (z <= -2.15e-14) {
		tmp = t_3;
	} else if (z <= -1.08e-191) {
		tmp = a * ((c * j) - (x * t));
	} else if (z <= -3.4e-238) {
		tmp = t_1;
	} else if (z <= -1.6e-258) {
		tmp = t_2;
	} else if (z <= 1.5e-235) {
		tmp = (b * (t * i)) - (a * (x * t));
	} else if (z <= 4.15e-134) {
		tmp = t_1;
	} else if (z <= 1.1e-45) {
		tmp = t_2;
	} else if (z <= 1.15e+27) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = t * ((b * i) - (x * a))
    t_2 = c * ((a * j) - (z * b))
    t_3 = z * ((x * y) - (b * c))
    if (z <= (-2.15d-14)) then
        tmp = t_3
    else if (z <= (-1.08d-191)) then
        tmp = a * ((c * j) - (x * t))
    else if (z <= (-3.4d-238)) then
        tmp = t_1
    else if (z <= (-1.6d-258)) then
        tmp = t_2
    else if (z <= 1.5d-235) then
        tmp = (b * (t * i)) - (a * (x * t))
    else if (z <= 4.15d-134) then
        tmp = t_1
    else if (z <= 1.1d-45) then
        tmp = t_2
    else if (z <= 1.15d+27) then
        tmp = t_1
    else
        tmp = t_3
    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 = t * ((b * i) - (x * a));
	double t_2 = c * ((a * j) - (z * b));
	double t_3 = z * ((x * y) - (b * c));
	double tmp;
	if (z <= -2.15e-14) {
		tmp = t_3;
	} else if (z <= -1.08e-191) {
		tmp = a * ((c * j) - (x * t));
	} else if (z <= -3.4e-238) {
		tmp = t_1;
	} else if (z <= -1.6e-258) {
		tmp = t_2;
	} else if (z <= 1.5e-235) {
		tmp = (b * (t * i)) - (a * (x * t));
	} else if (z <= 4.15e-134) {
		tmp = t_1;
	} else if (z <= 1.1e-45) {
		tmp = t_2;
	} else if (z <= 1.15e+27) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = t * ((b * i) - (x * a))
	t_2 = c * ((a * j) - (z * b))
	t_3 = z * ((x * y) - (b * c))
	tmp = 0
	if z <= -2.15e-14:
		tmp = t_3
	elif z <= -1.08e-191:
		tmp = a * ((c * j) - (x * t))
	elif z <= -3.4e-238:
		tmp = t_1
	elif z <= -1.6e-258:
		tmp = t_2
	elif z <= 1.5e-235:
		tmp = (b * (t * i)) - (a * (x * t))
	elif z <= 4.15e-134:
		tmp = t_1
	elif z <= 1.1e-45:
		tmp = t_2
	elif z <= 1.15e+27:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(t * Float64(Float64(b * i) - Float64(x * a)))
	t_2 = Float64(c * Float64(Float64(a * j) - Float64(z * b)))
	t_3 = Float64(z * Float64(Float64(x * y) - Float64(b * c)))
	tmp = 0.0
	if (z <= -2.15e-14)
		tmp = t_3;
	elseif (z <= -1.08e-191)
		tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t)));
	elseif (z <= -3.4e-238)
		tmp = t_1;
	elseif (z <= -1.6e-258)
		tmp = t_2;
	elseif (z <= 1.5e-235)
		tmp = Float64(Float64(b * Float64(t * i)) - Float64(a * Float64(x * t)));
	elseif (z <= 4.15e-134)
		tmp = t_1;
	elseif (z <= 1.1e-45)
		tmp = t_2;
	elseif (z <= 1.15e+27)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = t * ((b * i) - (x * a));
	t_2 = c * ((a * j) - (z * b));
	t_3 = z * ((x * y) - (b * c));
	tmp = 0.0;
	if (z <= -2.15e-14)
		tmp = t_3;
	elseif (z <= -1.08e-191)
		tmp = a * ((c * j) - (x * t));
	elseif (z <= -3.4e-238)
		tmp = t_1;
	elseif (z <= -1.6e-258)
		tmp = t_2;
	elseif (z <= 1.5e-235)
		tmp = (b * (t * i)) - (a * (x * t));
	elseif (z <= 4.15e-134)
		tmp = t_1;
	elseif (z <= 1.1e-45)
		tmp = t_2;
	elseif (z <= 1.15e+27)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e-14], t$95$3, If[LessEqual[z, -1.08e-191], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.4e-238], t$95$1, If[LessEqual[z, -1.6e-258], t$95$2, If[LessEqual[z, 1.5e-235], N[(N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.15e-134], t$95$1, If[LessEqual[z, 1.1e-45], t$95$2, If[LessEqual[z, 1.15e+27], t$95$1, t$95$3]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(b \cdot i - x \cdot a\right)\\
t_2 := c \cdot \left(a \cdot j - z \cdot b\right)\\
t_3 := z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{-14}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq -1.08 \cdot 10^{-191}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-238}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-258}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-235}:\\
\;\;\;\;b \cdot \left(t \cdot i\right) - a \cdot \left(x \cdot t\right)\\

\mathbf{elif}\;z \leq 4.15 \cdot 10^{-134}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-45}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+27}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.14999999999999999e-14 or 1.15e27 < z

    1. Initial program 63.3%

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

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

    if -2.14999999999999999e-14 < z < -1.07999999999999996e-191

    1. Initial program 89.6%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative66.1%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg66.1%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg66.1%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative66.1%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative66.1%

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

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

    if -1.07999999999999996e-191 < z < -3.39999999999999983e-238 or 1.4999999999999999e-235 < z < 4.15e-134 or 1.09999999999999997e-45 < z < 1.15e27

    1. Initial program 83.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg83.1%

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \color{blue}{\left(c \cdot z + \left(-t \cdot i\right)\right)}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      2. distribute-rgt-in81.0%

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

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\color{blue}{\left(z \cdot c\right)} \cdot b + \left(-t \cdot i\right) \cdot b\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      4. distribute-rgt-neg-in81.0%

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

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg67.1%

        \[\leadsto t \cdot \left(\color{blue}{\left(-a \cdot x\right)} - -1 \cdot \left(b \cdot i\right)\right) \]
      2. *-commutative67.1%

        \[\leadsto t \cdot \left(\left(-\color{blue}{x \cdot a}\right) - -1 \cdot \left(b \cdot i\right)\right) \]
      3. neg-sub067.1%

        \[\leadsto t \cdot \left(\color{blue}{\left(0 - x \cdot a\right)} - -1 \cdot \left(b \cdot i\right)\right) \]
      4. neg-mul-167.1%

        \[\leadsto t \cdot \left(\left(0 - x \cdot a\right) - \color{blue}{\left(-b \cdot i\right)}\right) \]
      5. associate--r+67.1%

        \[\leadsto t \cdot \color{blue}{\left(0 - \left(x \cdot a + \left(-b \cdot i\right)\right)\right)} \]
      6. +-commutative67.1%

        \[\leadsto t \cdot \left(0 - \color{blue}{\left(\left(-b \cdot i\right) + x \cdot a\right)}\right) \]
      7. associate--r+67.1%

        \[\leadsto t \cdot \color{blue}{\left(\left(0 - \left(-b \cdot i\right)\right) - x \cdot a\right)} \]
      8. neg-sub067.1%

        \[\leadsto t \cdot \left(\color{blue}{\left(-\left(-b \cdot i\right)\right)} - x \cdot a\right) \]
      9. remove-double-neg67.1%

        \[\leadsto t \cdot \left(\color{blue}{b \cdot i} - x \cdot a\right) \]
      10. *-commutative67.1%

        \[\leadsto t \cdot \left(b \cdot i - \color{blue}{a \cdot x}\right) \]
    7. Simplified67.1%

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

    if -3.39999999999999983e-238 < z < -1.6000000000000001e-258 or 4.15e-134 < z < 1.09999999999999997e-45

    1. Initial program 60.8%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative76.0%

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

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

    if -1.6000000000000001e-258 < z < 1.4999999999999999e-235

    1. Initial program 87.5%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--67.7%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
      2. *-commutative67.7%

        \[\leadsto t \cdot \left(-1 \cdot \left(\color{blue}{x \cdot a} - b \cdot i\right)\right) \]
      3. *-commutative67.7%

        \[\leadsto t \cdot \left(-1 \cdot \left(x \cdot a - \color{blue}{i \cdot b}\right)\right) \]
    5. Simplified67.7%

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot a - i \cdot b\right)\right)} \]
    6. Taylor expanded in x around 0 73.9%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + b \cdot \left(i \cdot t\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification67.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{-14}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{-191}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-238}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-258}:\\ \;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-235}:\\ \;\;\;\;b \cdot \left(t \cdot i\right) - a \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;z \leq 4.15 \cdot 10^{-134}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-45}:\\ \;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 50.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t \cdot i - z \cdot c\right)\\ t_2 := x \cdot \left(y \cdot z - t \cdot a\right)\\ \mathbf{if}\;x \leq -7200000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-170}:\\ \;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-303}:\\ \;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{elif}\;x \leq 5.9 \cdot 10^{-62} \lor \neg \left(x \leq 8.5 \cdot 10^{+51}\right) \land x \leq 3.5 \cdot 10^{+177}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* b (- (* t i) (* z c)))) (t_2 (* x (- (* y z) (* t a)))))
   (if (<= x -7200000000.0)
     t_2
     (if (<= x -3.1e-170)
       (* c (- (* a j) (* z b)))
       (if (<= x -4.4e-273)
         t_1
         (if (<= x 1.25e-303)
           (* j (- (* a c) (* y i)))
           (if (or (<= x 5.9e-62) (and (not (<= x 8.5e+51)) (<= x 3.5e+177)))
             t_1
             t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = b * ((t * i) - (z * c));
	double t_2 = x * ((y * z) - (t * a));
	double tmp;
	if (x <= -7200000000.0) {
		tmp = t_2;
	} else if (x <= -3.1e-170) {
		tmp = c * ((a * j) - (z * b));
	} else if (x <= -4.4e-273) {
		tmp = t_1;
	} else if (x <= 1.25e-303) {
		tmp = j * ((a * c) - (y * i));
	} else if ((x <= 5.9e-62) || (!(x <= 8.5e+51) && (x <= 3.5e+177))) {
		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 = b * ((t * i) - (z * c))
    t_2 = x * ((y * z) - (t * a))
    if (x <= (-7200000000.0d0)) then
        tmp = t_2
    else if (x <= (-3.1d-170)) then
        tmp = c * ((a * j) - (z * b))
    else if (x <= (-4.4d-273)) then
        tmp = t_1
    else if (x <= 1.25d-303) then
        tmp = j * ((a * c) - (y * i))
    else if ((x <= 5.9d-62) .or. (.not. (x <= 8.5d+51)) .and. (x <= 3.5d+177)) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = b * ((t * i) - (z * c));
	double t_2 = x * ((y * z) - (t * a));
	double tmp;
	if (x <= -7200000000.0) {
		tmp = t_2;
	} else if (x <= -3.1e-170) {
		tmp = c * ((a * j) - (z * b));
	} else if (x <= -4.4e-273) {
		tmp = t_1;
	} else if (x <= 1.25e-303) {
		tmp = j * ((a * c) - (y * i));
	} else if ((x <= 5.9e-62) || (!(x <= 8.5e+51) && (x <= 3.5e+177))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = b * ((t * i) - (z * c))
	t_2 = x * ((y * z) - (t * a))
	tmp = 0
	if x <= -7200000000.0:
		tmp = t_2
	elif x <= -3.1e-170:
		tmp = c * ((a * j) - (z * b))
	elif x <= -4.4e-273:
		tmp = t_1
	elif x <= 1.25e-303:
		tmp = j * ((a * c) - (y * i))
	elif (x <= 5.9e-62) or (not (x <= 8.5e+51) and (x <= 3.5e+177)):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(b * Float64(Float64(t * i) - Float64(z * c)))
	t_2 = Float64(x * Float64(Float64(y * z) - Float64(t * a)))
	tmp = 0.0
	if (x <= -7200000000.0)
		tmp = t_2;
	elseif (x <= -3.1e-170)
		tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b)));
	elseif (x <= -4.4e-273)
		tmp = t_1;
	elseif (x <= 1.25e-303)
		tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i)));
	elseif ((x <= 5.9e-62) || (!(x <= 8.5e+51) && (x <= 3.5e+177)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = b * ((t * i) - (z * c));
	t_2 = x * ((y * z) - (t * a));
	tmp = 0.0;
	if (x <= -7200000000.0)
		tmp = t_2;
	elseif (x <= -3.1e-170)
		tmp = c * ((a * j) - (z * b));
	elseif (x <= -4.4e-273)
		tmp = t_1;
	elseif (x <= 1.25e-303)
		tmp = j * ((a * c) - (y * i));
	elseif ((x <= 5.9e-62) || (~((x <= 8.5e+51)) && (x <= 3.5e+177)))
		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[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7200000000.0], t$95$2, If[LessEqual[x, -3.1e-170], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.4e-273], t$95$1, If[LessEqual[x, 1.25e-303], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 5.9e-62], And[N[Not[LessEqual[x, 8.5e+51]], $MachinePrecision], LessEqual[x, 3.5e+177]]], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq -4.4 \cdot 10^{-273}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 1.25 \cdot 10^{-303}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\

\mathbf{elif}\;x \leq 5.9 \cdot 10^{-62} \lor \neg \left(x \leq 8.5 \cdot 10^{+51}\right) \land x \leq 3.5 \cdot 10^{+177}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.2e9 or 5.9000000000000004e-62 < x < 8.4999999999999999e51 or 3.49999999999999991e177 < x

    1. Initial program 73.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg73.0%

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right)} \]
    6. Step-by-step derivation
      1. sub-neg65.0%

        \[\leadsto x \cdot \color{blue}{\left(y \cdot z + \left(-a \cdot t\right)\right)} \]
      2. sub-neg65.0%

        \[\leadsto x \cdot \color{blue}{\left(y \cdot z - a \cdot t\right)} \]
      3. *-commutative65.0%

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

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

    if -7.2e9 < x < -3.09999999999999986e-170

    1. Initial program 67.2%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative57.0%

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

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

    if -3.09999999999999986e-170 < x < -4.39999999999999959e-273 or 1.25e-303 < x < 5.9000000000000004e-62 or 8.4999999999999999e51 < x < 3.49999999999999991e177

    1. Initial program 74.3%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative63.5%

        \[\leadsto b \cdot \left(\color{blue}{t \cdot i} - c \cdot z\right) \]
      2. *-commutative63.5%

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

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

    if -4.39999999999999959e-273 < x < 1.25e-303

    1. Initial program 70.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg70.2%

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

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

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

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

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

      \[\leadsto \color{blue}{j \cdot \left(a \cdot c - i \cdot y\right)} \]
    6. Step-by-step derivation
      1. sub-neg71.1%

        \[\leadsto j \cdot \color{blue}{\left(a \cdot c + \left(-i \cdot y\right)\right)} \]
      2. sub-neg71.1%

        \[\leadsto j \cdot \color{blue}{\left(a \cdot c - i \cdot y\right)} \]
      3. *-commutative71.1%

        \[\leadsto j \cdot \left(\color{blue}{c \cdot a} - i \cdot y\right) \]
    7. Simplified71.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7200000000:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-170}:\\ \;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{-273}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-303}:\\ \;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{elif}\;x \leq 5.9 \cdot 10^{-62} \lor \neg \left(x \leq 8.5 \cdot 10^{+51}\right) \land x \leq 3.5 \cdot 10^{+177}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 68.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+113} \lor \neg \left(y \leq -4.2 \cdot 10^{+76}\right) \land \left(y \leq -6 \cdot 10^{+30} \lor \neg \left(y \leq 4.7 \cdot 10^{+94}\right)\right):\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= y -8e+113)
         (and (not (<= y -4.2e+76)) (or (<= y -6e+30) (not (<= y 4.7e+94)))))
   (* y (- (* x z) (* i j)))
   (+ (* a (- (* c j) (* x t))) (* b (- (* t i) (* z c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((y <= -8e+113) || (!(y <= -4.2e+76) && ((y <= -6e+30) || !(y <= 4.7e+94)))) {
		tmp = y * ((x * z) - (i * j));
	} else {
		tmp = (a * ((c * j) - (x * t))) + (b * ((t * i) - (z * c)));
	}
	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 ((y <= (-8d+113)) .or. (.not. (y <= (-4.2d+76))) .and. (y <= (-6d+30)) .or. (.not. (y <= 4.7d+94))) then
        tmp = y * ((x * z) - (i * j))
    else
        tmp = (a * ((c * j) - (x * t))) + (b * ((t * i) - (z * c)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((y <= -8e+113) || (!(y <= -4.2e+76) && ((y <= -6e+30) || !(y <= 4.7e+94)))) {
		tmp = y * ((x * z) - (i * j));
	} else {
		tmp = (a * ((c * j) - (x * t))) + (b * ((t * i) - (z * c)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if (y <= -8e+113) or (not (y <= -4.2e+76) and ((y <= -6e+30) or not (y <= 4.7e+94))):
		tmp = y * ((x * z) - (i * j))
	else:
		tmp = (a * ((c * j) - (x * t))) + (b * ((t * i) - (z * c)))
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((y <= -8e+113) || (!(y <= -4.2e+76) && ((y <= -6e+30) || !(y <= 4.7e+94))))
		tmp = Float64(y * Float64(Float64(x * z) - Float64(i * j)));
	else
		tmp = Float64(Float64(a * Float64(Float64(c * j) - Float64(x * t))) + Float64(b * Float64(Float64(t * i) - Float64(z * c))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if ((y <= -8e+113) || (~((y <= -4.2e+76)) && ((y <= -6e+30) || ~((y <= 4.7e+94)))))
		tmp = y * ((x * z) - (i * j));
	else
		tmp = (a * ((c * j) - (x * t))) + (b * ((t * i) - (z * c)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[y, -8e+113], And[N[Not[LessEqual[y, -4.2e+76]], $MachinePrecision], Or[LessEqual[y, -6e+30], N[Not[LessEqual[y, 4.7e+94]], $MachinePrecision]]]], N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+113} \lor \neg \left(y \leq -4.2 \cdot 10^{+76}\right) \land \left(y \leq -6 \cdot 10^{+30} \lor \neg \left(y \leq 4.7 \cdot 10^{+94}\right)\right):\\
\;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8e113 or -4.20000000000000013e76 < y < -5.99999999999999956e30 or 4.70000000000000017e94 < y

    1. Initial program 62.8%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg74.1%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in74.1%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg74.1%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg74.1%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative74.1%

        \[\leadsto \left(\color{blue}{j \cdot i} - x \cdot z\right) \cdot \left(-y\right) \]
    5. Simplified74.1%

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

    if -8e113 < y < -4.20000000000000013e76 or -5.99999999999999956e30 < y < 4.70000000000000017e94

    1. Initial program 77.4%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + a \cdot \left(c \cdot j\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
    4. Step-by-step derivation
      1. cancel-sign-sub-inv75.8%

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

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

        \[\leadsto \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + a \cdot \left(c \cdot j\right)\right) + \left(-b\right) \cdot \left(z \cdot c - \color{blue}{t \cdot i}\right) \]
      4. cancel-sign-sub-inv75.8%

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

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

        \[\leadsto \left(\color{blue}{\left(-a \cdot \left(t \cdot x\right)\right)} + a \cdot \left(c \cdot j\right)\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      7. distribute-rgt-neg-in75.8%

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      12. unsub-neg77.6%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      13. *-commutative77.6%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      14. *-commutative77.6%

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      15. distribute-rgt-neg-out77.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+113} \lor \neg \left(y \leq -4.2 \cdot 10^{+76}\right) \land \left(y \leq -6 \cdot 10^{+30} \lor \neg \left(y \leq 4.7 \cdot 10^{+94}\right)\right):\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -2.8 \cdot 10^{+78}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.02 \cdot 10^{+94}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.21999999999999999e114 or 1.0199999999999999e94 < y

    1. Initial program 58.3%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg76.8%

        \[\leadsto \color{blue}{-y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)} \]
      2. *-commutative76.8%

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in76.8%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot \left(-y\right)} \]
      4. +-commutative76.8%

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg76.8%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg76.8%

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

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

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

    if -1.21999999999999999e114 < y < -2.8000000000000001e78 or -4.19999999999999978e28 < y < 1.0199999999999999e94

    1. Initial program 77.4%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + a \cdot \left(c \cdot j\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
    4. Step-by-step derivation
      1. cancel-sign-sub-inv75.8%

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

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

        \[\leadsto \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + a \cdot \left(c \cdot j\right)\right) + \left(-b\right) \cdot \left(z \cdot c - \color{blue}{t \cdot i}\right) \]
      4. cancel-sign-sub-inv75.8%

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

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

        \[\leadsto \left(\color{blue}{\left(-a \cdot \left(t \cdot x\right)\right)} + a \cdot \left(c \cdot j\right)\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      7. distribute-rgt-neg-in75.8%

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      12. unsub-neg77.6%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      13. *-commutative77.6%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      14. *-commutative77.6%

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      15. distribute-rgt-neg-out77.6%

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

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

    if -2.8000000000000001e78 < y < -4.19999999999999978e28

    1. Initial program 86.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.22 \cdot 10^{+114}:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{+78}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{+28}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+94}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 64.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\
t_2 := b \cdot \left(t \cdot i - z \cdot c\right)\\
t_3 := t_1 + t_2\\
\mathbf{if}\;z \leq -7 \cdot 10^{+76}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\

\mathbf{elif}\;z \leq -7 \cdot 10^{-40}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-150}:\\
\;\;\;\;t_1 + j \cdot \left(a \cdot c - y \cdot i\right)\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+23}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


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

    1. Initial program 43.6%

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

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

    if -7.00000000000000001e76 < z < -7.0000000000000003e-40 or 7.1999999999999997e23 < z

    1. Initial program 75.4%

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

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

    if -7.0000000000000003e-40 < z < -2.1000000000000001e-150

    1. Initial program 93.5%

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

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

    if -2.1000000000000001e-150 < z < 7.1999999999999997e23

    1. Initial program 79.2%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + a \cdot \left(c \cdot j\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
    4. Step-by-step derivation
      1. cancel-sign-sub-inv79.2%

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(-a \cdot \left(t \cdot x\right)\right)} + a \cdot \left(c \cdot j\right)\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      7. distribute-rgt-neg-in79.2%

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) + \left(-b \cdot \left(z \cdot c - t \cdot i\right)\right) \]
      15. distribute-rgt-neg-out82.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+76}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-40}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+23}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 29.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(z \cdot \left(-b\right)\right)\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-265}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-138}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-31}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+15}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-a\right)\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+148}:\\ \;\;\;\;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 (* c (* z (- b)))))
   (if (<= z -1.8e-6)
     t_1
     (if (<= z -4.2e-265)
       (* a (* c j))
       (if (<= z 4.7e-138)
         (* (* x t) (- a))
         (if (<= z 1.4e-31)
           (* c (* a j))
           (if (<= z 9e+15)
             (* x (* t (- a)))
             (if (<= z 6.2e+148) (* 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 = c * (z * -b);
	double tmp;
	if (z <= -1.8e-6) {
		tmp = t_1;
	} else if (z <= -4.2e-265) {
		tmp = a * (c * j);
	} else if (z <= 4.7e-138) {
		tmp = (x * t) * -a;
	} else if (z <= 1.4e-31) {
		tmp = c * (a * j);
	} else if (z <= 9e+15) {
		tmp = x * (t * -a);
	} else if (z <= 6.2e+148) {
		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 = c * (z * -b)
    if (z <= (-1.8d-6)) then
        tmp = t_1
    else if (z <= (-4.2d-265)) then
        tmp = a * (c * j)
    else if (z <= 4.7d-138) then
        tmp = (x * t) * -a
    else if (z <= 1.4d-31) then
        tmp = c * (a * j)
    else if (z <= 9d+15) then
        tmp = x * (t * -a)
    else if (z <= 6.2d+148) 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 = c * (z * -b);
	double tmp;
	if (z <= -1.8e-6) {
		tmp = t_1;
	} else if (z <= -4.2e-265) {
		tmp = a * (c * j);
	} else if (z <= 4.7e-138) {
		tmp = (x * t) * -a;
	} else if (z <= 1.4e-31) {
		tmp = c * (a * j);
	} else if (z <= 9e+15) {
		tmp = x * (t * -a);
	} else if (z <= 6.2e+148) {
		tmp = x * (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = c * (z * -b)
	tmp = 0
	if z <= -1.8e-6:
		tmp = t_1
	elif z <= -4.2e-265:
		tmp = a * (c * j)
	elif z <= 4.7e-138:
		tmp = (x * t) * -a
	elif z <= 1.4e-31:
		tmp = c * (a * j)
	elif z <= 9e+15:
		tmp = x * (t * -a)
	elif z <= 6.2e+148:
		tmp = x * (y * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(c * Float64(z * Float64(-b)))
	tmp = 0.0
	if (z <= -1.8e-6)
		tmp = t_1;
	elseif (z <= -4.2e-265)
		tmp = Float64(a * Float64(c * j));
	elseif (z <= 4.7e-138)
		tmp = Float64(Float64(x * t) * Float64(-a));
	elseif (z <= 1.4e-31)
		tmp = Float64(c * Float64(a * j));
	elseif (z <= 9e+15)
		tmp = Float64(x * Float64(t * Float64(-a)));
	elseif (z <= 6.2e+148)
		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 = c * (z * -b);
	tmp = 0.0;
	if (z <= -1.8e-6)
		tmp = t_1;
	elseif (z <= -4.2e-265)
		tmp = a * (c * j);
	elseif (z <= 4.7e-138)
		tmp = (x * t) * -a;
	elseif (z <= 1.4e-31)
		tmp = c * (a * j);
	elseif (z <= 9e+15)
		tmp = x * (t * -a);
	elseif (z <= 6.2e+148)
		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[(c * N[(z * (-b)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e-6], t$95$1, If[LessEqual[z, -4.2e-265], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e-138], N[(N[(x * t), $MachinePrecision] * (-a)), $MachinePrecision], If[LessEqual[z, 1.4e-31], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+15], N[(x * N[(t * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+148], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot \left(z \cdot \left(-b\right)\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{-6}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-265}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

\mathbf{elif}\;z \leq 4.7 \cdot 10^{-138}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-31}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

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

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+148}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.79999999999999992e-6 or 6.19999999999999951e148 < z

    1. Initial program 62.6%

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{z \cdot b}\right) \]
    5. Simplified50.1%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - z \cdot b\right)} \]
    6. Taylor expanded in a around 0 44.3%

      \[\leadsto c \cdot \color{blue}{\left(-1 \cdot \left(b \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg44.3%

        \[\leadsto c \cdot \color{blue}{\left(-b \cdot z\right)} \]
      2. distribute-rgt-neg-in44.3%

        \[\leadsto c \cdot \color{blue}{\left(b \cdot \left(-z\right)\right)} \]
    8. Simplified44.3%

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

    if -1.79999999999999992e-6 < z < -4.20000000000000007e-265

    1. Initial program 84.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative56.7%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg56.7%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg56.7%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative56.7%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative56.7%

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

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

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

    if -4.20000000000000007e-265 < z < 4.7000000000000001e-138

    1. Initial program 86.5%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative52.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg52.2%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg52.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative52.2%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative52.2%

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) \]
    5. Simplified52.2%

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

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

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      2. associate-*r*36.5%

        \[\leadsto -\color{blue}{\left(a \cdot t\right) \cdot x} \]
      3. distribute-rgt-neg-in36.5%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot \left(-x\right)} \]
      4. associate-*r*38.4%

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

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

    if 4.7000000000000001e-138 < z < 1.3999999999999999e-31

    1. Initial program 63.7%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative54.6%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg54.6%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg54.6%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative54.6%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative54.6%

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot j\right) \cdot a} \]
      2. associate-*l*48.6%

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

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

    if 1.3999999999999999e-31 < z < 9e15

    1. Initial program 66.7%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative67.4%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg67.4%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg67.4%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative67.4%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative67.4%

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

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

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

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      2. associate-*r*56.4%

        \[\leadsto -\color{blue}{\left(a \cdot t\right) \cdot x} \]
      3. distribute-rgt-neg-in56.4%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot \left(-x\right)} \]
      4. associate-*r*56.4%

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

      \[\leadsto \color{blue}{a \cdot \left(t \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. distribute-rgt-neg-out56.4%

        \[\leadsto a \cdot \color{blue}{\left(-t \cdot x\right)} \]
      2. distribute-rgt-neg-out56.4%

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      3. add-sqr-sqrt22.5%

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

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\sqrt{x \cdot x}}\right) \]
      5. sqr-neg24.0%

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

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right) \]
      7. add-sqr-sqrt1.5%

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

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

        \[\leadsto -\color{blue}{\left(\left(-x\right) \cdot t\right)} \cdot a \]
      10. associate-*l*1.5%

        \[\leadsto -\color{blue}{\left(-x\right) \cdot \left(t \cdot a\right)} \]
      11. add-sqr-sqrt1.4%

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

        \[\leadsto -\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \left(t \cdot a\right) \]
      13. sqr-neg24.0%

        \[\leadsto -\sqrt{\color{blue}{x \cdot x}} \cdot \left(t \cdot a\right) \]
      14. sqrt-unprod22.5%

        \[\leadsto -\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \left(t \cdot a\right) \]
      15. add-sqr-sqrt56.4%

        \[\leadsto -\color{blue}{x} \cdot \left(t \cdot a\right) \]
      16. *-commutative56.4%

        \[\leadsto -x \cdot \color{blue}{\left(a \cdot t\right)} \]
    10. Applied egg-rr56.4%

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

    if 9e15 < z < 6.19999999999999951e148

    1. Initial program 71.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg65.1%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in65.1%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg65.1%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg65.1%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative65.1%

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

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 55.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-6}:\\ \;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-265}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-138}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-31}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+15}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-a\right)\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 29.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(c \cdot \left(-b\right)\right)\\ \mathbf{if}\;z \leq -0.0068:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-267}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{-142}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-31}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+21}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-a\right)\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+161}:\\ \;\;\;\;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 (* z (* c (- b)))))
   (if (<= z -0.0068)
     t_1
     (if (<= z -1.65e-267)
       (* a (* c j))
       (if (<= z 1.38e-142)
         (* (* x t) (- a))
         (if (<= z 2.5e-31)
           (* c (* a j))
           (if (<= z 5.5e+21)
             (* x (* t (- a)))
             (if (<= z 6.5e+161) (* 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 = z * (c * -b);
	double tmp;
	if (z <= -0.0068) {
		tmp = t_1;
	} else if (z <= -1.65e-267) {
		tmp = a * (c * j);
	} else if (z <= 1.38e-142) {
		tmp = (x * t) * -a;
	} else if (z <= 2.5e-31) {
		tmp = c * (a * j);
	} else if (z <= 5.5e+21) {
		tmp = x * (t * -a);
	} else if (z <= 6.5e+161) {
		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 = z * (c * -b)
    if (z <= (-0.0068d0)) then
        tmp = t_1
    else if (z <= (-1.65d-267)) then
        tmp = a * (c * j)
    else if (z <= 1.38d-142) then
        tmp = (x * t) * -a
    else if (z <= 2.5d-31) then
        tmp = c * (a * j)
    else if (z <= 5.5d+21) then
        tmp = x * (t * -a)
    else if (z <= 6.5d+161) 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 = z * (c * -b);
	double tmp;
	if (z <= -0.0068) {
		tmp = t_1;
	} else if (z <= -1.65e-267) {
		tmp = a * (c * j);
	} else if (z <= 1.38e-142) {
		tmp = (x * t) * -a;
	} else if (z <= 2.5e-31) {
		tmp = c * (a * j);
	} else if (z <= 5.5e+21) {
		tmp = x * (t * -a);
	} else if (z <= 6.5e+161) {
		tmp = x * (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = z * (c * -b)
	tmp = 0
	if z <= -0.0068:
		tmp = t_1
	elif z <= -1.65e-267:
		tmp = a * (c * j)
	elif z <= 1.38e-142:
		tmp = (x * t) * -a
	elif z <= 2.5e-31:
		tmp = c * (a * j)
	elif z <= 5.5e+21:
		tmp = x * (t * -a)
	elif z <= 6.5e+161:
		tmp = x * (y * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(z * Float64(c * Float64(-b)))
	tmp = 0.0
	if (z <= -0.0068)
		tmp = t_1;
	elseif (z <= -1.65e-267)
		tmp = Float64(a * Float64(c * j));
	elseif (z <= 1.38e-142)
		tmp = Float64(Float64(x * t) * Float64(-a));
	elseif (z <= 2.5e-31)
		tmp = Float64(c * Float64(a * j));
	elseif (z <= 5.5e+21)
		tmp = Float64(x * Float64(t * Float64(-a)));
	elseif (z <= 6.5e+161)
		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 = z * (c * -b);
	tmp = 0.0;
	if (z <= -0.0068)
		tmp = t_1;
	elseif (z <= -1.65e-267)
		tmp = a * (c * j);
	elseif (z <= 1.38e-142)
		tmp = (x * t) * -a;
	elseif (z <= 2.5e-31)
		tmp = c * (a * j);
	elseif (z <= 5.5e+21)
		tmp = x * (t * -a);
	elseif (z <= 6.5e+161)
		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[(z * N[(c * (-b)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0068], t$95$1, If[LessEqual[z, -1.65e-267], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.38e-142], N[(N[(x * t), $MachinePrecision] * (-a)), $MachinePrecision], If[LessEqual[z, 2.5e-31], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+21], N[(x * N[(t * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+161], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(c \cdot \left(-b\right)\right)\\
\mathbf{if}\;z \leq -0.0068:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.65 \cdot 10^{-267}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

\mathbf{elif}\;z \leq 1.38 \cdot 10^{-142}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\

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

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+161}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -0.00679999999999999962 or 6.5e161 < z

    1. Initial program 61.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg41.6%

        \[\leadsto \color{blue}{-b \cdot \left(c \cdot z\right)} \]
      2. associate-*r*43.6%

        \[\leadsto -\color{blue}{\left(b \cdot c\right) \cdot z} \]
      3. *-commutative43.6%

        \[\leadsto -\color{blue}{z \cdot \left(b \cdot c\right)} \]
      4. distribute-rgt-neg-in43.6%

        \[\leadsto \color{blue}{z \cdot \left(-b \cdot c\right)} \]
      5. distribute-rgt-neg-in43.6%

        \[\leadsto z \cdot \color{blue}{\left(b \cdot \left(-c\right)\right)} \]
    6. Simplified43.6%

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

    if -0.00679999999999999962 < z < -1.65000000000000002e-267

    1. Initial program 84.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative56.7%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg56.7%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg56.7%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative56.7%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative56.7%

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

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

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

    if -1.65000000000000002e-267 < z < 1.37999999999999998e-142

    1. Initial program 86.5%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative52.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg52.2%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg52.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative52.2%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative52.2%

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) \]
    5. Simplified52.2%

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

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

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      2. associate-*r*36.5%

        \[\leadsto -\color{blue}{\left(a \cdot t\right) \cdot x} \]
      3. distribute-rgt-neg-in36.5%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot \left(-x\right)} \]
      4. associate-*r*38.4%

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

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

    if 1.37999999999999998e-142 < z < 2.5e-31

    1. Initial program 63.7%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative54.6%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg54.6%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg54.6%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative54.6%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative54.6%

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot j\right) \cdot a} \]
      2. associate-*l*48.6%

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

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

    if 2.5e-31 < z < 5.5e21

    1. Initial program 66.7%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative67.4%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg67.4%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg67.4%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative67.4%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative67.4%

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

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

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

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      2. associate-*r*56.4%

        \[\leadsto -\color{blue}{\left(a \cdot t\right) \cdot x} \]
      3. distribute-rgt-neg-in56.4%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot \left(-x\right)} \]
      4. associate-*r*56.4%

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

      \[\leadsto \color{blue}{a \cdot \left(t \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. distribute-rgt-neg-out56.4%

        \[\leadsto a \cdot \color{blue}{\left(-t \cdot x\right)} \]
      2. distribute-rgt-neg-out56.4%

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      3. add-sqr-sqrt22.5%

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

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\sqrt{x \cdot x}}\right) \]
      5. sqr-neg24.0%

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

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right) \]
      7. add-sqr-sqrt1.5%

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

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

        \[\leadsto -\color{blue}{\left(\left(-x\right) \cdot t\right)} \cdot a \]
      10. associate-*l*1.5%

        \[\leadsto -\color{blue}{\left(-x\right) \cdot \left(t \cdot a\right)} \]
      11. add-sqr-sqrt1.4%

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

        \[\leadsto -\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \left(t \cdot a\right) \]
      13. sqr-neg24.0%

        \[\leadsto -\sqrt{\color{blue}{x \cdot x}} \cdot \left(t \cdot a\right) \]
      14. sqrt-unprod22.5%

        \[\leadsto -\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \left(t \cdot a\right) \]
      15. add-sqr-sqrt56.4%

        \[\leadsto -\color{blue}{x} \cdot \left(t \cdot a\right) \]
      16. *-commutative56.4%

        \[\leadsto -x \cdot \color{blue}{\left(a \cdot t\right)} \]
    10. Applied egg-rr56.4%

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

    if 5.5e21 < z < 6.5e161

    1. Initial program 74.3%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg65.2%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in65.2%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg65.2%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg65.2%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative65.2%

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

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 56.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0068:\\ \;\;\;\;z \cdot \left(c \cdot \left(-b\right)\right)\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-267}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{-142}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-31}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+21}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-a\right)\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+161}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(c \cdot \left(-b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 29.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -5 \cdot 10^{-267}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-135}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\

\mathbf{elif}\;z \leq 5 \cdot 10^{-33}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+161}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -2.09999999999999994e-8

    1. Initial program 58.1%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg38.6%

        \[\leadsto \color{blue}{-b \cdot \left(c \cdot z\right)} \]
      2. associate-*r*41.3%

        \[\leadsto -\color{blue}{\left(b \cdot c\right) \cdot z} \]
      3. *-commutative41.3%

        \[\leadsto -\color{blue}{z \cdot \left(b \cdot c\right)} \]
      4. distribute-rgt-neg-in41.3%

        \[\leadsto \color{blue}{z \cdot \left(-b \cdot c\right)} \]
      5. distribute-rgt-neg-in41.3%

        \[\leadsto z \cdot \color{blue}{\left(b \cdot \left(-c\right)\right)} \]
    6. Simplified41.3%

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

    if -2.09999999999999994e-8 < z < -4.9999999999999999e-267

    1. Initial program 84.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative56.7%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg56.7%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg56.7%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative56.7%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative56.7%

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

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

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

    if -4.9999999999999999e-267 < z < 4.3999999999999999e-135

    1. Initial program 86.5%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative52.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg52.2%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg52.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative52.2%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative52.2%

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) \]
    5. Simplified52.2%

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

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

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      2. associate-*r*36.5%

        \[\leadsto -\color{blue}{\left(a \cdot t\right) \cdot x} \]
      3. distribute-rgt-neg-in36.5%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot \left(-x\right)} \]
      4. associate-*r*38.4%

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

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

    if 4.3999999999999999e-135 < z < 5.00000000000000028e-33

    1. Initial program 63.7%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative54.6%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg54.6%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg54.6%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative54.6%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative54.6%

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot j\right) \cdot a} \]
      2. associate-*l*48.6%

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

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

    if 5.00000000000000028e-33 < z < 6.5e15

    1. Initial program 66.7%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative67.4%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg67.4%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg67.4%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative67.4%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative67.4%

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

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

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

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      2. associate-*r*56.4%

        \[\leadsto -\color{blue}{\left(a \cdot t\right) \cdot x} \]
      3. distribute-rgt-neg-in56.4%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot \left(-x\right)} \]
      4. associate-*r*56.4%

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

      \[\leadsto \color{blue}{a \cdot \left(t \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. distribute-rgt-neg-out56.4%

        \[\leadsto a \cdot \color{blue}{\left(-t \cdot x\right)} \]
      2. distribute-rgt-neg-out56.4%

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      3. add-sqr-sqrt22.5%

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

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\sqrt{x \cdot x}}\right) \]
      5. sqr-neg24.0%

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

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right) \]
      7. add-sqr-sqrt1.5%

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

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

        \[\leadsto -\color{blue}{\left(\left(-x\right) \cdot t\right)} \cdot a \]
      10. associate-*l*1.5%

        \[\leadsto -\color{blue}{\left(-x\right) \cdot \left(t \cdot a\right)} \]
      11. add-sqr-sqrt1.4%

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

        \[\leadsto -\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \left(t \cdot a\right) \]
      13. sqr-neg24.0%

        \[\leadsto -\sqrt{\color{blue}{x \cdot x}} \cdot \left(t \cdot a\right) \]
      14. sqrt-unprod22.5%

        \[\leadsto -\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \left(t \cdot a\right) \]
      15. add-sqr-sqrt56.4%

        \[\leadsto -\color{blue}{x} \cdot \left(t \cdot a\right) \]
      16. *-commutative56.4%

        \[\leadsto -x \cdot \color{blue}{\left(a \cdot t\right)} \]
    10. Applied egg-rr56.4%

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

    if 6.5e15 < z < 7.19999999999999967e161

    1. Initial program 74.3%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg65.2%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in65.2%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg65.2%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg65.2%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative65.2%

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

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 56.1%

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

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

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

    if 7.19999999999999967e161 < z

    1. Initial program 70.2%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative53.2%

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{z \cdot b}\right) \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - z \cdot b\right)} \]
    6. Taylor expanded in a around 0 49.6%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*49.6%

        \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \left(c \cdot z\right)} \]
      2. neg-mul-149.6%

        \[\leadsto \color{blue}{\left(-b\right)} \cdot \left(c \cdot z\right) \]
    8. Simplified49.6%

      \[\leadsto \color{blue}{\left(-b\right) \cdot \left(c \cdot z\right)} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification44.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{-8}:\\ \;\;\;\;z \cdot \left(c \cdot \left(-b\right)\right)\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-267}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-135}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-33}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+15}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-a\right)\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+161}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot c\right) \cdot \left(-b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 29.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.1 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-a\right)\right)\\ \mathbf{elif}\;x \leq -0.18:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-175}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-102} \lor \neg \left(x \leq 9.6 \cdot 10^{+36}\right) \land x \leq 1.75 \cdot 10^{+111}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -5.1e+104)
   (* x (* t (- a)))
   (if (<= x -0.18)
     (* y (* x z))
     (if (<= x -1.8e-175)
       (* c (* a j))
       (if (or (<= x 3.1e-102) (and (not (<= x 9.6e+36)) (<= x 1.75e+111)))
         (* b (* t i))
         (* x (* y z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -5.1e+104) {
		tmp = x * (t * -a);
	} else if (x <= -0.18) {
		tmp = y * (x * z);
	} else if (x <= -1.8e-175) {
		tmp = c * (a * j);
	} else if ((x <= 3.1e-102) || (!(x <= 9.6e+36) && (x <= 1.75e+111))) {
		tmp = b * (t * i);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-5.1d+104)) then
        tmp = x * (t * -a)
    else if (x <= (-0.18d0)) then
        tmp = y * (x * z)
    else if (x <= (-1.8d-175)) then
        tmp = c * (a * j)
    else if ((x <= 3.1d-102) .or. (.not. (x <= 9.6d+36)) .and. (x <= 1.75d+111)) then
        tmp = b * (t * i)
    else
        tmp = x * (y * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -5.1e+104) {
		tmp = x * (t * -a);
	} else if (x <= -0.18) {
		tmp = y * (x * z);
	} else if (x <= -1.8e-175) {
		tmp = c * (a * j);
	} else if ((x <= 3.1e-102) || (!(x <= 9.6e+36) && (x <= 1.75e+111))) {
		tmp = b * (t * i);
	} else {
		tmp = x * (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -5.1e+104:
		tmp = x * (t * -a)
	elif x <= -0.18:
		tmp = y * (x * z)
	elif x <= -1.8e-175:
		tmp = c * (a * j)
	elif (x <= 3.1e-102) or (not (x <= 9.6e+36) and (x <= 1.75e+111)):
		tmp = b * (t * i)
	else:
		tmp = x * (y * z)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -5.1e+104)
		tmp = Float64(x * Float64(t * Float64(-a)));
	elseif (x <= -0.18)
		tmp = Float64(y * Float64(x * z));
	elseif (x <= -1.8e-175)
		tmp = Float64(c * Float64(a * j));
	elseif ((x <= 3.1e-102) || (!(x <= 9.6e+36) && (x <= 1.75e+111)))
		tmp = Float64(b * Float64(t * i));
	else
		tmp = Float64(x * Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -5.1e+104)
		tmp = x * (t * -a);
	elseif (x <= -0.18)
		tmp = y * (x * z);
	elseif (x <= -1.8e-175)
		tmp = c * (a * j);
	elseif ((x <= 3.1e-102) || (~((x <= 9.6e+36)) && (x <= 1.75e+111)))
		tmp = b * (t * i);
	else
		tmp = x * (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -5.1e+104], N[(x * N[(t * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -0.18], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.8e-175], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 3.1e-102], And[N[Not[LessEqual[x, 9.6e+36]], $MachinePrecision], LessEqual[x, 1.75e+111]]], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -0.18:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\

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

\mathbf{elif}\;x \leq 3.1 \cdot 10^{-102} \lor \neg \left(x \leq 9.6 \cdot 10^{+36}\right) \land x \leq 1.75 \cdot 10^{+111}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\

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


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

    1. Initial program 71.4%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative61.1%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg61.1%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg61.1%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative61.1%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative61.1%

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

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

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

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      2. associate-*r*57.6%

        \[\leadsto -\color{blue}{\left(a \cdot t\right) \cdot x} \]
      3. distribute-rgt-neg-in57.6%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot \left(-x\right)} \]
      4. associate-*r*52.4%

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

      \[\leadsto \color{blue}{a \cdot \left(t \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. distribute-rgt-neg-out52.4%

        \[\leadsto a \cdot \color{blue}{\left(-t \cdot x\right)} \]
      2. distribute-rgt-neg-out52.4%

        \[\leadsto \color{blue}{-a \cdot \left(t \cdot x\right)} \]
      3. add-sqr-sqrt0.0%

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right) \]
      4. sqrt-unprod26.3%

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\sqrt{x \cdot x}}\right) \]
      5. sqr-neg26.3%

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

        \[\leadsto -a \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right) \]
      7. add-sqr-sqrt12.6%

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

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

        \[\leadsto -\color{blue}{\left(\left(-x\right) \cdot t\right)} \cdot a \]
      10. associate-*l*4.3%

        \[\leadsto -\color{blue}{\left(-x\right) \cdot \left(t \cdot a\right)} \]
      11. add-sqr-sqrt4.3%

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

        \[\leadsto -\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \left(t \cdot a\right) \]
      13. sqr-neg18.0%

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

        \[\leadsto -\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \left(t \cdot a\right) \]
      15. add-sqr-sqrt57.6%

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

        \[\leadsto -x \cdot \color{blue}{\left(a \cdot t\right)} \]
    10. Applied egg-rr57.6%

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

    if -5.1000000000000002e104 < x < -0.17999999999999999

    1. Initial program 65.8%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg54.1%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in54.1%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg54.1%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg54.1%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative54.1%

        \[\leadsto \left(\color{blue}{j \cdot i} - x \cdot z\right) \cdot \left(-y\right) \]
    5. Simplified54.1%

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 37.2%

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

        \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot x} \]
      2. associate-*r*42.7%

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

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

    if -0.17999999999999999 < x < -1.8e-175

    1. Initial program 67.1%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative57.7%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg57.7%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg57.7%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative57.7%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative57.7%

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot j\right) \cdot a} \]
      2. associate-*l*38.5%

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

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

    if -1.8e-175 < x < 3.10000000000000013e-102 or 9.5999999999999997e36 < x < 1.7500000000000001e111

    1. Initial program 72.7%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--40.4%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
      2. *-commutative40.4%

        \[\leadsto t \cdot \left(-1 \cdot \left(\color{blue}{x \cdot a} - b \cdot i\right)\right) \]
      3. *-commutative40.4%

        \[\leadsto t \cdot \left(-1 \cdot \left(x \cdot a - \color{blue}{i \cdot b}\right)\right) \]
    5. Simplified40.4%

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot a - i \cdot b\right)\right)} \]
    6. Taylor expanded in x around 0 38.8%

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

    if 3.10000000000000013e-102 < x < 9.5999999999999997e36 or 1.7500000000000001e111 < x

    1. Initial program 78.9%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg52.9%

        \[\leadsto \color{blue}{-y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)} \]
      2. *-commutative52.9%

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in52.9%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg52.9%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg52.9%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative52.9%

        \[\leadsto \left(\color{blue}{j \cdot i} - x \cdot z\right) \cdot \left(-y\right) \]
    5. Simplified52.9%

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 44.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.1 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-a\right)\right)\\ \mathbf{elif}\;x \leq -0.18:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-175}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-102} \lor \neg \left(x \leq 9.6 \cdot 10^{+36}\right) \land x \leq 1.75 \cdot 10^{+111}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{if}\;y \leq -1.7 \cdot 10^{+164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4 \cdot 10^{+78}:\\ \;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{+28} \lor \neg \left(y \leq 3.3 \cdot 10^{+94}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right) - x \cdot \left(t \cdot a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* y (- (* x z) (* i j)))))
   (if (<= y -1.7e+164)
     t_1
     (if (<= y -4e+78)
       (* j (- (* a c) (* y i)))
       (if (or (<= y -2.8e+28) (not (<= y 3.3e+94)))
         t_1
         (- (* b (- (* t i) (* z c))) (* x (* t a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = y * ((x * z) - (i * j));
	double tmp;
	if (y <= -1.7e+164) {
		tmp = t_1;
	} else if (y <= -4e+78) {
		tmp = j * ((a * c) - (y * i));
	} else if ((y <= -2.8e+28) || !(y <= 3.3e+94)) {
		tmp = t_1;
	} else {
		tmp = (b * ((t * i) - (z * c))) - (x * (t * a));
	}
	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 * ((x * z) - (i * j))
    if (y <= (-1.7d+164)) then
        tmp = t_1
    else if (y <= (-4d+78)) then
        tmp = j * ((a * c) - (y * i))
    else if ((y <= (-2.8d+28)) .or. (.not. (y <= 3.3d+94))) then
        tmp = t_1
    else
        tmp = (b * ((t * i) - (z * c))) - (x * (t * a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = y * ((x * z) - (i * j));
	double tmp;
	if (y <= -1.7e+164) {
		tmp = t_1;
	} else if (y <= -4e+78) {
		tmp = j * ((a * c) - (y * i));
	} else if ((y <= -2.8e+28) || !(y <= 3.3e+94)) {
		tmp = t_1;
	} else {
		tmp = (b * ((t * i) - (z * c))) - (x * (t * a));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = y * ((x * z) - (i * j))
	tmp = 0
	if y <= -1.7e+164:
		tmp = t_1
	elif y <= -4e+78:
		tmp = j * ((a * c) - (y * i))
	elif (y <= -2.8e+28) or not (y <= 3.3e+94):
		tmp = t_1
	else:
		tmp = (b * ((t * i) - (z * c))) - (x * (t * a))
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(y * Float64(Float64(x * z) - Float64(i * j)))
	tmp = 0.0
	if (y <= -1.7e+164)
		tmp = t_1;
	elseif (y <= -4e+78)
		tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i)));
	elseif ((y <= -2.8e+28) || !(y <= 3.3e+94))
		tmp = t_1;
	else
		tmp = Float64(Float64(b * Float64(Float64(t * i) - Float64(z * c))) - Float64(x * Float64(t * a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = y * ((x * z) - (i * j));
	tmp = 0.0;
	if (y <= -1.7e+164)
		tmp = t_1;
	elseif (y <= -4e+78)
		tmp = j * ((a * c) - (y * i));
	elseif ((y <= -2.8e+28) || ~((y <= 3.3e+94)))
		tmp = t_1;
	else
		tmp = (b * ((t * i) - (z * c))) - (x * (t * a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+164], t$95$1, If[LessEqual[y, -4e+78], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.8e+28], N[Not[LessEqual[y, 3.3e+94]], $MachinePrecision]], t$95$1, N[(N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4 \cdot 10^{+78}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\

\mathbf{elif}\;y \leq -2.8 \cdot 10^{+28} \lor \neg \left(y \leq 3.3 \cdot 10^{+94}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right) - x \cdot \left(t \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.7000000000000001e164 or -4.00000000000000003e78 < y < -2.8000000000000001e28 or 3.3e94 < y

    1. Initial program 62.9%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg75.2%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in75.2%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg75.2%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg75.2%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative75.2%

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

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

    if -1.7000000000000001e164 < y < -4.00000000000000003e78

    1. Initial program 66.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg66.6%

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

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

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

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

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

      \[\leadsto \color{blue}{j \cdot \left(a \cdot c - i \cdot y\right)} \]
    6. Step-by-step derivation
      1. sub-neg68.1%

        \[\leadsto j \cdot \color{blue}{\left(a \cdot c + \left(-i \cdot y\right)\right)} \]
      2. sub-neg68.1%

        \[\leadsto j \cdot \color{blue}{\left(a \cdot c - i \cdot y\right)} \]
      3. *-commutative68.1%

        \[\leadsto j \cdot \left(\color{blue}{c \cdot a} - i \cdot y\right) \]
    7. Simplified68.1%

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

    if -2.8000000000000001e28 < y < 3.3e94

    1. Initial program 78.1%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
    4. Taylor expanded in y around 0 64.7%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv64.7%

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + \left(-b\right) \cdot \left(c \cdot z - i \cdot t\right)} \]
      2. *-commutative64.7%

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + \left(-b\right) \cdot \left(\color{blue}{z \cdot c} - i \cdot t\right) \]
      3. *-commutative64.7%

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + \left(-b\right) \cdot \left(z \cdot c - \color{blue}{t \cdot i}\right) \]
      4. cancel-sign-sub-inv64.7%

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) - b \cdot \left(z \cdot c - t \cdot i\right)} \]
      5. mul-1-neg64.7%

        \[\leadsto \color{blue}{\left(-a \cdot \left(t \cdot x\right)\right)} - b \cdot \left(z \cdot c - t \cdot i\right) \]
      6. associate-*r*63.4%

        \[\leadsto \left(-\color{blue}{\left(a \cdot t\right) \cdot x}\right) - b \cdot \left(z \cdot c - t \cdot i\right) \]
      7. *-commutative63.4%

        \[\leadsto \left(-\color{blue}{x \cdot \left(a \cdot t\right)}\right) - b \cdot \left(z \cdot c - t \cdot i\right) \]
      8. distribute-rgt-neg-in63.4%

        \[\leadsto \color{blue}{x \cdot \left(-a \cdot t\right)} - b \cdot \left(z \cdot c - t \cdot i\right) \]
      9. distribute-lft-neg-in63.4%

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

      \[\leadsto \color{blue}{x \cdot \left(\left(-a\right) \cdot t\right) - b \cdot \left(z \cdot c - t \cdot i\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+164}:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{elif}\;y \leq -4 \cdot 10^{+78}:\\ \;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{+28} \lor \neg \left(y \leq 3.3 \cdot 10^{+94}\right):\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right) - x \cdot \left(t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 51.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b \cdot i - x \cdot a\right)\\ t_2 := z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{-14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-193}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-43}:\\ \;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+24}:\\ \;\;\;\;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 (* t (- (* b i) (* x a)))) (t_2 (* z (- (* x y) (* b c)))))
   (if (<= z -2.4e-14)
     t_2
     (if (<= z -2.45e-193)
       (* a (- (* c j) (* x t)))
       (if (<= z 1.2e-135)
         t_1
         (if (<= z 1.45e-43)
           (* c (- (* a j) (* z b)))
           (if (<= z 8.2e+24) 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 = t * ((b * i) - (x * a));
	double t_2 = z * ((x * y) - (b * c));
	double tmp;
	if (z <= -2.4e-14) {
		tmp = t_2;
	} else if (z <= -2.45e-193) {
		tmp = a * ((c * j) - (x * t));
	} else if (z <= 1.2e-135) {
		tmp = t_1;
	} else if (z <= 1.45e-43) {
		tmp = c * ((a * j) - (z * b));
	} else if (z <= 8.2e+24) {
		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 = t * ((b * i) - (x * a))
    t_2 = z * ((x * y) - (b * c))
    if (z <= (-2.4d-14)) then
        tmp = t_2
    else if (z <= (-2.45d-193)) then
        tmp = a * ((c * j) - (x * t))
    else if (z <= 1.2d-135) then
        tmp = t_1
    else if (z <= 1.45d-43) then
        tmp = c * ((a * j) - (z * b))
    else if (z <= 8.2d+24) 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 = t * ((b * i) - (x * a));
	double t_2 = z * ((x * y) - (b * c));
	double tmp;
	if (z <= -2.4e-14) {
		tmp = t_2;
	} else if (z <= -2.45e-193) {
		tmp = a * ((c * j) - (x * t));
	} else if (z <= 1.2e-135) {
		tmp = t_1;
	} else if (z <= 1.45e-43) {
		tmp = c * ((a * j) - (z * b));
	} else if (z <= 8.2e+24) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = t * ((b * i) - (x * a))
	t_2 = z * ((x * y) - (b * c))
	tmp = 0
	if z <= -2.4e-14:
		tmp = t_2
	elif z <= -2.45e-193:
		tmp = a * ((c * j) - (x * t))
	elif z <= 1.2e-135:
		tmp = t_1
	elif z <= 1.45e-43:
		tmp = c * ((a * j) - (z * b))
	elif z <= 8.2e+24:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(t * Float64(Float64(b * i) - Float64(x * a)))
	t_2 = Float64(z * Float64(Float64(x * y) - Float64(b * c)))
	tmp = 0.0
	if (z <= -2.4e-14)
		tmp = t_2;
	elseif (z <= -2.45e-193)
		tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t)));
	elseif (z <= 1.2e-135)
		tmp = t_1;
	elseif (z <= 1.45e-43)
		tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b)));
	elseif (z <= 8.2e+24)
		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 = t * ((b * i) - (x * a));
	t_2 = z * ((x * y) - (b * c));
	tmp = 0.0;
	if (z <= -2.4e-14)
		tmp = t_2;
	elseif (z <= -2.45e-193)
		tmp = a * ((c * j) - (x * t));
	elseif (z <= 1.2e-135)
		tmp = t_1;
	elseif (z <= 1.45e-43)
		tmp = c * ((a * j) - (z * b));
	elseif (z <= 8.2e+24)
		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[(t * N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e-14], t$95$2, If[LessEqual[z, -2.45e-193], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-135], t$95$1, If[LessEqual[z, 1.45e-43], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+24], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(b \cdot i - x \cdot a\right)\\
t_2 := z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{-14}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -2.45 \cdot 10^{-193}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-135}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 8.2 \cdot 10^{+24}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.4e-14 or 8.2000000000000002e24 < z

    1. Initial program 63.3%

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

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

    if -2.4e-14 < z < -2.45000000000000008e-193

    1. Initial program 89.6%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative66.1%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg66.1%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg66.1%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative66.1%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative66.1%

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

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

    if -2.45000000000000008e-193 < z < 1.1999999999999999e-135 or 1.4500000000000001e-43 < z < 8.2000000000000002e24

    1. Initial program 84.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg84.4%

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg64.6%

        \[\leadsto t \cdot \left(\color{blue}{\left(-a \cdot x\right)} - -1 \cdot \left(b \cdot i\right)\right) \]
      2. *-commutative64.6%

        \[\leadsto t \cdot \left(\left(-\color{blue}{x \cdot a}\right) - -1 \cdot \left(b \cdot i\right)\right) \]
      3. neg-sub064.6%

        \[\leadsto t \cdot \left(\color{blue}{\left(0 - x \cdot a\right)} - -1 \cdot \left(b \cdot i\right)\right) \]
      4. neg-mul-164.6%

        \[\leadsto t \cdot \left(\left(0 - x \cdot a\right) - \color{blue}{\left(-b \cdot i\right)}\right) \]
      5. associate--r+64.6%

        \[\leadsto t \cdot \color{blue}{\left(0 - \left(x \cdot a + \left(-b \cdot i\right)\right)\right)} \]
      6. +-commutative64.6%

        \[\leadsto t \cdot \left(0 - \color{blue}{\left(\left(-b \cdot i\right) + x \cdot a\right)}\right) \]
      7. associate--r+64.6%

        \[\leadsto t \cdot \color{blue}{\left(\left(0 - \left(-b \cdot i\right)\right) - x \cdot a\right)} \]
      8. neg-sub064.6%

        \[\leadsto t \cdot \left(\color{blue}{\left(-\left(-b \cdot i\right)\right)} - x \cdot a\right) \]
      9. remove-double-neg64.6%

        \[\leadsto t \cdot \left(\color{blue}{b \cdot i} - x \cdot a\right) \]
      10. *-commutative64.6%

        \[\leadsto t \cdot \left(b \cdot i - \color{blue}{a \cdot x}\right) \]
    7. Simplified64.6%

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

    if 1.1999999999999999e-135 < z < 1.4500000000000001e-43

    1. Initial program 57.0%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative75.5%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - z \cdot b\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification66.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-14}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-193}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-135}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-43}:\\ \;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+24}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 27.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t \cdot i\right)\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-276}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\ \;\;\;\;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 (* b (* t i))))
   (if (<= t -1.05e+163)
     t_1
     (if (<= t -2.25e+86)
       (* y (* x z))
       (if (<= t -2.5e-106)
         t_1
         (if (<= t 4.6e-276)
           (* a (* c j))
           (if (<= t 3.2e+182) (* 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 = b * (t * i);
	double tmp;
	if (t <= -1.05e+163) {
		tmp = t_1;
	} else if (t <= -2.25e+86) {
		tmp = y * (x * z);
	} else if (t <= -2.5e-106) {
		tmp = t_1;
	} else if (t <= 4.6e-276) {
		tmp = a * (c * j);
	} else if (t <= 3.2e+182) {
		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 = b * (t * i)
    if (t <= (-1.05d+163)) then
        tmp = t_1
    else if (t <= (-2.25d+86)) then
        tmp = y * (x * z)
    else if (t <= (-2.5d-106)) then
        tmp = t_1
    else if (t <= 4.6d-276) then
        tmp = a * (c * j)
    else if (t <= 3.2d+182) 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 = b * (t * i);
	double tmp;
	if (t <= -1.05e+163) {
		tmp = t_1;
	} else if (t <= -2.25e+86) {
		tmp = y * (x * z);
	} else if (t <= -2.5e-106) {
		tmp = t_1;
	} else if (t <= 4.6e-276) {
		tmp = a * (c * j);
	} else if (t <= 3.2e+182) {
		tmp = x * (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = b * (t * i)
	tmp = 0
	if t <= -1.05e+163:
		tmp = t_1
	elif t <= -2.25e+86:
		tmp = y * (x * z)
	elif t <= -2.5e-106:
		tmp = t_1
	elif t <= 4.6e-276:
		tmp = a * (c * j)
	elif t <= 3.2e+182:
		tmp = x * (y * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(b * Float64(t * i))
	tmp = 0.0
	if (t <= -1.05e+163)
		tmp = t_1;
	elseif (t <= -2.25e+86)
		tmp = Float64(y * Float64(x * z));
	elseif (t <= -2.5e-106)
		tmp = t_1;
	elseif (t <= 4.6e-276)
		tmp = Float64(a * Float64(c * j));
	elseif (t <= 3.2e+182)
		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 = b * (t * i);
	tmp = 0.0;
	if (t <= -1.05e+163)
		tmp = t_1;
	elseif (t <= -2.25e+86)
		tmp = y * (x * z);
	elseif (t <= -2.5e-106)
		tmp = t_1;
	elseif (t <= 4.6e-276)
		tmp = a * (c * j);
	elseif (t <= 3.2e+182)
		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[(b * N[(t * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+163], t$95$1, If[LessEqual[t, -2.25e+86], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.5e-106], t$95$1, If[LessEqual[t, 4.6e-276], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+182], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -2.5 \cdot 10^{-106}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-276}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.05e163 or -2.24999999999999996e86 < t < -2.49999999999999991e-106 or 3.1999999999999997e182 < t

    1. Initial program 74.5%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--64.4%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
      2. *-commutative64.4%

        \[\leadsto t \cdot \left(-1 \cdot \left(\color{blue}{x \cdot a} - b \cdot i\right)\right) \]
      3. *-commutative64.4%

        \[\leadsto t \cdot \left(-1 \cdot \left(x \cdot a - \color{blue}{i \cdot b}\right)\right) \]
    5. Simplified64.4%

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot a - i \cdot b\right)\right)} \]
    6. Taylor expanded in x around 0 45.7%

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

    if -1.05e163 < t < -2.24999999999999996e86

    1. Initial program 68.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg68.9%

        \[\leadsto \color{blue}{-y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)} \]
      2. *-commutative68.9%

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in68.9%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg68.9%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg68.9%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative68.9%

        \[\leadsto \left(\color{blue}{j \cdot i} - x \cdot z\right) \cdot \left(-y\right) \]
    5. Simplified68.9%

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 37.7%

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

        \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot x} \]
      2. associate-*r*46.4%

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

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

    if -2.49999999999999991e-106 < t < 4.59999999999999963e-276

    1. Initial program 75.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative47.3%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg47.3%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg47.3%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative47.3%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative47.3%

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

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

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

    if 4.59999999999999963e-276 < t < 3.1999999999999997e182

    1. Initial program 70.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg39.5%

        \[\leadsto \color{blue}{-y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)} \]
      2. *-commutative39.5%

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in39.5%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg39.5%

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

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative39.5%

        \[\leadsto \left(\color{blue}{j \cdot i} - x \cdot z\right) \cdot \left(-y\right) \]
    5. Simplified39.5%

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 33.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+163}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-106}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-276}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 27.4% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;t \leq -5.2 \cdot 10^{-111}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-276}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.20000000000000057e163 or -1.0999999999999999e79 < t < -5.19999999999999965e-111

    1. Initial program 78.4%

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

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right)} \]
    5. Step-by-step derivation
      1. associate-*r*45.7%

        \[\leadsto \color{blue}{\left(b \cdot i\right) \cdot t} \]
    6. Simplified45.7%

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

    if -6.20000000000000057e163 < t < -1.0999999999999999e79

    1. Initial program 68.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg68.9%

        \[\leadsto \color{blue}{-y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)} \]
      2. *-commutative68.9%

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in68.9%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg68.9%

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg68.9%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative68.9%

        \[\leadsto \left(\color{blue}{j \cdot i} - x \cdot z\right) \cdot \left(-y\right) \]
    5. Simplified68.9%

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 37.7%

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

        \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot x} \]
      2. associate-*r*46.4%

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

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

    if -5.19999999999999965e-111 < t < 2.19999999999999981e-276

    1. Initial program 75.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative47.3%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg47.3%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg47.3%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative47.3%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative47.3%

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

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

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

    if 2.19999999999999981e-276 < t < 3.1999999999999997e182

    1. Initial program 70.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg39.5%

        \[\leadsto \color{blue}{-y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)} \]
      2. *-commutative39.5%

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in39.5%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg39.5%

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

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative39.5%

        \[\leadsto \left(\color{blue}{j \cdot i} - x \cdot z\right) \cdot \left(-y\right) \]
    5. Simplified39.5%

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 33.1%

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

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

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

    if 3.1999999999999997e182 < t

    1. Initial program 61.3%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--87.5%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
      2. *-commutative87.5%

        \[\leadsto t \cdot \left(-1 \cdot \left(\color{blue}{x \cdot a} - b \cdot i\right)\right) \]
      3. *-commutative87.5%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot a - i \cdot b\right)\right)} \]
    6. Taylor expanded in x around 0 53.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{+163}:\\ \;\;\;\;t \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{+79}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-111}:\\ \;\;\;\;t \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-276}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 44.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{if}\;z \leq -5.1 \cdot 10^{+166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.95 \cdot 10^{-24}:\\ \;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+24}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+161}:\\ \;\;\;\;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 (* b (- (* t i) (* z c)))))
   (if (<= z -5.1e+166)
     t_1
     (if (<= z -2.95e-24)
       (* c (- (* a j) (* z b)))
       (if (<= z 2.1e+24)
         (* a (- (* c j) (* x t)))
         (if (<= z 6.2e+161) (* 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 = b * ((t * i) - (z * c));
	double tmp;
	if (z <= -5.1e+166) {
		tmp = t_1;
	} else if (z <= -2.95e-24) {
		tmp = c * ((a * j) - (z * b));
	} else if (z <= 2.1e+24) {
		tmp = a * ((c * j) - (x * t));
	} else if (z <= 6.2e+161) {
		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 = b * ((t * i) - (z * c))
    if (z <= (-5.1d+166)) then
        tmp = t_1
    else if (z <= (-2.95d-24)) then
        tmp = c * ((a * j) - (z * b))
    else if (z <= 2.1d+24) then
        tmp = a * ((c * j) - (x * t))
    else if (z <= 6.2d+161) 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 = b * ((t * i) - (z * c));
	double tmp;
	if (z <= -5.1e+166) {
		tmp = t_1;
	} else if (z <= -2.95e-24) {
		tmp = c * ((a * j) - (z * b));
	} else if (z <= 2.1e+24) {
		tmp = a * ((c * j) - (x * t));
	} else if (z <= 6.2e+161) {
		tmp = x * (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = b * ((t * i) - (z * c))
	tmp = 0
	if z <= -5.1e+166:
		tmp = t_1
	elif z <= -2.95e-24:
		tmp = c * ((a * j) - (z * b))
	elif z <= 2.1e+24:
		tmp = a * ((c * j) - (x * t))
	elif z <= 6.2e+161:
		tmp = x * (y * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(b * Float64(Float64(t * i) - Float64(z * c)))
	tmp = 0.0
	if (z <= -5.1e+166)
		tmp = t_1;
	elseif (z <= -2.95e-24)
		tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b)));
	elseif (z <= 2.1e+24)
		tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t)));
	elseif (z <= 6.2e+161)
		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 = b * ((t * i) - (z * c));
	tmp = 0.0;
	if (z <= -5.1e+166)
		tmp = t_1;
	elseif (z <= -2.95e-24)
		tmp = c * ((a * j) - (z * b));
	elseif (z <= 2.1e+24)
		tmp = a * ((c * j) - (x * t));
	elseif (z <= 6.2e+161)
		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[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e+166], t$95$1, If[LessEqual[z, -2.95e-24], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+24], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+161], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+24}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+161}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.1e166 or 6.20000000000000013e161 < z

    1. Initial program 59.3%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative62.5%

        \[\leadsto b \cdot \left(\color{blue}{t \cdot i} - c \cdot z\right) \]
      2. *-commutative62.5%

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

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

    if -5.1e166 < z < -2.9500000000000001e-24

    1. Initial program 63.8%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative56.7%

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

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

    if -2.9500000000000001e-24 < z < 2.1000000000000001e24

    1. Initial program 81.7%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative56.3%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg56.3%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg56.3%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative56.3%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative56.3%

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) \]
    5. Simplified56.3%

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

    if 2.1000000000000001e24 < z < 6.20000000000000013e161

    1. Initial program 73.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg67.3%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in67.3%

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

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

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg67.3%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative67.3%

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

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 57.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.1 \cdot 10^{+166}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{elif}\;z \leq -2.95 \cdot 10^{-24}:\\ \;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+24}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+161}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 44.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+24}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+161}:\\ \;\;\;\;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 (* b (- (* t i) (* z c)))))
   (if (<= z -1.35e-14)
     t_1
     (if (<= z 2.05e+24)
       (* a (- (* c j) (* x t)))
       (if (<= z 6e+161) (* 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 = b * ((t * i) - (z * c));
	double tmp;
	if (z <= -1.35e-14) {
		tmp = t_1;
	} else if (z <= 2.05e+24) {
		tmp = a * ((c * j) - (x * t));
	} else if (z <= 6e+161) {
		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 = b * ((t * i) - (z * c))
    if (z <= (-1.35d-14)) then
        tmp = t_1
    else if (z <= 2.05d+24) then
        tmp = a * ((c * j) - (x * t))
    else if (z <= 6d+161) 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 = b * ((t * i) - (z * c));
	double tmp;
	if (z <= -1.35e-14) {
		tmp = t_1;
	} else if (z <= 2.05e+24) {
		tmp = a * ((c * j) - (x * t));
	} else if (z <= 6e+161) {
		tmp = x * (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = b * ((t * i) - (z * c))
	tmp = 0
	if z <= -1.35e-14:
		tmp = t_1
	elif z <= 2.05e+24:
		tmp = a * ((c * j) - (x * t))
	elif z <= 6e+161:
		tmp = x * (y * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(b * Float64(Float64(t * i) - Float64(z * c)))
	tmp = 0.0
	if (z <= -1.35e-14)
		tmp = t_1;
	elseif (z <= 2.05e+24)
		tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t)));
	elseif (z <= 6e+161)
		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 = b * ((t * i) - (z * c));
	tmp = 0.0;
	if (z <= -1.35e-14)
		tmp = t_1;
	elseif (z <= 2.05e+24)
		tmp = a * ((c * j) - (x * t));
	elseif (z <= 6e+161)
		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[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-14], t$95$1, If[LessEqual[z, 2.05e+24], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+161], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 2.05 \cdot 10^{+24}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+161}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3499999999999999e-14 or 6.00000000000000023e161 < z

    1. Initial program 60.7%

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

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative55.6%

        \[\leadsto b \cdot \left(\color{blue}{t \cdot i} - c \cdot z\right) \]
      2. *-commutative55.6%

        \[\leadsto b \cdot \left(t \cdot i - \color{blue}{z \cdot c}\right) \]
    5. Simplified55.6%

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

    if -1.3499999999999999e-14 < z < 2.05e24

    1. Initial program 82.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative56.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg56.2%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg56.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative56.2%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative56.2%

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) \]
    5. Simplified56.2%

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

    if 2.05e24 < z < 6.00000000000000023e161

    1. Initial program 73.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg67.3%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in67.3%

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

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

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg67.3%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative67.3%

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

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 57.9%

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

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

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

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

Alternative 17: 52.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{if}\;a \leq -3.9 \cdot 10^{-12}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -7.5 \cdot 10^{-245}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\

\mathbf{elif}\;a \leq 1.42 \cdot 10^{-39}:\\
\;\;\;\;i \cdot \left(t \cdot b - y \cdot j\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.89999999999999994e-12 or 1.42000000000000005e-39 < a

    1. Initial program 62.2%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative59.4%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg59.4%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg59.4%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative59.4%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative59.4%

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

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

    if -3.89999999999999994e-12 < a < -7.5000000000000003e-245

    1. Initial program 78.8%

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

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

        \[\leadsto b \cdot \left(\color{blue}{t \cdot i} - c \cdot z\right) \]
      2. *-commutative55.3%

        \[\leadsto b \cdot \left(t \cdot i - \color{blue}{z \cdot c}\right) \]
    5. Simplified55.3%

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

    if -7.5000000000000003e-245 < a < 1.42000000000000005e-39

    1. Initial program 85.4%

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

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(b \cdot t\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--52.1%

        \[\leadsto i \cdot \color{blue}{\left(-1 \cdot \left(j \cdot y - b \cdot t\right)\right)} \]
      2. *-commutative52.1%

        \[\leadsto i \cdot \left(-1 \cdot \left(\color{blue}{y \cdot j} - b \cdot t\right)\right) \]
      3. *-commutative52.1%

        \[\leadsto i \cdot \left(-1 \cdot \left(y \cdot j - \color{blue}{t \cdot b}\right)\right) \]
    5. Simplified52.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - b \cdot t\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg52.1%

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

        \[\leadsto -i \cdot \color{blue}{\left(j \cdot y + \left(-b\right) \cdot t\right)} \]
      3. *-commutative52.1%

        \[\leadsto -i \cdot \left(\color{blue}{y \cdot j} + \left(-b\right) \cdot t\right) \]
      4. *-commutative52.1%

        \[\leadsto -i \cdot \left(y \cdot j + \color{blue}{t \cdot \left(-b\right)}\right) \]
      5. fma-def52.1%

        \[\leadsto -i \cdot \color{blue}{\mathsf{fma}\left(y, j, t \cdot \left(-b\right)\right)} \]
      6. distribute-rgt-neg-in52.1%

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

        \[\leadsto i \cdot \left(-\color{blue}{\left(y \cdot j + t \cdot \left(-b\right)\right)}\right) \]
      8. distribute-neg-out52.1%

        \[\leadsto i \cdot \color{blue}{\left(\left(-y \cdot j\right) + \left(-t \cdot \left(-b\right)\right)\right)} \]
      9. +-commutative52.1%

        \[\leadsto i \cdot \color{blue}{\left(\left(-t \cdot \left(-b\right)\right) + \left(-y \cdot j\right)\right)} \]
      10. unsub-neg52.1%

        \[\leadsto i \cdot \color{blue}{\left(\left(-t \cdot \left(-b\right)\right) - y \cdot j\right)} \]
      11. distribute-rgt-neg-in52.1%

        \[\leadsto i \cdot \left(\color{blue}{t \cdot \left(-\left(-b\right)\right)} - y \cdot j\right) \]
      12. remove-double-neg52.1%

        \[\leadsto i \cdot \left(t \cdot \color{blue}{b} - y \cdot j\right) \]
    8. Simplified52.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{-12}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-245}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{elif}\;a \leq 1.42 \cdot 10^{-39}:\\ \;\;\;\;i \cdot \left(t \cdot b - y \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 39.9% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;z \leq 2.12 \cdot 10^{+24}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+161}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.7500000000000001e-13

    1. Initial program 57.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg38.4%

        \[\leadsto \color{blue}{-b \cdot \left(c \cdot z\right)} \]
      2. associate-*r*41.1%

        \[\leadsto -\color{blue}{\left(b \cdot c\right) \cdot z} \]
      3. *-commutative41.1%

        \[\leadsto -\color{blue}{z \cdot \left(b \cdot c\right)} \]
      4. distribute-rgt-neg-in41.1%

        \[\leadsto \color{blue}{z \cdot \left(-b \cdot c\right)} \]
      5. distribute-rgt-neg-in41.1%

        \[\leadsto z \cdot \color{blue}{\left(b \cdot \left(-c\right)\right)} \]
    6. Simplified41.1%

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

    if -1.7500000000000001e-13 < z < 2.1200000000000001e24

    1. Initial program 82.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative56.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg56.2%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg56.2%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative56.2%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative56.2%

        \[\leadsto a \cdot \left(j \cdot c - \color{blue}{x \cdot t}\right) \]
    5. Simplified56.2%

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

    if 2.1200000000000001e24 < z < 5.80000000000000032e161

    1. Initial program 73.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg67.3%

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

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in67.3%

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

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

        \[\leadsto \left(i \cdot j + \color{blue}{\left(-x \cdot z\right)}\right) \cdot \left(-y\right) \]
      6. unsub-neg67.3%

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative67.3%

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

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 57.9%

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

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

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

    if 5.80000000000000032e161 < z

    1. Initial program 70.2%

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

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutative53.2%

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{z \cdot b}\right) \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - z \cdot b\right)} \]
    6. Taylor expanded in a around 0 49.6%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*49.6%

        \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \left(c \cdot z\right)} \]
      2. neg-mul-149.6%

        \[\leadsto \color{blue}{\left(-b\right)} \cdot \left(c \cdot z\right) \]
    8. Simplified49.6%

      \[\leadsto \color{blue}{\left(-b\right) \cdot \left(c \cdot z\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification51.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{-13}:\\ \;\;\;\;z \cdot \left(c \cdot \left(-b\right)\right)\\ \mathbf{elif}\;z \leq 2.12 \cdot 10^{+24}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+161}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot c\right) \cdot \left(-b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 28.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t \cdot i\right)\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{-101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{-277}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\ \;\;\;\;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 (* b (* t i))))
   (if (<= t -5.5e-101)
     t_1
     (if (<= t 1.08e-277)
       (* a (* c j))
       (if (<= t 3.2e+182) (* 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 = b * (t * i);
	double tmp;
	if (t <= -5.5e-101) {
		tmp = t_1;
	} else if (t <= 1.08e-277) {
		tmp = a * (c * j);
	} else if (t <= 3.2e+182) {
		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 = b * (t * i)
    if (t <= (-5.5d-101)) then
        tmp = t_1
    else if (t <= 1.08d-277) then
        tmp = a * (c * j)
    else if (t <= 3.2d+182) 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 = b * (t * i);
	double tmp;
	if (t <= -5.5e-101) {
		tmp = t_1;
	} else if (t <= 1.08e-277) {
		tmp = a * (c * j);
	} else if (t <= 3.2e+182) {
		tmp = x * (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = b * (t * i)
	tmp = 0
	if t <= -5.5e-101:
		tmp = t_1
	elif t <= 1.08e-277:
		tmp = a * (c * j)
	elif t <= 3.2e+182:
		tmp = x * (y * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(b * Float64(t * i))
	tmp = 0.0
	if (t <= -5.5e-101)
		tmp = t_1;
	elseif (t <= 1.08e-277)
		tmp = Float64(a * Float64(c * j));
	elseif (t <= 3.2e+182)
		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 = b * (t * i);
	tmp = 0.0;
	if (t <= -5.5e-101)
		tmp = t_1;
	elseif (t <= 1.08e-277)
		tmp = a * (c * j);
	elseif (t <= 3.2e+182)
		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[(b * N[(t * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-101], t$95$1, If[LessEqual[t, 1.08e-277], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+182], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(t \cdot i\right)\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-101}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.08 \cdot 10^{-277}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.49999999999999973e-101 or 3.1999999999999997e182 < t

    1. Initial program 73.4%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--60.4%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
      2. *-commutative60.4%

        \[\leadsto t \cdot \left(-1 \cdot \left(\color{blue}{x \cdot a} - b \cdot i\right)\right) \]
      3. *-commutative60.4%

        \[\leadsto t \cdot \left(-1 \cdot \left(x \cdot a - \color{blue}{i \cdot b}\right)\right) \]
    5. Simplified60.4%

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot a - i \cdot b\right)\right)} \]
    6. Taylor expanded in x around 0 41.8%

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

    if -5.49999999999999973e-101 < t < 1.0800000000000001e-277

    1. Initial program 75.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative47.3%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg47.3%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg47.3%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative47.3%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative47.3%

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

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

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

    if 1.0800000000000001e-277 < t < 3.1999999999999997e182

    1. Initial program 70.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg39.5%

        \[\leadsto \color{blue}{-y \cdot \left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right)} \]
      2. *-commutative39.5%

        \[\leadsto -\color{blue}{\left(-1 \cdot \left(x \cdot z\right) + i \cdot j\right) \cdot y} \]
      3. distribute-rgt-neg-in39.5%

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

        \[\leadsto \color{blue}{\left(i \cdot j + -1 \cdot \left(x \cdot z\right)\right)} \cdot \left(-y\right) \]
      5. mul-1-neg39.5%

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

        \[\leadsto \color{blue}{\left(i \cdot j - x \cdot z\right)} \cdot \left(-y\right) \]
      7. *-commutative39.5%

        \[\leadsto \left(\color{blue}{j \cdot i} - x \cdot z\right) \cdot \left(-y\right) \]
    5. Simplified39.5%

      \[\leadsto \color{blue}{\left(j \cdot i - x \cdot z\right) \cdot \left(-y\right)} \]
    6. Taylor expanded in j around 0 33.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-101}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{-277}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 29.6% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{-102} \lor \neg \left(t \leq 0.00062\right):\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= t -2.65e-102) (not (<= t 0.00062))) (* b (* t i)) (* a (* c j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -2.65e-102) || !(t <= 0.00062)) {
		tmp = b * (t * i);
	} else {
		tmp = a * (c * j);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if ((t <= (-2.65d-102)) .or. (.not. (t <= 0.00062d0))) then
        tmp = b * (t * i)
    else
        tmp = a * (c * j)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -2.65e-102) || !(t <= 0.00062)) {
		tmp = b * (t * i);
	} else {
		tmp = a * (c * j);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if (t <= -2.65e-102) or not (t <= 0.00062):
		tmp = b * (t * i)
	else:
		tmp = a * (c * j)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((t <= -2.65e-102) || !(t <= 0.00062))
		tmp = Float64(b * Float64(t * i));
	else
		tmp = Float64(a * Float64(c * j));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if ((t <= -2.65e-102) || ~((t <= 0.00062)))
		tmp = b * (t * i);
	else
		tmp = a * (c * j);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -2.65e-102], N[Not[LessEqual[t, 0.00062]], $MachinePrecision]], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.65 \cdot 10^{-102} \lor \neg \left(t \leq 0.00062\right):\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.6500000000000001e-102 or 6.2e-4 < t

    1. Initial program 69.7%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--58.4%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(a \cdot x - b \cdot i\right)\right)} \]
      2. *-commutative58.4%

        \[\leadsto t \cdot \left(-1 \cdot \left(\color{blue}{x \cdot a} - b \cdot i\right)\right) \]
      3. *-commutative58.4%

        \[\leadsto t \cdot \left(-1 \cdot \left(x \cdot a - \color{blue}{i \cdot b}\right)\right) \]
    5. Simplified58.4%

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot a - i \cdot b\right)\right)} \]
    6. Taylor expanded in x around 0 36.8%

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

    if -2.6500000000000001e-102 < t < 6.2e-4

    1. Initial program 77.3%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. +-commutative42.1%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg42.1%

        \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
      3. unsub-neg42.1%

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
      4. *-commutative42.1%

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
      5. *-commutative42.1%

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

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

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

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

Alternative 21: 21.9% accurate, 5.8× speedup?

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

\\
a \cdot \left(c \cdot j\right)
\end{array}
Derivation
  1. Initial program 72.6%

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

    \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
  4. Step-by-step derivation
    1. +-commutative38.5%

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
    2. mul-1-neg38.5%

      \[\leadsto a \cdot \left(c \cdot j + \color{blue}{\left(-t \cdot x\right)}\right) \]
    3. unsub-neg38.5%

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j - t \cdot x\right)} \]
    4. *-commutative38.5%

      \[\leadsto a \cdot \left(\color{blue}{j \cdot c} - t \cdot x\right) \]
    5. *-commutative38.5%

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

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

    \[\leadsto \color{blue}{a \cdot \left(c \cdot j\right)} \]
  7. Final simplification23.6%

    \[\leadsto a \cdot \left(c \cdot j\right) \]
  8. Add Preprocessing

Developer target: 60.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t_1\\ \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\ \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* j (- (* c a) (* y i))))
        (t_2
         (+
          (-
           (* x (- (* y z) (* t a)))
           (/
            (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
            (+ (* c z) (* t i))))
          t_1)))
   (if (< x -1.469694296777705e-64)
     t_2
     (if (< x 3.2113527362226803e-147)
       (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = j * ((c * a) - (y * i));
	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
	double tmp;
	if (x < -1.469694296777705e-64) {
		tmp = t_2;
	} else if (x < 3.2113527362226803e-147) {
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = j * ((c * a) - (y * i))
    t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
    if (x < (-1.469694296777705d-64)) then
        tmp = t_2
    else if (x < 3.2113527362226803d-147) then
        tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = j * ((c * a) - (y * i));
	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
	double tmp;
	if (x < -1.469694296777705e-64) {
		tmp = t_2;
	} else if (x < 3.2113527362226803e-147) {
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = j * ((c * a) - (y * i))
	t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1
	tmp = 0
	if x < -1.469694296777705e-64:
		tmp = t_2
	elif x < 3.2113527362226803e-147:
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i)))
	t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1)
	tmp = 0.0
	if (x < -1.469694296777705e-64)
		tmp = t_2;
	elseif (x < 3.2113527362226803e-147)
		tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = j * ((c * a) - (y * i));
	t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1;
	tmp = 0.0;
	if (x < -1.469694296777705e-64)
		tmp = t_2;
	elseif (x < 3.2113527362226803e-147)
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t_1\right)\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024019 
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64

  :herbie-target
  (if (< x -1.469694296777705e-64) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 3.2113527362226803e-147) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))